Author/s : Jeff McAffer, Paul Vanderlei & Simon Archer
Publisher : Addison-Wesley Professional
Category :Miscellaneous Java Review by : Jeanne Boyarsky
Rating : 8 horseshoes
"OSGi and Equinox" is the first "Eclipse Series" book I have read. It has three parts.
The first part is an introduction. The brief history shows how OSGI came to be and the benefits. It had excellent visuals to see the concepts being presented.
The second part is an extended tutorial to create the TOAST application from scratch. The tutorial assumes you've never used Eclipse before so it was a bit slow to get started. I would have liked seeing how to create a project/class as an appendix. There were a ton of IDE screenshots so I certainly felt like I was doing the tutorial with the author. That style got a little dry/repetitive; maybe because I wasn't following along on a computer. Many concepts were covered and there were good tips and warnings to the reader. I was a bit puzzled why the tests are using EasyMock with Java 5 and JUnit 4. I'll be sure to ask the author when he is at JavaRanch the week of April 20th.
The third part is "deep dives" into specific concepts. This section was less tutorial-y and I liked it better. It includes patterns, the lifecycle and crosscutting concerns. There is also an "other"/kitchen sink chapter that contains numerous tips and tracks.
Overall, I did learn a lot from the book. If you are looking to learn OSGi/Equinox, I think it is good to read.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of JavaRanch.
"I was a bit puzzled why the tests are using EasyMock with Java 5 and JUnit 4."
I think you're asking why, since the Toast application is implemented with Java 1.4, would we suddenly jump to Java 5 to do the testing.
We use Java 1.4 in a lot of real-world embedded applications because the VM and JRE are considerably smaller than Java 5. So it's a purely runtime constraint. At development time, there's no such restriction. EasyMock requires at least Java 5, so we just use Java 5 to run our tests. But our application is compiled against the Java 1.4 target so we know it will run on a Java 1.4 VM and JRE when we deploy it to the field.
I understand being on different versions. I think my puzzlement was about it being less consistent. For example, on page 128, the example uses JUnit 3.8 and EasyMock for Java 5. I thought I saw JUnit 4 somewhere, but I might be mis-remembering.
And I forgot to ask the author when you got here earlier in the week! Thanks for finding this post and letting me know .
This book has a detailed explanation of how to develop modular Java systems and applications using OSGi and Equinox. It is a very good book not only for OSGI beginners but also for people who want understand eclipse plugin development. Those that do not have experience with OSGi previously, will feel at home when they begin reading the book.
The book itself feels like a tutorial with plenty of screen grabs to go with it. As such it makes for an easy read as the author guides you through the OSGi concepts. The chapters towards the end focus more on the details, while the rest of the book is a practical guide to OSGi.
The examples can be tried with an Eclipse plug-in which is installed from the web. I would advise folks to read the book and practice the examples at the same time. They go hand in hand.
Overall a great book to learn OSGi and Equinox.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch.