By its emphasis on integration via data rather than code, Clojure reduces the integration effort required by library users, thereby enabling the production of a vast number of small independent libraries. Freed from the responsibility of designing a good API integration API, library authors can focus on doing 'one thing well'.
However, there are currently few well-established idioms for assembling applications from this wealth of functionality. As Clojure adoption matures, Clojure systems are becoming larger, more complex and dependent on a greater number of libraries. So the question of how to assemble applications becomes more pertinent.
This talk will begin by introducing Stuart Sierra's component library, demonstrating some examples of its use. It will then show how integration points between components can be created using Clojure's protocols.
The talk will go on to explain the concept of modularity and describe a series of patterns, built upon these protocol-based integration points, for dynamically assembling systems, and configuring them for multiple environments.
It will then demonstrate these patterns using the familiar example of protecting a web-page from unauthorised access. This is an important example because the approach demonstrated addresses the problem of web security raised by Aaron Bedra and this year's ClojureWest conference. The solution will be composed in such a way as to preserve modularity, making it straight-forward to re-configure for different environments or to disable altogether. But more importantly, by creating from a set of re-usable components, such components can be improved in collaboration with other community developers, and thus reach a higher level of quality in comparison with bespoke code.
The talk will conclude by presenting the opportunity to rapidly assemble reliable systems out of re-usable parts, but crucially improving flexibility, choice and quality.