eosnewmedia / JSON-API-Common

Basic php implementation (shared structures for client and server) of the json api specification (jsonapi.org)
https://eosnewmedia.github.io/JSON-API-Common/
MIT License
14 stars 13 forks source link

JSON API data model question #6

Closed OndraM closed 6 years ago

OndraM commented 6 years ago

Hi and thanks for the JSON API libraries! We are just considering using the JSON-API bundle in our project, and let me ask a question: I see you implemented JSON API data structures on your own, inside this package.

However there is already library providing this json-api-php/json-api, it is in my opinion nicely done, follows precisely the specs and the structures are immutable (and we already have an experience from using it).

So the question is - have you seen this library? Do you think there are some extra features from the model implementation in your package? Do you think there would be some (maybe future) option of replacing the JSON API model implementation here with this library?

Thanks :)

pmarien commented 6 years ago

Hi, we need some features, like the collections for attributes and links in our projects. We wanted a simple abstract way so that all classes could be used for the client and for the server side. Because all of our projects (> 15) are based on this lib, it won't be an option to replace this lib with an other implementation. Our objects have to be built up or added piece by piece over several classes in order to be used in our project structure. For us an absolute decoupling between View (JSON API) and Business Model must be possible. Relationships, including includes and links, must be subsequently supplemented or edited from outside. Documents may not always be known as an empty document, document with a resource or document with multiple resorces or errors. This logic only arises through the program flow.