In this blog post we are going to use a functional approach to creating a web application with Erlang and the Chicago Boss framework. Our application will display incoming SMS messages in real-time and allow you to respond to them in your browser using the Twilio API.

If you’re just interested in seeing the finished code for this blog post, it can be found on my Github here.

Why Functional Programming? Why Erlang?

Functional programming can be very intimidating to someone like myself who began learning to program using the object-oriented paradigm. Functional languages like Erlang pride themselves on their “no side effects” and “functions as first-class citizens” properties. This makes them ideal for concurrency and high-volume traffic applications.

Chicago Boss is a great stepping stone for OO developers looking to dive into functional programming. It aims to solve the problem of slow server-side templates and adopts familiar Rails conventions while running more efficiently than Ruby or the JVM.

Getting Started

We’ll start with everyone’s favorite step: setting up a development environment. We need to install the Erlang programming language and the Chicago Boss framework.

Installing Erlang on OSX can be done with Homebrew using