Evolution of the lib-framework dichotomy

The debate about the relative merits of frameworks versus libraries will likely remain a fixture in software development theory for a long time to come. Nevertheless, there are trends afoot, that suggest that this dichotomy is not so rigid as the OO theorists of the 90s would have us think.

The increasingly asynchronous nature of programming is one such trend. Many modern libraries, from Akka to backbone.js prescribe event-driven (callback-/message-driven) models that means a certain inversion of control is present. They thus acquires framework-like properties. The starkest example is probably the rapid adoption of MapReduce as the prevalent query paradigm in newer NoSQL databases.

We have also seen the rise of several platforms lately. Docker is perhaps the most interesting example, though npm also deserves to be named. These are clearly frameworks, but with very narrow contracts: if you follow a narrow set of rules, tons of magic will ensue.

Thirdly, most serious frameworks are acts of curation. As can be seen from e.g. Maven, the nature of this curation is changing, as are developers' expectations. JBoss AS now exposes all its internal dependencies as "modules" allowing easy (or at least clear) replacement. A stark contrast to older versions' repackaged jars.

The dichotomy is also affected by the steadily improving quality, particularly of open source projects. This is partly because a lot of open source is in fact produced commercially, but improving methodology and fierce competition also helps. This reduces the need for discovery and quality aspects of curation.

I think all these trends points roughly in the same direction: it pushes both libs and frameworks towards the middle ground, with narrow concepts (e.g. Akka's "there is only message-passing"), usually following established, well understood models (e.g. MapReduce). These will be successful because they can easily be combined into new constructs, lib style (e.g. a Maven-Docker plugin). I think we would do well to remember this when choosing software components for our projects.