News for hackers. Stuff that matters.

joachimhs

Re:Implementing a Svelte CachedStore on Wednesday August 28, 2024 @03:54AM (#41377088)
This library provides a cache store for Svelte applications that simplifies fetching, creating, updating, and deleting items from a REST API that adheres to the simple-json-api specification. It also supports side-loading of related data and automatic cache management.
Re:A simple JSON API spec on Wednesday August 28, 2024 @03:53AM (#41377082)
I find myself implementing similar backend APIs when I develop applications. These APis are more often than not based on REST principles with JSON payloads. As a result, I have publised the start of a simple JSON API spec at http://simple-json-api.com. This specification makes it easy to write both backend and frontend code to handle the data communication between the applications in a uniform manner. This approach makes it possible to write a fairly small amount of code to get advanced functionality on the frontend-data-layer.

While some good API specifications do exist, this project attempts to provide a common middle-ground being not too complex, while broad enough to not be too specific and too complex.

While, for instance, JSON:API is a thorough specification, Simple JSON API aims to provide a much simplified data-structure leaving the server-side specifics out of the specification. At the same time, while specifications such as JSON Web Key (JWK) is too narrow.

Older »