SpringOne 2GX 2011

Chicago, October 25-28, 2011

From "Hello World" to Real World : Building Web Apps with Spring-DM

As a matter of good design and best practice, we all know we should divide our application code into logical layers or modules that can be developed independent of each other. But if modularization is a good practice to follow as we write our code, why do we package it all up into a monolithic WAR file for deployment?

Breaking an application down into several well-defined modules affords developers many advantages, including:

* Easier parallel development
* Improved testability
* Substitutability of functionality
* Isolation of updates

Both a de facto standard and a proper standard, OSGi offers lightweight modularity to Java. Spring Dynamic Modules for OSGi (Spring-DM) brings the power of Spring to OSGi, making it possible to create, deploy, and wire OSGi components together without mucking about in the OSGi API. Together, Spring-DM and OSGi enable assembly of applications from fine-grained modules (known as bundles) that can be developed, deployed, and updated independent of each other. This combination of Spring and OSGi offers developers a refreshing lightweight component framework that is dramatically changing the enterprise Java landscape.

In this example-driven session, I'll show you the basics of building Spring-DM components, starting with a simple "Hello World" example and then ramping up quickly to a full-blown web application. You'll learn how to publish and consume services, how to extend bundles with OSGi fragments, and how to write integration tests against your component bundles.


About Craig Walls

Craig Walls

Craig Walls has been professionally developing software for over 17 years (and longer than that for the pure geekiness of it). He is a senior engineer with SpringSource as the Spring Social project lead and is the author of Spring in Action and XDoclet in Action (both published by Manning) and Modular Java (published by Pragmatic Bookshelf). He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring and OSGi on his blog. When he's not slinging code, Craig spends as much time as he can with his wife, two daughters, 4 birds and 3 dogs.

More About Craig »