angular-enterprise-example
angular-enterprise-example copied to clipboard
Use json:api rather than ad hoc REST JSON
Currently the REST-JSON parts of this example use ad hoc REST implementations. They have a high degree of uniformity (because they have started out using json-server
as a backend) but don't follow any particular specification.
Consider using json:api instead:
http://jsonapi.org/
There is both client and server side code available which conforms to the spec. It includes automatically, the various mechanisms needed for inter entity links, sorting and paging, and numerous other conveniences.
Possibly useful tool: https://github.com/abdulhaq-e/ngrx-json-api
(There are complex trade-offs in choosing a client/server API style and spec - although GraphQL is the big new thing and potentially an enormous payoff for some projects, REST still has many appropriate uses.)