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. ...

Get Seven Web Frameworks in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.