Tuesday, September 25, 2012

Twelve-Factor Web Apps in Java

A colleague mentioned the Twelve-Factor App site which gives some design guidelines for building web apps. The Dependencies guideline has the following intriguing paragraph:

"A twelve-factor app never relies on implicit existence of system-wide packages. It declares all dependencies, completely and exactly, via a dependency declaration manifest. Furthermore, it uses a dependency isolation tool during execution to ensure that no implicit dependencies “leak in” from the surrounding system. The full and explicit dependency specification is applied uniformly to both production and development."

What would this mean for a Java app? It's more than just using a build tool such as Maven to declare dependencies using explicit coordinates since there is mention of a "dependency isolation tool" at runtime. Well, I think OSGi is the only viable way of implementing this guideline in Java (unless you fancy re-implementing something like the OSGi modularity layer using custom class loaders). The author, Adam Wiggins, makes no mention of OSGi, so presumably he has written Java off as an implementation language. Or does he have some other modularity technology in mind for Java? It would be interesting to know.

No comments:


OSGi (130) Virgo (59) Eclipse (10) Equinox (9) dm Server (8) Felix (4) WebSphere (3) Aries (2) GlassFish (2) JBoss (1) Newton (1) WebLogic (1)