I’m a swiss Master student in Computer Science. I’m very interested in C++, open source projects, Linux, Intel Assembly and Agile. I'm currently working on Eddi, a new programming language that I created to improve my skills in C++. I've also worked a lot on Java technologies (Sprint, Osgi, Play!, ...), but I'm not currently working with Java anymore. Baptiste is a DZone MVB and is not an employee of DZone and has posted 51 posts at DZone. You can read more from them at their website. View Full User Profile

Modular Java – Book Review

07.09.2010
| 4982 views |
  • submit to reddit

Some weeks ago, I finished “Modular Java – Creating Flexible Applications With OSGi and Spring”, it’s time to do a little review now. This book is an excellent introduction to the creation of modular applications in Java. It introduces all the main concepts of  OSGi technology, Spring Dynamic Modules and tools that make the development of OSGi applications easier.

The first chapter introduces the concept of modularity and explains how OSGi solves the problem. The main characteristics of the technology are also described. The next chapter lists the main OSGi containers and we create the first Hello World using OSGi. Next we improve this simple program using an OSGi service.

After that the third chapter introduces the application “Dude, Where is my Jar ?”. This application is a simple web program allowing a developer to search for a jar file in Maven repositories. This application is used in all the following chapters. The chapter also shows how the Pax tools can make the development of OSGi applications easier.

In the next chapter, we create the first bundle of the application. With that bundle we see how to work with non-bundle dependencies. And in the next one, we create the services of the application and see how to publish and consume services. After that, it’s time to use Spring Dynamic Modules: we see how to publish and consume services with Spring.

In the seventh chapter, we develop the web bundle. For that, we include Tomcat or Jetty in the form of OSGi Bundles. We also see the differences between a simple bundle (jar) and a web bundle (war). In the next, we see how to extend an OSGi bundle using fragments. With that, we see how to separate the JSP part of the application.

The last two chapters are about deployment in the production of an OSGi application and the services offered by the OSGi standard (logging, admin, console, …).

In conclusion, this book will allows you to start developing applications using OSGi. It’s really comfortable to follow the development of a simple application throughout the entire book, and improve it with each technology concept. But I think it’s not a very good idea to use that log the Pax Tools. We quickly loose OSGi with Pax. It’s quite interesting to know how to use Pax (I use it everyday), but when we start, it’s better to see the basic concepts further.
And more, the Maven output, is almost entirely displayed. This not really useful to see that every time when it’s not errors, warning or important informations. But nevertheless, the reading of the book is really comfortable and fluid.

From http://www.baptiste-wicht.com/2010/07/modular-java-book-review/

Published at DZone with permission of Baptiste Wicht, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Gilbert Herschberger replied on Sun, 2010/07/11 - 10:24pm

See also Book Review: Modular Java.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.