Skip to content

1.0 roadmap #140

Open
Open

Description

@plandem

Let's discuss what we need to release a v1

what else?
@tiii @markerikson @tommikaikkonen @NathanBWaters

Edit by @haveyaseen: Referenced #81, #88, #219, #228, #58, #251, #258… Marked absolute requirements in bold.

Activity

  1. tiii commented on Jun 2, 2017

    @tiii
    Collaborator

    Up to date documentation! 😉

    Keep relation ids in a seperate field instead of overloading it with the relation [#102]
    Computed fields via attr descriptor?

    And since i guess everybody using redux-orm is doing implementing this in some way:
    A simple API for denormalizing (including computed fields / relations etc.)?

  2. nealoke commented on Jun 3, 2017

    @nealoke

    @tiii +1 for the documentation and api for denormalizing (including computed fields / relations). Great to see that this library is getting active again!

  3. plandem commented on Jun 3, 2017

    @plandem
    CollaboratorAuthor
  4. nealoke commented on Jun 3, 2017

    @nealoke

    @plandem I understood it as this.

    Currently when you want to get something out of the orm in a selector with it's relations (in this case questions) you need to do the following.

    export const getAccounts = createSelector(orm, getOrm, (session) => {
    	const accounts = session.Account.all().toModelArray();
    	
    	return accounts.map(accountModel => ({
    			...accountModel.ref,
    			questions: accountModel.questions.toRefArray()
    		})
    	});
    });
    

    I think it is best to keep this as a possibility (from above) but have a way simpler API point for this as well such as:

    export const getAccounts = createSelector(orm, getOrm, (session) => {
    	return session.Account.all().toRefArrayWithConnections(); // with a different name for the function
    });
    
  5. plandem commented on Jun 3, 2017

    @plandem
    CollaboratorAuthor
  6. nealoke commented on Jun 3, 2017

    @nealoke

    @plandem yhea maybe that's better. I just think it is a nice convenience. I'm also using this in my application and I find myself doing this quite often though.

    Maybe @tiii has more use cases or another insight on this? :)

  7. plandem commented on Jun 5, 2017

    @plandem
    CollaboratorAuthor

    @nealoke in our case we created and using next selectors:

    createSelector, //unified selector, that creates ORM selector or selector from reselect
    createRecordSelector, //to select single record with query info for relations and etc
    createListSelector, //to select all records with query info for relations and etc
    createTreeSelector, //to select all records resolved as tree with query info for relations and etc
    createGroupedSelector, //to select all records grouped by field, with query info for relations and etc
    createMapSelector,//to select all records indexed by id with query info for relations and etc

    All these selectors have set of options to tune result. So as I said, your case is very limited. And probably external helper library would be better. Maybe I will publish our version.

  8. tiii commented on Jun 9, 2017

    @tiii
    Collaborator

    @plandem @nealoke

    I sometimes request multiple nested resources so the selectors to grab them get kind of nasty. But thats rather a problem of poor design on my side. I guess I should use more redux containers.

    Nonetheless I am also interested in your selectors and I would say they already seem like some easier API for denormalizing. Why move them to a seperate library?

  9. plandem commented on Jun 9, 2017

    @plandem
    CollaboratorAuthor

    @tiii separate library, because I'm not sure that it fits here (E.g. in our case we use multi-schema ORM, where some schemas are same, but has differ keys at global state. So it can be project specific). For me it's selector's area. Anyway, right now I'm not ready to make it public yet. Need to revise it :)

    I guess I should use more redux containers

    I recommend to look for this library: https://github.com/artsy/react-redux-controller

    It's small and helped me to reduce the complexity of application.

  10. nealoke commented on Jun 11, 2017

    @nealoke

    @plandem Are you also planning to update the redux-orm-propTypes? Or do you think this package is obsolete?

  11. plandem commented on Jun 11, 2017

    @plandem
    CollaboratorAuthor
  12. NathanBWaters commented on Jun 12, 2017

    @NathanBWaters
    Collaborator

    @plandem Only other thing I could think of would be performance testing and potentially incorporating Flow. I don't believe either of them are required for v1 though.

  13. NathanBWaters commented on Jun 12, 2017

    @NathanBWaters
    Collaborator

    @nealoke I'll take on updating https://github.com/tommikaikkonen/redux-orm-proptypes because I want to use it haha.

  14. plandem commented on Jun 13, 2017

    @plandem
    CollaboratorAuthor

    @NathanBWaters agree, that someday we need to tune performance :)

  15. Aryk commented on Jul 15, 2017

    @Aryk

    hey @plandem - just wanted to throw in my 2 cents...regarding " refactor many-many field declaration to allow forward/backward declaration at each Model"

    If many to many has forward/backward declaration would the normal foreignkey/hasmany relationships also need to be defined separately on each model as well?

    I think having the backwards relationship explicitly defined would be better. I currently have to keep comments in my code alerting other developers that "hey the backwards relationship is on the other model..." :)

  16. plandem commented on Jul 15, 2017

    @plandem
    CollaboratorAuthor

    @Aryk yep, if explicitly then you will have to define on both models and in case of custom through model it can be verbose :) but...at least no surprises :)

  17. NathanBWaters commented on Jul 17, 2017

    @NathanBWaters
    Collaborator

    I really like @Aryk's suggestion, I'm doing the same thing currently with using comments to let others know backwards relationships.

  18. marxus commented on Jul 18, 2017

    @marxus

    @NathanBWaters @Aryk as @plandem said, it's already an option. this is how i do it:

    class Author extends Model {
      static modelName = 'Author'
      static fields = {
        id: attr(),
        title: attr(),
        books: many({
          to: 'Book',
          through: 'AuthorBook'
        })
      }
    }
    
    class Book extends Model {
      static modelName = 'Book'
      static fields = {
        id: attr(),
        title: attr(),
        authors: many({
          to: 'Author',
          through: 'AuthorBook'
        })
      }
    }
    
    class AuthorBook extends Model {
      static modelName = 'AuthorBook'
      static fields = {
        authorId: fk('Author'),
        bookId: fk('Book')
      }
    }
    

    no need to write alerting comments..

  19. Aryk commented on Jul 19, 2017

    @Aryk

    @marxus85 - im refering to fk relationships. There is no way to define a one-to-many backwards on the other model currently...

  20. spachori94 commented on Oct 13, 2017

    @spachori94

    @plandem add ability to add indexes on columns (other than the ID, which is indexed by default) definitely needed

  21. michelalbers commented on Dec 13, 2017

    @michelalbers

    Is this project still alive? Love the simplicity and I think about throwing out realm js for it.

  22. nealoke commented on Dec 13, 2017

    @nealoke

    @michelalbers I think it is, however even if it is not that active I already use it in various webapps and it is working like a charm :)

  23. markerikson commented on Dec 31, 2017

    @markerikson
    Collaborator

    Things have stalled a bit, but yeah, I think we ought to figure out what we really want for a 1.0 and get it out the door. (#158 probably ought to be in there.)

  24. plandem commented on Dec 31, 2017

    @plandem
    CollaboratorAuthor

    library is using in production for few project at our company - quite huge projects with 20+ models/relations and 15k+ records for some models (not sure about 100k, but in some cases we have much more than 15k records).

  25. added this to the v1.0 milestone on Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions