Restful Objects

Restful Objects is a standard covering RESTful interfaces to domain object models.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Restful Objects is a standard covering RESTful interfaces to domain object models. The specification is published under a Creative Commons license.

Representations and resources defined by the standard

edit edit source

The standard defines a small set of JSON representations covering the generic constructs in a domain object model including the following:

  • A list of links to domain objects
  • A single domain object
  • A property, collection, belonging to a domain object
  • An action that may be invoked on a domain object
  • An action result (which will typically include a domain object or list)
  • A domain service (essentially a stateless domain object)
  • A small number of very specific representations such as Home, Version, and User.

Restful Objects also defines a standard set of resources for accessing or manipulating these representations. The specification defines which HTTP methods may be used with each resource, and their meaning. The table below shows a partial summary:

HTTP method Object Property Collection Action[clarification needed] Action Invoke[clarification needed]
GET Object summary, member summary, property values Property, details and value Collection details and content Action prompt Invoke (if query only)
PUT Update or clear multiple property values Update or clear value Add object (if set semantics) — N/a – 405 error Invoke (if idempotent)
DELETE Delete object Clear value Remove object — N/a – 405 error — N/a – 405 error
POST — N/a – 405 error — N/a – 405 error Add object (if list semantics) — N/a – 405 error Invoke (any)

Taken together the resources and representations allow the complete functionality of a domain object model to be accessed over HTTP. The following diagram, taken from the specification, illustrates the relationship between the most commonly used resources and representations:

History and status

edit edit source

The Restful Objects specification version 1.0.0 was released in June 2012.

Framework implementations

edit edit source

There are three known implementations of the Restful Objects specification, all open source:

Relationship to other ideas

edit edit source

The Restful Objects specification states that it operates at a higher-level of abstraction than other restful standards such as the JAX-RS specifications for Java platform, or the WCF specification on .NET. There are some conceptual similarities to Odata - though Restful Objects places much more emphasis on exposing the behaviour of domain objects, not just their data.

There is an overlap with the naked objects pattern, in that both are concerned with creating generic interfaces to domain objects models. But while the latter creates some kind of user interface, Restful Objects creates an API - specifically a Restful API. The first two frameworks to implement the Restful Objects standard were both built on top of existing frameworks that implement the Naked Objects pattern.

edit edit source

Text derived from https://en.wikipedia.org/w/index.php?oldid=1227699656 under CC BY-SA 4.0; modifications have been made.

References

  1. ↩Wikipedia “Restful Objects” revision 1227699656 · retrieved 2026-10-20 release date (×1) · confidence 0.95 revision URL

Provenance

snapshot enwiki-001227699656 · captured 2024-06-07 · not yet sealed in the ledger · verify the chain · version history

Cite this page as: encyclopegia.org, “Restful Objects”, snapshot enwiki-001227699656. https://encyclopegia.org/a/restful-objects