Introducing TinyWeb

We’ll start our journey with a look at an example of a program that makes heavy use of classic object-oriented patterns, a small web framework called TinyWeb. After introducing TinyWeb, we’ll see how to rewrite it in a hybrid object-oriented and functional style using Scala. Finally, we’ll move on to a more fully functional style in Clojure.

Let’s focus on a few goals for this example. The first is to see several patterns working together in one codebase before we go into them in more detail.

The second is to introduce basic Scala and Clojure concepts for those unfamiliar with either, or both, of the languages. A full introduction to the languages is beyond the scope of this book, but this section gives you enough of ...

Get Functional Programming Patterns in Scala and Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.