Chapter 5Webmachine

Webmachine is quite different than other frameworks and libraries you may have seen before. It works a bit like the Socratic method or a Choose Your Own Adventure book. Webmachine asks your application questions, and the answers determine a path through the HTTP decision tree.

Does this URL exist? If no, return a 404; if yes, keep going. What kind of content does this URL support? What encodings does it support? When was it last modified? In each case, you provide simple answers, but Webmachine turns these into sophisticated handling of HTTP requests that few other systems can match.

All of this comes on top of the battle-hardened reliability and concurrency support that Erlang itself provides. The combination is potent, ...

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.