This review was originally printed in the September 2012 edition of the UKUUG newsletter, which is now defunct.
Title: Building Web Applications with Erlang
Authors: Zachary Kessin
ISBN: 9781449320652
The first, and perhaps most important thing to understand about this book is that is assumes the reader is already familiar with Erlang. In addition, knowledge of web development and the basics of HTTP are required in order to make sense of the text – this is not a book which takes you from a total beginner to building web applications. Also, with this being a new book, your package management system may not have the recommended version of Erlang (R15B). Whilst this is not absolutely necessary, a few code examples do require this version and so you may not be able to run everything without installing a backport or compiling from source.
Moving onto the text itself, the first chapter explains why Erlang is a good choice for web applications – though this feels somewhat redundant as any readers will presumably have already decided on the choice of language, and the advantages of Erlang do not seem particularly compelling at this point. Chapter two introduces Yaws, a framework for building web applications in Erlang, with a startup guide and the obligatory ‘Hello world’ example.
In the third chapter things start to get going, as session handling and access control are covered, albeit in only a few pages. This is followed by a relatively lengthy chapter on REST and handling HTTP requests, and another on uploading and storing files – including the use of Amazon S3.
The majority of the remainder of the book covers the building of a complete application module, as opposed to the snippets of code shown in the previous chapters. This provides a good starting point for creating a custom application of your own, although my limited Erlang knowledge meant that I was starting to get lost at this point. Finally, there are some useful appendices, including one for using Erlang with Emacs (but nothing on vim – a shocking oversight).
Overall, this book acts as a good introduction to building web applications with Erlang, although a substantial amount of prior knowledge is assumed. This is also an incredibly specific book, which is something of a double-edged sword. If you want to build web applications with Erlang (and use Yaws as your framework) it covers enough material to get you going, but it is really only useful if you fit the exact niche which it is aiming for