Why I think AJAX breaks REST continued

There were some really good comments on my “Why I think AJAX breaks REST” post to which I tried to reply. The reason for this new post was Andrew Newman‘s comments.

I disagree with Andrew on his assertion that REST is only about how services should be exposed. I think that REST is an architectural style on how to write distributed applications, not just services. It sets the principles of RESTful applications and defines the interaction constraints that should be applied in order to maintain those principles. This is the first sentence of Roy Fielding’s chapter 5:

“This chapter introduces and elaborates the Representational State Transfer (REST) architectural style for distributed hypermedia systems, describing the software engineering principles guiding REST and the interaction constraints chosen to retain those principles, while contrasting them to the constraints of other architectural styles”

Please also note that REST is an architectural style for a hypermedia application. In a hypermedia application, when one follows a link the result is a transfer to a different state. Also note that one of the constraints is that state is identified by URIs.

I do agree that AJAX is a way to write client-side code. I don’t think I supported otherwise.

What I did say is that the use of the AJAX approach to building distributed applications, or even just client-side ones, encourages a move away from the REST principles and that those building distributed applications should be aware of that. Of course, if any approach (REST or non-REST) results in well-architected, good, scalable solutions offering high-value then I don’t see why we shouldn’t use it. We just can’t call all the good things out there RESTful.

Recent Posts

The Beginning of CVOYA

There’s a unique energy that comes with starting something new — a blend of excitement,…

1 month ago

Enhancements in Graph Model: Dynamic Entities & Full-Text Search

As I continued work on BrainExpanded and its MCP service, I came to realize that…

4 months ago

GraphModel: A .NET Abstraction for Graphs

Just over a month ago, I published "Playing with graphs and Neo4j". Back then, it…

5 months ago

Playing with graphs and neo4j

After my initial implementation of some BrainExpanded-related ideas on top of dgraph using its GraphQL…

6 months ago

A Graph Model DSL

Say hello to the Graph Model Domain Specific Language (GMDSL), created with the help of…

7 months ago

BrainExpanded – Web app and Data Sources

As I wrote in previous posts, the manual recording of memories for BrainExpanded is just…

7 months ago