Saturday, January 15, 2011

Book Review for "OSGi and Apache Felix 3.0 Beginners Guide"

Book review for "OSGi and Apache Felix 3.0: Beginner's Guide"

This book promises to bring a developer from level zero through advanced usage of Apache Felix, a pretty ambitious goal. Before we get into how well it delivers, let's talk a little about what OSGi and Felix are.

OSGi is a specification meant to save Java developers deployment and classpath headaches. If you've ever used Eclipse, you have used OSGi, albeit as a user. OSGi is bigger than just Eclipse, though-- it's the basis for a whole new class of frameworks, and it's got buy-in from the guys at JBoss, Spring, Apache and others.

OSGi is meant to alleviate classloader headaches. It helps keep your deployments clean, allowing you to run application that have dependencies on libraries that might differ in version from what other deployments need. In other words, you can specify exactly which libs you need, and which versions, and OSGi will manage keeping all the applications happy.

This book teaches Apache Felix, which is a pretty mature OSGi implementation. The cruxt of the book is building, then improving a simple bookshelf application. Maven2 is used for the build duties, and the author is very generous with providing instruction about how to build your .pom files each step along the way.

Felix (and OSGi are much more than just a runtime container, though. Felix contains lifecycle startup mechanisms, so these are taught. You're also given a whole chapter on the shell language Felix provides for control functions.

Beyond that, it's mostly application development done the Felix way. Even tasks as mundane as logging are different under OSGi, and this book gives insights into all the nooks and crannies you'll need to implement the bookshelf application. (Note: I'm sure EVERY nook and cranny isn't explored, but if you follow the clear instructions this book provides you'll end up with a running application.) The book leads you through an incremental buildup of the app, so you'll add functionality bit by bit as you improve the application.

The book ends with a nice-to-have chapter on troubleshooting and a few quick write-ups on the dev environment (Maven and Eclipse) and other topics that should be within reach for the reader.

So, what's the verdict? OSGi coding is not trivial, and isn't something to be taken up lightly. (It's yet another Java framework to be embraced, complete with it's own set of twists and turns.) If you're going to learn it, though, this book is a very good from-the-ground-up resource to guide you completely through the learning process. So if you're going the OSGi path, this is a good place to start.

The book can be found here.

Happy Reading!

2 comments:

Thesis Writing said...

Its great to see that people are sharing quite profitable information with each other and now we can move our selves to a new era.

Janely said...

Your website have very interesting article. I got knowledge from here. Besides that, your blog is so popular among the searchers from search engines. It means yours website is very good.Houston Home Security