Articles on applied functional programming

These articles are intended to demonstrate the application of monads and other functional ideas to solve real world issues that arise in mainstream software development. My hope is to demonstrate to working programmers how ideas from functional programming can be applied to solve real problems, while achieving clean, testable and maintainable code. My target audience is working developers who have a basic familiarity with Scala, and who have an interest in functional programming. If you appreciate the concise expressiveness of Scala, but don’t really ‘get’ monads, this is the place for you.

  • Proxying Web Services [ code on github ]

    In this article I’ll show how we can use a monad to automatically marshall cookies through a intermediate system. This will allow the intermediate system to proxy web service calls from a user through to a backend system. The monad will have two advantages, it will allow us to focus our attention on the request/response bodies, and it will allow us to chain together multiple back end web services requests to service a single front end request. … WORK IN PROGRESS

  • Creating a Monadic Rendering Pipeline [ code on github ]

    In this article I’ll describe how the task of translating a JSON document to an HTML web page can be modularized with the use of monads. The monadic abstraction will allow us to add a variety of powerful features to our rendering pipeline, including validation, asynchrony, and dependency (JavaScript module) collection. … WORK IN PROGRESS