<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why is OSGi important?</title>
	<atom:link href="http://www.modumind.com/2009/05/04/why-is-osgi-important/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/</link>
	<description>Eclipse RCP and OSGi training - online or onsite</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:37:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-24071</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 21 Jun 2011 14:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-24071</guid>
		<description>@matt Thanks for your thoughtful post. As a trainer I encounter many people with the same frustrations and I sympathize with them. In particular, I agree with the deployment issue. Dave Orme actually has some interesting thoughts on this:

http://www.coconut-palm-software.com/the_new_visual_editor/doku.php

In the end, I guess where we part ways is that I think OSGi can be made to work in the long run.

For instance I think that the tooling can and is being improved. Compilers can be improved, and actually the Eclipse compiler is very OSGi-aware and provides great feedback. 

You argue that modularity is something that can be achieved using common sense and without a framework. This is undoubtedly true, but only by a very small set of developers. It&#039;s also true that OSGi can be abused to create really ugly code, but you could make this argument about a lot of technologies.

I keep coming back to the parallel transition from procedural to object-oriented technologies. Many of these same arguments took place then. We don&#039;t need OO. OO can be abused and made to look procedural. OO puts too much of a burden on developers and limits their freedom.

Eventually OO became mainstream, and I think that modularity will as well. These shifts are incremental changes that increase &quot;the granularity of our aggreations&quot;, as Steve McConnell puts it. Whether this modularity will be in the form of OSGi or some other technology (or built into the JVM itself) remains to be seen. But in the end, modularity is too useful to be ignored.</description>
		<content:encoded><![CDATA[<p>@matt Thanks for your thoughtful post. As a trainer I encounter many people with the same frustrations and I sympathize with them. In particular, I agree with the deployment issue. Dave Orme actually has some interesting thoughts on this:</p>
<p><a href="http://www.coconut-palm-software.com/the_new_visual_editor/doku.php" rel="nofollow">http://www.coconut-palm-software.com/the_new_visual_editor/doku.php</a></p>
<p>In the end, I guess where we part ways is that I think OSGi can be made to work in the long run.</p>
<p>For instance I think that the tooling can and is being improved. Compilers can be improved, and actually the Eclipse compiler is very OSGi-aware and provides great feedback. </p>
<p>You argue that modularity is something that can be achieved using common sense and without a framework. This is undoubtedly true, but only by a very small set of developers. It&#8217;s also true that OSGi can be abused to create really ugly code, but you could make this argument about a lot of technologies.</p>
<p>I keep coming back to the parallel transition from procedural to object-oriented technologies. Many of these same arguments took place then. We don&#8217;t need OO. OO can be abused and made to look procedural. OO puts too much of a burden on developers and limits their freedom.</p>
<p>Eventually OO became mainstream, and I think that modularity will as well. These shifts are incremental changes that increase &#8220;the granularity of our aggreations&#8221;, as Steve McConnell puts it. Whether this modularity will be in the form of OSGi or some other technology (or built into the JVM itself) remains to be seen. But in the end, modularity is too useful to be ignored.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-24058</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Tue, 21 Jun 2011 12:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-24058</guid>
		<description>I disagree with your argument of lacking tool support. Especially with those hidden packages, it&#039;s OSGI versus the compiler. Having a framework or a platform I would actually like it to honor the programming language, it&#039;s built on. Right now, OSGI is taking assumptions, that the java compiler does not (private/public packages). Therefore, there is no way to tell, if the bundle your&#039;re working on, is going to run inside an OSGI container. This is due two reasons: 
A) it depends on private packages, which is something the java compiler does not know about. 
B) a dependency is missing.

Both of them cause runtime issues. Personally, if I had a higher interest in runtime issues, I would have switched to groovy/grails long time ago. They, btw. also solve this &quot;private package&quot; model. 

Another open point imho is deployment. OSGI is lacking some sort of container format (something similiar to a war): a single file containing the entire application, that gets deployed onto the server. Using OSGI in production for a large scale, I can tell you, that anything else is very painful and error prone. Updating several servers at the same time, it&#039;s more handy when there is only one file in a concrete version that must be deployed. 

Having modularization on the one hand is nice, but on the other hand, it&#039;s trying to enforce something via a platform that should actually be part of a developer&#039;s common sense. Anyone too lazy for modularization could still (with OSGI) declare all modules public and use dynamic imports. What this convention actually does is, making it harder to be &quot;a nice developer&quot; because the good developer needs to go with all the extra effort to declare his public/private packages with their version and so on. While the &quot;mean developer&quot; will just export all packages with version 0 and use dynamic import everywhere. 

For downloading bundles from the internet: You could just download and use them, if they had no dependencies to other bundles. Most of the time, I found myself, patching manifest files of very common libraries (not all of the apache-common libs have an OSGI manifest) so that I could just use them. If these libs do classloading magic themselves (and a lot of them do), poor you. 


I think, OSGI is not ready for three reasons: 
It&#039;s lacking tool support (and a compiler that understands the manifests)
Many 3rd party libs don&#039;t come OSGI friendly
OSGI is a very restrictive spec, where you need to declare a lot of stuff. This causes way to much overhead. In many ways, it complicates too much.</description>
		<content:encoded><![CDATA[<p>I disagree with your argument of lacking tool support. Especially with those hidden packages, it&#8217;s OSGI versus the compiler. Having a framework or a platform I would actually like it to honor the programming language, it&#8217;s built on. Right now, OSGI is taking assumptions, that the java compiler does not (private/public packages). Therefore, there is no way to tell, if the bundle your&#8217;re working on, is going to run inside an OSGI container. This is due two reasons:<br />
A) it depends on private packages, which is something the java compiler does not know about.<br />
B) a dependency is missing.</p>
<p>Both of them cause runtime issues. Personally, if I had a higher interest in runtime issues, I would have switched to groovy/grails long time ago. They, btw. also solve this &#8220;private package&#8221; model. </p>
<p>Another open point imho is deployment. OSGI is lacking some sort of container format (something similiar to a war): a single file containing the entire application, that gets deployed onto the server. Using OSGI in production for a large scale, I can tell you, that anything else is very painful and error prone. Updating several servers at the same time, it&#8217;s more handy when there is only one file in a concrete version that must be deployed. </p>
<p>Having modularization on the one hand is nice, but on the other hand, it&#8217;s trying to enforce something via a platform that should actually be part of a developer&#8217;s common sense. Anyone too lazy for modularization could still (with OSGI) declare all modules public and use dynamic imports. What this convention actually does is, making it harder to be &#8220;a nice developer&#8221; because the good developer needs to go with all the extra effort to declare his public/private packages with their version and so on. While the &#8220;mean developer&#8221; will just export all packages with version 0 and use dynamic import everywhere. </p>
<p>For downloading bundles from the internet: You could just download and use them, if they had no dependencies to other bundles. Most of the time, I found myself, patching manifest files of very common libraries (not all of the apache-common libs have an OSGI manifest) so that I could just use them. If these libs do classloading magic themselves (and a lot of them do), poor you. </p>
<p>I think, OSGI is not ready for three reasons:<br />
It&#8217;s lacking tool support (and a compiler that understands the manifests)<br />
Many 3rd party libs don&#8217;t come OSGI friendly<br />
OSGI is a very restrictive spec, where you need to declare a lot of stuff. This causes way to much overhead. In many ways, it complicates too much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drozzy</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23948</link>
		<dc:creator>drozzy</dc:creator>
		<pubDate>Mon, 20 Jun 2011 14:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23948</guid>
		<description>&gt;How to set this one up, is the problem. If you’re really doing OSGI, you’ll need 
&gt;to create dozends of modules. Each one would (normally) come as a maven 
&gt;module, bringing it’s own overhead. Working on such a project effectively 
&gt;means making large jumps around various parts in your codebase. This leads 
&gt;to a lot of overhead when doing maintenance and/or debugging.

Surely, no more overhead than if you were to implement the service infrastructure yourself?

&gt;Next trouble comes with building OSGI modules. OSGI has some 
&gt;assumptions on java, the compiler does not know: Imagine, you have bundle X, 
&gt;containing com.x.foo.FooBarClass. Then you’d define com.x.foo being a 
&gt;private package. So during runtime, FooBarClass will not be available to other 
&gt;bundles. Now you’re working on Bundle Y, having a dependency to Bundle X. 
&gt;Somewhere internally, you end up, referencing FooBarClass. From any java 
&gt;compiler’s perspective this is fine – as long as X.jar is in the classpath. During 
&gt;runtime, however, you’ll either get a CassNotFoundException or (worse) a 
&gt;NoClassDefFoundError. Using OSGI reintroduces a lot of errors that one would 
&gt;normally know from dynamic programming languages.

I think this is the fault of the tooling - not OSGi. If you tool is dumb enough to polute the build-namespaces with the non-exported packages, this will happen. Unfortunately, most of the tools I use - have this problem (e.g. maven + eclipse duo). I am also looking for a solution to this right now.

&gt;Then there’s maven (and all other build tools doing dependency management): 
very fine, to use Bundle X in both Version 1 and 2. All these tools however will 
&gt;detect a version conflict and try to fix it, by only using version 2.

Again, I think this is the fault of the tooling. Maven is not smart enough to understand OSGi dependencies. In fact maven is very stupid about version in general - and to this day I can&#039;t figure out how the hell it works.

&gt;Another problematic area is the OSGI spec: It really IS a big bunch of paper. 

Surely, R1 is not so big? And that should be sufficient to get you acquainted with the overall architecture of OSGi.
Also you don&#039;t really need to know all the details unless you are actually writing an &quot;implementation&quot; of OSGi.

&gt;The concrete OSGI implementations of the other hand will only support a 
&gt;subpart of that spec. Lacking in documentation what features are there and 
&gt;what are missing.

I think implementations are pretty clear as to WHAT they implement:
http://felix.apache.org/site/osgi-specification-implementations.html
http://www.eclipse.org/equinox/


&gt;In my opinion, the advantages of using OSGI come with a very high price. A 
&gt;price, that you’re probably not wanting to pay. Leveraging a DI framework (like 
&gt;spring), that allows multiple contexts and doing some service import/export 
&gt;managment might be a very good alternative choice. Using OSGI, you should 
&gt;really ask the question: “Why” first. and only if there are no alternatives to 
&gt;OSGI (and there are), use that technology.

There are no alternatives to OSGi - maybe jboss (which is using osgi itself). Also DI - is just a small part of what osgi can do. In my opinion the most important aspect is the &quot;modularization&quot; and dependency enforcement.
The notion that my application will not run - unless all the pieces are there - makes me sleep much better, knowing that I never have to debug things like missing or incompatible bytecode.

Only in osgi can I go and download a &quot;bundle&quot; from the internet, and drop it in my container - and not have to do any kind of &quot;install&quot; or &quot;compile&quot; steps. It is truly a &quot;framework platform&quot; of the future! WOHOOO!

Now if only we could have Scala as first rate language for OSGi - it would be much more popular.</description>
		<content:encoded><![CDATA[<p>&gt;How to set this one up, is the problem. If you’re really doing OSGI, you’ll need<br />
&gt;to create dozends of modules. Each one would (normally) come as a maven<br />
&gt;module, bringing it’s own overhead. Working on such a project effectively<br />
&gt;means making large jumps around various parts in your codebase. This leads<br />
&gt;to a lot of overhead when doing maintenance and/or debugging.</p>
<p>Surely, no more overhead than if you were to implement the service infrastructure yourself?</p>
<p>&gt;Next trouble comes with building OSGI modules. OSGI has some<br />
&gt;assumptions on java, the compiler does not know: Imagine, you have bundle X,<br />
&gt;containing com.x.foo.FooBarClass. Then you’d define com.x.foo being a<br />
&gt;private package. So during runtime, FooBarClass will not be available to other<br />
&gt;bundles. Now you’re working on Bundle Y, having a dependency to Bundle X.<br />
&gt;Somewhere internally, you end up, referencing FooBarClass. From any java<br />
&gt;compiler’s perspective this is fine – as long as X.jar is in the classpath. During<br />
&gt;runtime, however, you’ll either get a CassNotFoundException or (worse) a<br />
&gt;NoClassDefFoundError. Using OSGI reintroduces a lot of errors that one would<br />
&gt;normally know from dynamic programming languages.</p>
<p>I think this is the fault of the tooling &#8211; not OSGi. If you tool is dumb enough to polute the build-namespaces with the non-exported packages, this will happen. Unfortunately, most of the tools I use &#8211; have this problem (e.g. maven + eclipse duo). I am also looking for a solution to this right now.</p>
<p>&gt;Then there’s maven (and all other build tools doing dependency management):<br />
very fine, to use Bundle X in both Version 1 and 2. All these tools however will<br />
&gt;detect a version conflict and try to fix it, by only using version 2.</p>
<p>Again, I think this is the fault of the tooling. Maven is not smart enough to understand OSGi dependencies. In fact maven is very stupid about version in general &#8211; and to this day I can&#8217;t figure out how the hell it works.</p>
<p>&gt;Another problematic area is the OSGI spec: It really IS a big bunch of paper. </p>
<p>Surely, R1 is not so big? And that should be sufficient to get you acquainted with the overall architecture of OSGi.<br />
Also you don&#8217;t really need to know all the details unless you are actually writing an &#8220;implementation&#8221; of OSGi.</p>
<p>&gt;The concrete OSGI implementations of the other hand will only support a<br />
&gt;subpart of that spec. Lacking in documentation what features are there and<br />
&gt;what are missing.</p>
<p>I think implementations are pretty clear as to WHAT they implement:<br />
<a href="http://felix.apache.org/site/osgi-specification-implementations.html" rel="nofollow">http://felix.apache.org/site/osgi-specification-implementations.html</a><br />
<a href="http://www.eclipse.org/equinox/" rel="nofollow">http://www.eclipse.org/equinox/</a></p>
<p>&gt;In my opinion, the advantages of using OSGI come with a very high price. A<br />
&gt;price, that you’re probably not wanting to pay. Leveraging a DI framework (like<br />
&gt;spring), that allows multiple contexts and doing some service import/export<br />
&gt;managment might be a very good alternative choice. Using OSGI, you should<br />
&gt;really ask the question: “Why” first. and only if there are no alternatives to<br />
&gt;OSGI (and there are), use that technology.</p>
<p>There are no alternatives to OSGi &#8211; maybe jboss (which is using osgi itself). Also DI &#8211; is just a small part of what osgi can do. In my opinion the most important aspect is the &#8220;modularization&#8221; and dependency enforcement.<br />
The notion that my application will not run &#8211; unless all the pieces are there &#8211; makes me sleep much better, knowing that I never have to debug things like missing or incompatible bytecode.</p>
<p>Only in osgi can I go and download a &#8220;bundle&#8221; from the internet, and drop it in my container &#8211; and not have to do any kind of &#8220;install&#8221; or &#8220;compile&#8221; steps. It is truly a &#8220;framework platform&#8221; of the future! WOHOOO!</p>
<p>Now if only we could have Scala as first rate language for OSGi &#8211; it would be much more popular.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog bookmarks 06/19/2011 &#171; My Diigo bookmarks</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23838</link>
		<dc:creator>Blog bookmarks 06/19/2011 &#171; My Diigo bookmarks</dc:creator>
		<pubDate>Sun, 19 Jun 2011 04:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23838</guid>
		<description>[...] Why is OSGi important? :: Modular Mind [...]</description>
		<content:encoded><![CDATA[<p>[...] Why is OSGi important? :: Modular Mind [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23598</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Thu, 16 Jun 2011 07:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23598</guid>
		<description>Actually, I cannot agree with you. Working on a large scale OSGI project for half a year now has actually shown some benefits. Unfortunately it has also caused a lot of troubles coming from OSGI&#039;s nature that are much more harder to overcome: 

Surely, Encapsulation and Service Exports is a good thing - this is what OSGI is about and this is, what&#039;s working fine. 

How to set this one up, is the problem. If you&#039;re really doing OSGI, you&#039;ll need to create dozends of modules. Each one would (normally) come as a maven module, bringing it&#039;s own overhead. Working on such a project effectively means making large jumps around various parts in your codebase. This leads to a lot of overhead when doing maintenance and/or debugging. 

Next trouble comes with building OSGI modules. OSGI has some assumptions on java, the compiler does not know: Imagine, you have bundle X, containing com.x.foo.FooBarClass. Then you&#039;d define com.x.foo being a private package. So during runtime, FooBarClass will not be available to other bundles. Now you&#039;re working on Bundle Y, having a dependency to Bundle X. Somewhere internally, you end up, referencing FooBarClass. From any java compiler&#039;s perspective this is fine - as long as X.jar is in the classpath. During runtime, however, you&#039;ll either get a CassNotFoundException or (worse) a NoClassDefFoundError. Using OSGI reintroduces a lot of errors that one would normally know from dynamic programming languages.

Then there&#039;s maven (and all other build tools doing dependency management): they are taking wrong assumptions over versionings. Having OSGI, it may be very fine, to use Bundle X in both Version 1 and 2. All these tools however will detect a version conflict and try to fix it, by only using version 2. 

Another problematic area is the OSGI spec: It really IS a big bunch of paper. The concrete OSGI implementations of the other hand will only support a subpart of that spec. Lacking in documentation what features are there and what are missing. 

In my opinion, the advantages of using OSGI come with a very high price. A price, that you&#039;re probably not wanting to pay. Leveraging a DI framework (like spring), that allows multiple contexts and doing some service import/export managment might be a very good alternative choice. Using OSGI, you should really ask the question: &quot;Why&quot; first. and only if there are no alternatives to OSGI (and there are), use that technology.</description>
		<content:encoded><![CDATA[<p>Actually, I cannot agree with you. Working on a large scale OSGI project for half a year now has actually shown some benefits. Unfortunately it has also caused a lot of troubles coming from OSGI&#8217;s nature that are much more harder to overcome: </p>
<p>Surely, Encapsulation and Service Exports is a good thing &#8211; this is what OSGI is about and this is, what&#8217;s working fine. </p>
<p>How to set this one up, is the problem. If you&#8217;re really doing OSGI, you&#8217;ll need to create dozends of modules. Each one would (normally) come as a maven module, bringing it&#8217;s own overhead. Working on such a project effectively means making large jumps around various parts in your codebase. This leads to a lot of overhead when doing maintenance and/or debugging. </p>
<p>Next trouble comes with building OSGI modules. OSGI has some assumptions on java, the compiler does not know: Imagine, you have bundle X, containing com.x.foo.FooBarClass. Then you&#8217;d define com.x.foo being a private package. So during runtime, FooBarClass will not be available to other bundles. Now you&#8217;re working on Bundle Y, having a dependency to Bundle X. Somewhere internally, you end up, referencing FooBarClass. From any java compiler&#8217;s perspective this is fine &#8211; as long as X.jar is in the classpath. During runtime, however, you&#8217;ll either get a CassNotFoundException or (worse) a NoClassDefFoundError. Using OSGI reintroduces a lot of errors that one would normally know from dynamic programming languages.</p>
<p>Then there&#8217;s maven (and all other build tools doing dependency management): they are taking wrong assumptions over versionings. Having OSGI, it may be very fine, to use Bundle X in both Version 1 and 2. All these tools however will detect a version conflict and try to fix it, by only using version 2. </p>
<p>Another problematic area is the OSGI spec: It really IS a big bunch of paper. The concrete OSGI implementations of the other hand will only support a subpart of that spec. Lacking in documentation what features are there and what are missing. </p>
<p>In my opinion, the advantages of using OSGI come with a very high price. A price, that you&#8217;re probably not wanting to pay. Leveraging a DI framework (like spring), that allows multiple contexts and doing some service import/export managment might be a very good alternative choice. Using OSGI, you should really ask the question: &#8220;Why&#8221; first. and only if there are no alternatives to OSGI (and there are), use that technology.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Bartlett</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23581</link>
		<dc:creator>Neil Bartlett</dc:creator>
		<pubDate>Thu, 16 Jun 2011 03:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23581</guid>
		<description>@Patrick: &quot;It’s my opinion that most developers would get a lot out of OSGi if they focused on the Module layer and ignored the Lifecycle and Service layers, at least initially.&quot;

Actually I disagree :-)

I think the first thing developers should learn about OSGi is Services. Of course, using DS to simplify the development of service components, rather than messing about with activators and stuff (so, I agree with you about Lifecycle).

Once they get Services, they can then move on to how to use the module layer to enhance the development cycle, hide implementation classes, evolve APIs etc.

Anyway thanks for the namecheck on bndtools!</description>
		<content:encoded><![CDATA[<p>@Patrick: &#8220;It’s my opinion that most developers would get a lot out of OSGi if they focused on the Module layer and ignored the Lifecycle and Service layers, at least initially.&#8221;</p>
<p>Actually I disagree :-)</p>
<p>I think the first thing developers should learn about OSGi is Services. Of course, using DS to simplify the development of service components, rather than messing about with activators and stuff (so, I agree with you about Lifecycle).</p>
<p>Once they get Services, they can then move on to how to use the module layer to enhance the development cycle, hide implementation classes, evolve APIs etc.</p>
<p>Anyway thanks for the namecheck on bndtools!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Bartlett</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23580</link>
		<dc:creator>Neil Bartlett</dc:creator>
		<pubDate>Thu, 16 Jun 2011 03:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23580</guid>
		<description>It&#039;s nice to see the comment thread on this article has started up again, as it&#039;s brought the following old comment by Pablo to my attention:

&quot;DI needs to break encapsulation in order to work.&quot;

Exactly! But this is not a problem with encapsulation, it is a problem with DI.

The DI framework sits at the centre of the system, grabs an object from here and an object from there and rams them together. To do this it reaches into the innards of each module, tearing out objects at the time it chooses, whether the modules are ready to provide an object of that type -- and at that time -- or not. The result is horribly fragile because if any individual module fails, then the whole DI framework fails.

OSGi&#039;s solution is wonderfully elegant: just reverse the arrows. Instead of a central component that pulls from every module, have the modules push into a central registry. This allows the modules to remain completely encapsulated with NO externally visible packages. It also solves timing issues: the modules provide objects only when they are ready to do so. And it is robust: the failure of one module does not take down the whole system.

It&#039;s really quite beautiful. And you don&#039;t need to dispense with DI as a programming technique, in fact in OSGi we still usually employ DI framework inside our bundles. The key is not to allow the DI to reach across modules.

Thanks again for the article Patrick!</description>
		<content:encoded><![CDATA[<p>It&#8217;s nice to see the comment thread on this article has started up again, as it&#8217;s brought the following old comment by Pablo to my attention:</p>
<p>&#8220;DI needs to break encapsulation in order to work.&#8221;</p>
<p>Exactly! But this is not a problem with encapsulation, it is a problem with DI.</p>
<p>The DI framework sits at the centre of the system, grabs an object from here and an object from there and rams them together. To do this it reaches into the innards of each module, tearing out objects at the time it chooses, whether the modules are ready to provide an object of that type &#8212; and at that time &#8212; or not. The result is horribly fragile because if any individual module fails, then the whole DI framework fails.</p>
<p>OSGi&#8217;s solution is wonderfully elegant: just reverse the arrows. Instead of a central component that pulls from every module, have the modules push into a central registry. This allows the modules to remain completely encapsulated with NO externally visible packages. It also solves timing issues: the modules provide objects only when they are ready to do so. And it is robust: the failure of one module does not take down the whole system.</p>
<p>It&#8217;s really quite beautiful. And you don&#8217;t need to dispense with DI as a programming technique, in fact in OSGi we still usually employ DI framework inside our bundles. The key is not to allow the DI to reach across modules.</p>
<p>Thanks again for the article Patrick!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23553</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Wed, 15 Jun 2011 20:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23553</guid>
		<description>Hi Paul,

I do sympathize with the idea that OSGi is over-engineered, and as a trainer I&#039;ve encountered many developers who feel overwhelmed by the technology. I also believe that it would be much better to have modularity enforced in the language, though I don&#039;t think the current approach for Java 8 is the way to go.

It&#039;s my opinion that most developers would get a lot out of OSGi if they focused on the Module layer and ignored the Lifecycle and Service layers, at least initially. It would also be great if there was extremely simply tooling that made it easy to work with the Module layer. Neil Bartlett&#039;s BndTools is a good start, but it&#039;s still way too complex.

Having said that, my experience with OSGi has been great. I work with it in the context of Eclipse RCP, and it&#039;s completely changed the way I write code. OSGi also allows us to package and deploy code in ways we never could before. I can&#039;t imagine going back.

Thanks for the thoughtful comment.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>I do sympathize with the idea that OSGi is over-engineered, and as a trainer I&#8217;ve encountered many developers who feel overwhelmed by the technology. I also believe that it would be much better to have modularity enforced in the language, though I don&#8217;t think the current approach for Java 8 is the way to go.</p>
<p>It&#8217;s my opinion that most developers would get a lot out of OSGi if they focused on the Module layer and ignored the Lifecycle and Service layers, at least initially. It would also be great if there was extremely simply tooling that made it easy to work with the Module layer. Neil Bartlett&#8217;s BndTools is a good start, but it&#8217;s still way too complex.</p>
<p>Having said that, my experience with OSGi has been great. I work with it in the context of Eclipse RCP, and it&#8217;s completely changed the way I write code. OSGi also allows us to package and deploy code in ways we never could before. I can&#8217;t imagine going back.</p>
<p>Thanks for the thoughtful comment.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul W. Homer</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-23541</link>
		<dc:creator>Paul W. Homer</dc:creator>
		<pubDate>Wed, 15 Jun 2011 17:15:44 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-23541</guid>
		<description>I agree with your premise. Encapsulation is the best tool to control complexity at both the code and the data level. Its slow, but gradual integration into our technologies has allowed us to build increasingly complex systems.

My experience with OSGi however has not been particularly pleasant. My intuition is that it is excessively over-engineered and trying to solve too many problems all at the same time. While some of the goals may be great ideas, the actual implementation is far more important. If the problems outnumber the benefits, then it is time to reconsider the approach. Also, this type of paradigm should probably be based in the language were it can be handled properly, not some external add-on which can only be partially integrated. 

Paul.</description>
		<content:encoded><![CDATA[<p>I agree with your premise. Encapsulation is the best tool to control complexity at both the code and the data level. Its slow, but gradual integration into our technologies has allowed us to build increasingly complex systems.</p>
<p>My experience with OSGi however has not been particularly pleasant. My intuition is that it is excessively over-engineered and trying to solve too many problems all at the same time. While some of the goals may be great ideas, the actual implementation is far more important. If the problems outnumber the benefits, then it is time to reconsider the approach. Also, this type of paradigm should probably be based in the language were it can be handled properly, not some external add-on which can only be partially integrated. </p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srinivas Kothuri</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-20945</link>
		<dc:creator>Srinivas Kothuri</dc:creator>
		<pubDate>Mon, 16 May 2011 05:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-20945</guid>
		<description>Nice explanation for the complex framework.
Also, thank you &quot;Pablo&quot; for asking my question.</description>
		<content:encoded><![CDATA[<p>Nice explanation for the complex framework.<br />
Also, thank you &#8220;Pablo&#8221; for asking my question.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

