Comments (1)
@dhdemerson this library adheres strictly to http://jsonapi.org/format/ but is also an example of an add-on that just matches a server contract and includes that format as first class in it's object structure and nomenclature. The Resource prototype (or model class) is built on the same structure of the payload from the api server. So it is a client representation of that format. As far as the query params are used this library doesn't need to enforce what params are sent to a find method of the resources service object (GET request).
It would be possible to fork and refit this library to the Katharsis dialect. My thoughts are that having data library for an ember app that makes the API contract first class in it's code and service methods and [de]serialization makes using that API contact simpler to grok in the client app. That was one of my motivations in making this library specific to the JSON API spec/format.
The way I would approach adapting (forking) this library to another API format/contract would be start with the resource prototype and reorganize it to match the API format, then scrub though the helper methods/utils for the resource to be sure any setup is adjusted based on the revised structure of the Resource prototype. Then likewise with the Adapter and Serializer prototypes adjust to the nomenclature of the API format/contract and finally the Store service is simply a facade to the adapter, so retrofit that to the revised adapter method naming. The result should be a new library that makes the Katharsis dialect first class in it's structure and nomenclature.
One thing that Ember Data does great at is providing an abstraction so that various adapter/service formats can be utilized. However this library doesn't take that approach, it simply does not abstract the format it becomes the format.
“You must be shapeless, formless, like water. When you pour water in a cup, it becomes the cup. When you pour water in a bottle, it becomes the bottle. When you pour water in a teapot, it becomes the teapot. Water can drip and it can crash. Become like water my friend.” - Bruce Lee
When you fetch data in an app with ember-jsonapi-resources the data becomes the format, when you create data in an app with this library it becomes the format.
from ember-jsonapi-resources.
Related Issues (20)
- Proposal: Include ember-getowner-polyfill HOT 3
- [question] Make related-proxy computed property volatile? HOT 6
- changedRelationships does not track first hasOne HOT 4
- [question] Similaries/differences with `DS.JSONAPIAdapter`? HOT 1
- Broken build with older version of fetch & es6-promise packages
- Replace fetch mixin with ember-fetchjax addon
- Name Relationship helper: toMany and toOne
- Ember Inspector `Data` tab is throwing an error HOT 2
- changedAttributes and changedRelationships not live. HOT 1
- Fix ember-beta [2.12.0-beta.2] test failures.
- Can not handle 204 no content for updating resources. HOT 2
- Full tests
- Looking for a new maintainer HOT 1
- Update to authorization mixin to support ember-simple-auth 1.0 HOT 1
- Update docs for [create|patch|delete]Relationship service methods HOT 1
- model generator/blueprint broken? HOT 4
- Move Resource#updateRelationship to a mixin
- has-one relation may be empty so need to handle a `data: null` response
- Proposal: Change key 'resource' to 'relation' in hasOne/hasMany object param. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-jsonapi-resources.