Book Review: Craig Walls – Modular Java

A few weeks ago, I had the pleasure of getting a promotional copy of Craig Walls’ (from Spring In Action fame) new book and thought I’d post a review of it here on my blog.

Modular Java: Creating Flexible Applications with OSGi and Spring provides a great introduction to those either curious about OSGi or wanting to get more out of their existing OSGi workflow using the Spring Framework.

The cover to Modular Java

Modular Java by Craig Walls

Craig Walls, author of “Spring in Action, 2nd Edition”, opens the book explaining why OSGi matters and how it can be used to enhance the modularity and maintainability of those application stacks containing multiple and complex moving parts. He not only serves up a great introduction to the technology, but also directs the reader to several tools that make OSGi development significantly easier.

In the second portion of the book, Craig throws Spring into the mix and demonstrates how the power of Spring Dependency Injection, autowiring, and the Spring MVC web framework can not only run seamlessly in an OSGi container, but also remove a large portion of the burden that OSGi’s API can put on application development.

Finally, Craig spends some time describing how an actual deployment might look in a production environment using both Tomcat and Jetty and provides optimization tips that make the process as painless as possible.

The book itself is logically organized and Craig’s writing style is approachable and easy to follow. All the example source code is available online, and Craig demonstrates how to install OSGi packages using both Eclipse Equinox and Apache Felix, leaving the final OSGi container decision up to the preference and requirements of the project. The sample application Craig uses to demonstrate the concepts in the book is surprisingly fun and useful, and the book contains some wonderful appendices that function as a great reference for current and future development projects. The book is a relatively quick read but surprisingly complete.

For someone looking to get the most out of OSGi or wanting to find out what all the “buzz” is about, Craig Walls’ book is an outstanding choice.


About johnnywey

Welcome to A Regular Expression. This blog is designed to reflect my thoughts on life, music, software design, Apple, faith, philosophy, and whatever else I can think of.

Posted on September 2, 2009, in Java, Programming. Bookmark the permalink. 4 Comments.

  1. If you’d like you can port your review at too.


  2. While I agree that Modular Java has useful information about understanding and deploying osgi based applications, his assertion that Java has poor support for modularity is distracting and, I would argue, misleading.
    He spends a great deal of Chapter 1 describing features that are easily implemented with UrlClassloader, a map, and the java.beans.beancontext package.
    Sure jar files “offer no practical notion of versioning”, but you don’t declare a particular car to have poor fuel efficiency because the seatbelt doesn’t have a gasoline filter in it.

  3. kris, you’re a stupid fool.

  4. Im glad somebody else pointed that out (that kris is a fool). His comment bothers me also. ‘Ooooh look at me, i can write good java all by myself… whoopty doo. F*ck off then and leave the rest of us to our osgi while you go reinvent the wheel.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: