8000 Update history by sandstrom · Pull Request #1590 · json-api/json-api · GitHub
[go: up one dir, main page]

Skip to content

Update history #1590

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

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open

Update history #1590

wants to merge 2 commits into from

Conversation

sandstrom
Copy link
Contributor
  • Reorder, since the history part doesn't seem super-relevant today
  • Update example library (active model serializers is basically dead)
  • Update links to https

- Reorder, since the history part doesn't seem super-relevant today
- Update example library (active model serializers is basically dead)
- Update links to https
Copy link
Contributor
@jelhan jelhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandstrom Thanks a lot for starting to improve the history section. I think it needs to be updated in general to cover the current state more closely. In my perspective JSON:API specification is not that much focused on Ember and Rails anymore as it was in the early days. I think this should be reflected in the history section as well.

@dgeb Would be great to hear your opinion on it.

Comment on lines +44 to +49
* A generic media type that can work across a broad set of use cases,
including the generally used relationship types
* Similarity to existing server-side framework practices (and human
readability for debugging)
* Ease of implementation on the server side
* Ease of implementation on the client side
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I would phrase the goals like this. It also conflicts, which the marketing statements on the homepage, which focus on

  1. avoid bike-shedding about API design,
  2. efficient caching, and
  3. avoid unnecessary network requests.

If you’ve ever argued with your team about the way your JSON responses should be formatted, JSON:API can be your anti-bikeshedding tool.

By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on what matters: your application.

Clients built around JSON:API are able to take advantage of its features around efficiently caching responses, sometimes eliminating network requests entirely.

Personally I would phrase the goals (looking back) as the following:

  1. Standardize REST API design to
    1. avoid bike-shedding about API design, which is not specific to the business requirements, and
    2. enable development of compatible client- and server-side libraries.
  2. Built on-top of established REST API patterns to enable incremental adoption and a flat learning curve.
  3. Reduce the risk of write conflicts on REST API design level (e.g. PATCH for updating resources and partial updates of to-many relationships using relationship links).
  4. Support advanced use cases like polymorphic relationships.
  5. Allow clients to fetch all needed data in a single request to avoid unnecessary network requests (under-fetching).
  6. Allow clients to request a subset of resource fields to avoid sending unnecessary data over the wire (over-fetching).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just copied text around. I didn't write any of that.

What you suggest sounds good! I've enabled maintainers to make copies in this fork, so you can make whatever changes you want.

Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

4 participants
0