On youtube ¶
In this talk we will revisit the basics of REST (REpresentational State Transfer), a term coined by Roy Fielding to describe the web network architecture, in contrast with older client-server network architectures.
In particular we will focus in on the Uniform Interface constraint and get to the bottom of what that means, discussing each of the following:
Resource identification in requests
Resource manipulation through representations
with a particular focus on the last two.
REST: Wandering in the Desert ¶
After gaining a deeper understanding of REST, we will look at the history of REST in development.
We will look at how the term was appropriated for use in XML APIs, when AJAX first emerged, and how it was then retained when APIs switched to JSON.
I will demonstrate why this is inappropriate by focusing on the ideas of the self-descriptive messages and HATEOAS constraints of REST.
We will look at recent developments in the JSON API space and how they are moving away from the concept of REST.
REST: A New Hope ¶
Finally, having established that REST does not apply well in the JSON API world, we will ask where it is appropriate and answer: in hypermedia systems.
And, it will turn out, tools like Django are wonderful for producing hypermedia systems ! In reexamining the hypermedia approach, and how it trivially satisfies the REST-ful architecture, we will look at a tool, htmx, that can help you create more advanced user experience while staying within the hypermedia architecture .
Carson Gross ¶
At Big Sky Software we look for hot new industry trends and then build the opposite of that…
Transcription Friday, 2021 October 22
by Carson Gross
- I wanna point out that we have some actual evidence of the hard times, in to which REST has fallen here at DjangoCon
- So let’s talk a little bit about how web development grew up
- 05:14 we’re gonna focus on the uniform interface constraint in REST
- 06:29 Let’s just talk about HTML, resource identification
- Secondly, manipulating through resources
- Self-descriptive messages.
- And finally, we come to the last and probably the most misunderstood constraint, which is HATEOAS
- API churn
- 13:05 So, if you consider the endpoint https://example.com/contacts/42/email
- This original understanding of REST has been almost completely lost in the industry
- This has led to the rise of The Mighty JSON API
- This is definitely not HATEOAS
- 21:27 I don’t think that that means that we should toss the concept of REST and HATEOAS into the dust bin
- 22:47 And I’m glad that you asked
- So htmx started , it’s actually fairly mature
- Why should only click and submit events trigger them ? That’s a good question
- In the original HTTP and HTML model, you replaced the entire screen
- And so again, htmx expands HTML
- So, I want to go through a couple of examples for you
- Click to Edit (https://htmx.org/examples/click-to-edit/)
- 33:25 A more significant example that I really like, is active search
- 37:15 So, htmx and Django
- And in addition to that, let’s let Django be Django.