You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm open to suggestions. Here's why I haven't done it yet:
It's easier in the formatter to ask "What's your type" than "Do you contain all of the properties I need you to contain" This is a particular problem wrestling between a single resource and a list of resources (which I'm still struggling with).
I want to encourage creating a pure resource model, not painting a resource model over an entity model. I am working on some examples that illustrate this. If this is the right approach (and it may not be) then there is no need for multiple inheritance or mix-in classes.
Before really thinking through the resource model, I want to get CJ working, then maybe even Siren. This exercise is really informing me on how leaky the abstraction needs to be to be truly generic over multiple media types. Once that is done, I will do a heavy re-think over the programming model this library enables.
An alternate in the meantime: if you already have a class that inherits from something else, that class can implement IResource and it will work the same as inheriting from Resource. You just have to instantiate the Relations property yourself.
The library currently forces me to inherit all of my models from Resource. Can we find a way to switch this to a composition model instead?
The text was updated successfully, but these errors were encountered: