Wrapping Up
Webmachine does things a bit differently, but its unique design modeling HTTP as a state machine makes advanced HTTP processing a mundane matter. There’s no need to guess what HTTP status codes to return or a need to create complicated views; Webmachine requires only a series of simple answers to specific questions, and it takes care of all the complex decisions. Instead of Choose Your Own Adventure, using Webmachine is like Choose Your Own Application.
Throughout this chapter, we explored many features of Webmachine in small examples and in the context of Petite, a small link-shortening app. We implemented resource functions for returning multiple representations of resources, managing existence and redirects, caching, and authorization. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access