nodeconf / london

Nodeconf London is a one day single track speaker series.
http://london.nodeconf.com
12 stars 10 forks source link

JSON-API and Fortune.JS : supercharging restful services #1

Closed craigedmunds closed 8 years ago

craigedmunds commented 10 years ago

REST is a great pattern for organising webservices, however especially with the growth of mobile, we need to optimise our messages, in terms of size, content and roundtrip count for each client use case.

This is commonly implemented as a facade layer between the client and the REST services, with additional messages for each use case.

An alternative is available in the json-api.org project. JSON-API is a specification that layers on top of http to provide additional power in terms of representing the relationships between resources (links) and allowing a client to reduce the number of roundtrips and data size by specifying exactly what it needs when it makes the request.

Fortune.js is an open source node implementation of JSON-API that Victor are supporting. It provides a declarative syntax for defining resources and the relationships between them, and does the rest! We've built and open sourced a number of tools built on top of fortune and mongo, including a CRUD application for data management, an ERD generator, an ESB integration framework and are currently working on an api documentation generator. We also expose a metadata endpoint that can be used for other similar tools. We consider it an "api in a box" for node.

The aim of this talk is to highlight the power of JSON-API and fortune.js and introduce people to the other tools and how they can be integrated.