Closed markerikson closed 6 years ago
@markerikson First of all thank you for your attention.
Basically none.
This package has nothing to do with the idea or source of redux-orm
. I got the idea and motivation to make this package from my business project, just to make me and my team coding easier. It's implementation is inspired by this article on Hackernoon.
If you go really strict, there are 2 points of relationship between this package and redux-orm
:
Eloquent
).redux-orm
, to help me design better APIs that are simpler to understand and use.If you want to know more detailed, feel free to reopen, or just email me.
To clarify: I wasn't asking if redux-eloquent
was directly inspired by redux-orm
. I was asking for a comparison of features, API, use cases, and usage.
For example, both libraries appear to let you define model types and fields within those models, then fetch a list of those model types from a Redux state.
@markerikson I misunderstood.
I think redux-eloquent is packed with apis designed to be easier to use and understand while redux-orm can be more extendable and customizable.
Here's a brief comparison based on my own understanding of redux-orm.
redux-eloquent allows you define models in simpler syntax. While redux-orm defines Book attrs with id: attr(), publisher: fk('Publisher'), authors:many('Author')
, redux-eloquent prefer id: Number, publisher: Publisher, authors: [Author]
.
redux-orm provides you apis to create reducer and selectors on your own, while redux-eloquent handles them for you and expose simpler apis only for most frequent uses. If you are a developer using some backend languages and frameworks, this feels like redux-orm provides you db operation apis but redux-eloquent only provides ORMs.
redux-eloquent handles nested data well. As not mentioned (yet) in README, save() methed handles nested data with normalizr, which means you can save(aBookWithAnAutherObject), while redux-orm prefer terms like book.authors.add(). I find this term cool as well but came to drop it the last minute. (Because our backend api returns nested data)
Hope this helps.
在 2017年12月31日,上午10:16,Mark Erikson notifications@github.com 写道:
To clarify: I wasn't asking if redux-eloquent was directly inspired by redux-orm. I was asking for a comparison of features, API, use cases, and usage.
For example, both libraries appear to let you define model types and fields within those models, then fetch a list of those model types from a Redux state.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
This bears a resemblance with https://github.com/tommikaikkonen/redux-orm . I'd be curious to hear your thoughts on similarities and differences between the libraries.