Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for HAL #10

Open
DoctorEJB opened this issue Aug 16, 2016 · 1 comment
Open

Support for HAL #10

DoctorEJB opened this issue Aug 16, 2016 · 1 comment

Comments

@DoctorEJB
Copy link

Hi Vasilio -

We are prototyping Spring Data REST / HATEOAS components which produce HAL formatted
JSON output. Does or will the Modelizer provide support for HAL? Would be nice if it could
seamlessly extract modelizer objects out of the "embedded" HAL output.

@VasilioRuzanni
Copy link
Owner

VasilioRuzanni commented Aug 17, 2016

@DoctorEJB Well, there is no notion of HATEOAS per se but its pretty agnostic from what shape you have for your API data.

The easy option would be to override the .parse() method for either Model (or your custom model "subclass") or collection. You can parse the data in any way you'd like. Let me know whether that would work or not.

Note on Modelizer: The deprecation warning isn't there just yet but it's actually not maintained anymore (its mostly stable and usable enough, though) despite there was a plan for a rewrite/cleanup.

The reason is dead simple - there is no need for it anymore. There are quite a few much more powerful and expressive patterns for managing client-side state (that is what Modelizer was designed for in the first place - to contain, manage and sync the state, not to be a mere $http or Restangular replacement) have emerged after React and Angular 2 started taking over the arena. Given all that awesome stuff (which entire communities put a lot of effort into), the way Modelizer manages "model" state is by far inferior than other things. The overall concept can now be considered obsolete (well, it works and its simple, it just wound't scale well enough the more app grows and the more edge cases you have).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants