Core concepts

The main objective of YAWP! is to help developers to create simple, elegant and powerful web APIs.

Endpoint Models

In the center of everything are the Endpoint Models. More precisely, they are Active Web Documents:

Endpoint Models are really easy to create. The simplest example, used almost everywhere in this documentation, is the Person Endpoint Model:

@Endpoint(path = "/people")
public class Person {
    @Id
    IdRef<Person> id;
    String name;
}

This is the only configuration needed to create the Person Endpoint Model, which by default gives you repository actions with a complete set of Web APIs to access them:

Verb Path Action
GET /people List people
POST /people Create a person
GET /people/{id} Show a person
PUT/PATCH /people/{id} Update a person
DELETE /people/{id} Destroy a person

Endpoint Features

The default REST repository can be extended with custom business logic and this is done by means of extending a set of APIs known as Endpoint Features. They were carefully selected to organize specific responsibilities together:

Statically Typed over a Schemaless Persistence Layer

We’ve selected Java as the core language of YAWP! because it is statically typed at compile time. The main idea is to have an explicit and well organized place to declare your models’ structure. Since we are working over a schemaless persistence layer, this setup can be very powerful, mixing flexibility and stability.