REST Architecture: Beyond the Buzzword
#Backend

REST Architecture: Beyond the Buzzword

Backend Reporter
5 min read

REST isn't just using HTTP verbs - it's a carefully constrained architectural style that enables scalable, maintainable web services through principles like statelessness, uniform interfaces, and HATEOAS.

In today's software development landscape, integration between heterogeneous systems has become the rule rather than the exception. With the proliferation of networked applications, Web Services have become the backbone of this communication. Among the various architectural approaches we study, Representational State Transfer (REST) has consolidated itself as the true market standard for building APIs.

A common misconception - and one that often confuses beginners - is thinking that REST is a closed protocol or a framework you install in your project. In reality, it's an architectural style. This concept was introduced by Roy Thomas Fielding in 2000 during his doctoral thesis. Fielding's insight was to abstract how the web itself works, establishing a set of logical constraints to guide application design, aiming for maximum scalability and reliability in interactions (Fielding, 2000).

This article aims to present the theoretical foundations of REST architecture. We'll explore its main constraints, discuss the idea of architectural maturity (with focus on HATEOAS), and make a quick comparison with other market solutions like SOAP and GraphQL, along with real-world applications.

Theoretical Foundation

For a web service to truly be considered "RESTful," it cannot simply use HTTP any way it wants; it must rigorously follow a set of design constraints. As Lecheta (2015) points out, these rules ensure that the distributed system remains simple to understand and easy to maintain.

The first major constraint is the separation of responsibilities between client and server. This separation allows the interface (the front-end) to evolve completely independently of data storage (the back-end). Additionally, communication must be stateless. This means the server doesn't store user session information between requests. Each request the client makes must contain all the information necessary to be understood and processed (Fielding, 2000).

In practice, designing the system this way is excellent because it greatly facilitates load balancing in cloud providers: since there's no saved state, any available server can handle any request. Another pillar that defines REST is the uniform interface. To reduce architectural coupling, resources must be uniquely identified using URIs (Uniform Resource Identifiers) and manipulated through their representations (JSON has become the market darling for this). To tell the server our request's intention, we use HTTP protocol verbs with semantic value: GET to retrieve, POST to create, PUT/PATCH to update, and DELETE to remove (Lecheta, 2015).

But is every commercially advertised "REST" API truly REST? To answer this, we use the Richardson Maturity Model, which classifies APIs into levels (0 to 3). The structural apex (Level 3) is achieved when we apply the HATEOAS (Hypermedia as the Engine of Application State) concept. According to Richardson and Amundsen (2013), at this level, the server response already includes hypermedia "links" that guide the client about which actions are allowed next. This drastically reduces the front-end's dependency on the back-end's exact structure, allowing the API to evolve without breaking consuming applications.

To provide better context for the development ecosystem, Table 1 compares REST with two other widely discussed integration approaches.

Featured image

Table 1 - Comparison of Web Services Integration Approaches Source: Prepared by the author based on Lecheta (2015) and Seabra and Pinto (2019).

As we can see, SOAP (Serrano; Hernantes; Gallardo, 2014) still has its place but tends to be restricted to legacy or corporate systems that require absurdly rigid contracts. GraphQL has been gaining a lot of traction because it perfectly solves overfetching (bringing data that won't be used on screen) and underfetching (needing multiple requests to build a single view) problems, which is excellent for unstable mobile connections (Seabra; Pinto, 2019). Even so, REST remains advantageous due to its lower learning curve, native web cache support, and routing simplicity.

Looking at real-world applications, the Health Informatics field is a great example. Barreto (2020) proposes reference architectures in e-health (like H-KaaS) that show how sharing and managing complex knowledge depends on standardized interfaces. Additionally, the global FHIR (Fast Healthcare Interoperability Resources) standard, used to connect electronic health records worldwide, applies exactly RESTful principles to ensure such critical data travels with security and integrity.

Conclusion

Throughout the course disciplines, it's clear that REST architecture has transcended Fielding's original thesis to become the "bread and butter" of modern application design. The conscious use of its constraints - with emphasis on stateless communication, native cache utilization, and uniform interface - allows us to design highly scalable software, something essential when we think about the access volume of today's systems.

It's true that the market lives on novelties and that data delivery optimization technologies like GraphQL have a very important role in modern front-end architectures. However, when it comes to using the HTTP protocol idiomatically (the way it was designed to work), REST remains unbeatable.

For us, future software engineers, the real challenge isn't replacing REST, but rather stopping using it halfway. The focus should be on seeking the highest levels of architectural maturity. Implementing HATEOAS, for example, remains the main key to ensuring low coupling, creating systems that are self-explanatory, robust, and capable of evolving without causing headaches in the long term.

References

BARRETO, R. G. H-KaaS: Uma arquitetura de referência baseada em conhecimento como serviço para e-saúde. 2020. 121 f. Dissertação (Mestrado em Informática) – Universidade Federal da Paraíba, João Pessoa, 2020.

FIELDING, R. T. Architectural styles and the design of network-based software architectures. 2000. 162 f. Tese (Doutorado em Ciência da Computação) – University of California, Irvine, 2000.

LECHETA, R. R. Web services RESTful: aprenda a criar web services RESTful em Java na nuvem do Google. São Paulo: Novatec, 2015.

RICHARDSON, L.; AMUNDSEN, M. RESTful Web APIs. Sebastopol: O'Reilly Media, 2013.

SEABRA, M.; PINTO, G. REST or GraphQL? A performance comparative study. In: SBCARS '19: Proceedings of the XIII Brazilian Symposium on Software Components, Architectures, and Reuse. Salvador: ACM, 2019. p. 123-132.

SERRANO, N.; HERNANTES, J.; GALLARDO, G. Service-oriented architecture and legacy systems. IEEE Software, Los Alamitos, v. 31, n. 5, p. 15-19, 2014.

Comments

Loading comments...