This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Other Application Frameworks and the fly likes General Questions on OSGi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "General Questions on OSGi" Watch "General Questions on OSGi" New topic
Author

General Questions on OSGi

Jecki Go
Greenhorn

Joined: Dec 09, 2007
Posts: 5
Hi,

When I first heard about OSGi it was with a lot of excitement, having been in Java development for several years with the fact that building a modular and easy to manage system is way difficult, at least back in the early days.

Then I tried to read more about OSGi, reading through tutorials, watching some online presentation. Boy this is a very tough subject (at least it is to me). Looking at the adoption of OSGi in the industry I might say that OSGi is not mainstream yet and most probably it is not because of the steep learning curve that people like me has to deal with in order to get the first grasp of this old "new" creature. I mean the whole idea is just brilliant, but really it's not easy to grab.

My questions are:
1. How do you see the OSGi is going in future in terms of ease of development and industry adoption?
2. Is OSGi really going to be mainstream java modularity framework?
3. Do you think there's a good chance that OSGi will be used in a day to day basis by huge number of Java Developer in Enterprise Applications? Or will it only reside at a low level framework, library and Application Server use?

Thanks,
Jecki
Richard S. Hall
author
Ranch Hand

Joined: Feb 14, 2011
Posts: 47
Jecki Go wrote:
1. How do you see the OSGi is going in future in terms of ease of development and industry adoption?


I think there is still a little ways to go in terms of both. However, it is my experience that many people come to OSGi thinking it will solve all of their complex project issues without much effort. This is not the case. OSGi, by itself, will not solve any issues. It gives you the tools to solve such issues. It is like going from C to C++, you still have to learn how to create object-oriented code, it won't happen magically.

Jecki Go wrote:
2. Is OSGi really going to be mainstream java modularity framework?


Hard to say at this point. Currently, it is the only real viable one, but we'll have to wait and see. The core concepts of modularity will still be applicable.

Jecki Go wrote:
3. Do you think there's a good chance that OSGi will be used in a day to day basis by huge number of Java Developer in Enterprise Applications? Or will it only reside at a low level framework, library and Application Server use?


If you are using OSGi properly, you probably shouldn't even know it exists. The biggest obstacle to most developers using OSGi is that they don't embrace the encapsulation and explicit type visibility rules that are inherent in modularity. If you do that, then you can easily create modular code without even thinking about OSGi.

I actually created a presentation on this topic: http://felix.apache.org/site/presentations.data/Learning_to_ignore_OSGi.pdf
Stuart McCulloch
author
Greenhorn

Joined: Feb 14, 2011
Posts: 21
Jecki Go wrote:When I first heard about OSGi it was with a lot of excitement, having been in Java development for several years with the fact that building a modular and easy to manage system is way difficult, at least back in the early days. Then I tried to read more about OSGi, reading through tutorials, watching some online presentation. Boy this is a very tough subject (at least it is to me). Looking at the adoption of OSGi in the industry I might say that OSGi is not mainstream yet and most probably it is not because of the steep learning curve that people like me has to deal with in order to get the first grasp of this old "new" creature. I mean the whole idea is just brilliant, but really it's not easy to grab.


Part of this is the fact that modularity itself is a hard subject. It also doesn't help that OSGi frameworks have the job of enforcing modularity, saying "no you can't do that" when you try to bend the rules Like other development policies this can be frustrating when all you want to do is get on and write new features, but it does lead to modular solutions where you really can take a module and re-use it in other projects. The ability to hide away implementation classes also makes "shading" unnecessary (where you refactor a third-party library under a different package to avoid conflicts on the classpath).

Jecki Go wrote:1. How do you see the OSGi is going in future in terms of ease of development and industry adoption?


Definitely we need to improve tooling. We also need to improve some of the messages from OSGi frameworks so developers aren't left scratching their heads - Richard has been working on some of the constraint exception messages in Felix, which although technically correct weren't always easy to understand.

Jecki Go wrote:2. Is OSGi really going to be mainstream java modularity framework?


Right now OSGi has the advantage that it is actually being used in many real-world applications - it may not break into the mainstream itself, but I think any mainstream modularity framework would have to acknowledge the lessons learnt by OSGi and provide a way to consume bundles.

Jecki Go wrote:3. Do you think there's a good chance that OSGi will be used in a day to day basis by huge number of Java Developer in Enterprise Applications? Or will it only reside at a low level framework, library and Application Server use?


OSGi (services) + Dependency Injection is a powerful solution. That way you get the benefits of modularity and the dynamics of OSGi services without being directly tied to OSGi or its API. I think most Enterprise Java developers will end up using OSGi via something like Spring, Guice, or CDI.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General Questions on OSGi