Resource-Oriented Architectures

The resource-oriented style is marked by a process of issuing logical requests for named resources. These requests are interpreted by some kind of engine and turned into a physical representation of the resource (e.g., HTML page, XML form, JSON object, etc.). See Figure 5-4.

The basic interaction style in a resource-oriented architecture (ROA) is demonstrated in this figure. A logical request is named, resolved, and transferred back to the requestor in some form by a resource-oriented engine. The named resource is likely to resolve to a database query or some bit of functionality that manages information (e.g., a RESTful service). What responds to the request, which is largely irrelevant to the person interested in the information, is potentially a servlet, a Restlet,[23] a NetKernel module, or some other bit of addressable functionality that will interpret the request. This logical step hides a whole world of possibilities and technology choices, and simply does not leak unnecessary details to the client. It does not support all interaction styles, but you may be surprised at how much can fit comfortably behind a URL.

Resource-oriented architectures

Figure 5-4. Resource-oriented architectures

Consider the address http://server/getemployees&type=salaried. Many people who think they are doing REST create URLs that look like this. Unfortunately, it is not a good REST service name (most ...

Get Beautiful Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.