rickbw / crud-api

Create/Read/Update/Delete—a generic abstraction for accessing and manipulating state.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crud API

This project takes its name from the acronym Create/Read/Update/Delete. It provides a generic, foundational abstraction for accessing and manipulating state in the Java programming language. This abstraction is implemented by other projects in the crud-* family—for example, Crud HTTP contains an HTTP-based implementation.

The Crud API supports data-oriented interactions based on generic Resources, which encapsulate state and build upon the Observable abstraction from RxJava. The design emphasizes generality, safety and concurrency.

  • Generality: The available interactions consist of simple read and write operations.
  • Safety: The types of resources are statically type-safe, configured by means of generic type parameters..
  • Concurrency: The API encourages asynchronous implementations. It encapsulates asynchrony using RxJava’s Observable class. This encapsulation means that applications can work with asynchronous implementations just as easily as synchronous ones, and cross-cutting behaviors like retries can be transparently composed as needed.

API Overview

There are two primary abstractions in the API: Resources and ResourceSets. The former encapsulate the I/O operations on state, and hence uses a reactive style. There are two interfaces derived from Resource:

The latter abstraction, ResourceSet, provides local (i.e. assumed-cheap) navigation among Resources. This navigation uses a key-value lookup idiom, where keys are generic and may be simple—e.g. a URL—or arbitrarily complex—e.g. a database query—depending on the underlying data-access technology. There are two derived ResourceSet interfaces:

See Also

Copyright and License

All files in this project are copyright Rick Warren and, unless otherwise noted, licensed under the terms of the Apache 2 license.

About

Create/Read/Update/Delete—a generic abstraction for accessing and manipulating state.

License:Apache License 2.0


Languages

Language:Java 100.0%