<?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>Tue, 09 Mar 2010 15:55:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Markus Jevring</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-2268</link>
		<dc:creator>Markus Jevring</dc:creator>
		<pubDate>Mon, 19 Oct 2009 08:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-2268</guid>
		<description>Excellent writeup. It exposed a feature of OSGi that I wasn&#039;t aware of before. There has been a lot of talk about OSGi, but very little in the way of making people understand what it actually does. You did a great job. There&#039;s another blog entry that I just read that explains another side of OSGi, namely using different version of a given library. It&#039;s here: http://seewah.blogspot.com/2009/05/osgi-next-big-thing-beginners-view.html</description>
		<content:encoded><![CDATA[<p>Excellent writeup. It exposed a feature of OSGi that I wasn&#8217;t aware of before. There has been a lot of talk about OSGi, but very little in the way of making people understand what it actually does. You did a great job. There&#8217;s another blog entry that I just read that explains another side of OSGi, namely using different version of a given library. It&#8217;s here: <a href="http://seewah.blogspot.com/2009/05/osgi-next-big-thing-beginners-view.html" rel="nofollow">http://seewah.blogspot.com/2009/05/osgi-next-big-thing-beginners-view.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bäckstrand</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-648</link>
		<dc:creator>John Bäckstrand</dc:creator>
		<pubDate>Wed, 10 Jun 2009 07:15:04 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-648</guid>
		<description>I don&#039;t see how DI and encapsulation are exclusive, as you make it sound like: isn&#039;t the point with services that they are in fact configured elsewhere, meaning DI is &quot;inherent&quot;?

Pablo: I think anemic domain model is about more than just exposing every field in a class: a domain object could very well be non-anemic and still have every field mutable, I think. Anemic is more about the operations _other_ than the setters/getters: if there are higher abstractions, its probably not anemic. If it is just a class with no operations other than changing values, then it is anemic. Otoh, it could be anemic with no setters!</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see how DI and encapsulation are exclusive, as you make it sound like: isn&#8217;t the point with services that they are in fact configured elsewhere, meaning DI is &#8220;inherent&#8221;?</p>
<p>Pablo: I think anemic domain model is about more than just exposing every field in a class: a domain object could very well be non-anemic and still have every field mutable, I think. Anemic is more about the operations _other_ than the setters/getters: if there are higher abstractions, its probably not anemic. If it is just a class with no operations other than changing values, then it is anemic. Otoh, it could be anemic with no setters!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-653</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Wed, 06 May 2009 03:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-653</guid>
		<description>Patrick,

I should give OSGi a serious try in order to speak with a bit more of a background. Nevertheless I believe encapsulation/information hiding is highly overrated (and IMHO underused) this days.

DI needs to break encapsulation in order to work.

More dynamic languages tend to be more flexible in this topic (in groovy for example, you can access any field, even private ones).

Even in Java, average coders tend to create an accessor/mutator pair to every field, exposing the inner components of every class (this is often called anemic domain model).</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>I should give OSGi a serious try in order to speak with a bit more of a background. Nevertheless I believe encapsulation/information hiding is highly overrated (and IMHO underused) this days.</p>
<p>DI needs to break encapsulation in order to work.</p>
<p>More dynamic languages tend to be more flexible in this topic (in groovy for example, you can access any field, even private ones).</p>
<p>Even in Java, average coders tend to create an accessor/mutator pair to every field, exposing the inner components of every class (this is often called anemic domain model).</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-652</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 05 May 2009 23:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-652</guid>
		<description>Hi Pablo,

It&#039;s true that you can achieve some level of information hiding by making classes package protected, but what you&#039;re really doing is making the Java package your unit of abstraction. There are a number of problems with this:

* Packages are fairly fine-grained, closer to classes than JARs. To achieve the kind of encapsulation we&#039;re talking about you would need to hide a *lot* of classes. Unless you put all of your code into a few very large packages, managing the relationships between classes inside the JAR would be difficult.

* Packages are not the unit of deployment. One of the benefits of modular JARs is that we are aligning our unit of abstraction with our unit of deployment. Because modules/bundles have public APIs, different implementations of those APIs can swapped in by deploying new JAR files. This becomes something like the relationship between interfaces and classes.

Again, I&#039;m not arguing that you can&#039;t achieve some level of encapsulation using package protected classes. But I would argue that it&#039;s very difficult to build modular software in this way. One of the benefits of object-orientation was that it made it easier to things the right way than the wrong way. OSGi is the same, it almost forces you to make the right decisions. While this might be frustrating initially, I think its definitely worth it in the long run.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Pablo,</p>
<p>It&#8217;s true that you can achieve some level of information hiding by making classes package protected, but what you&#8217;re really doing is making the Java package your unit of abstraction. There are a number of problems with this:</p>
<p>* Packages are fairly fine-grained, closer to classes than JARs. To achieve the kind of encapsulation we&#8217;re talking about you would need to hide a *lot* of classes. Unless you put all of your code into a few very large packages, managing the relationships between classes inside the JAR would be difficult.</p>
<p>* Packages are not the unit of deployment. One of the benefits of modular JARs is that we are aligning our unit of abstraction with our unit of deployment. Because modules/bundles have public APIs, different implementations of those APIs can swapped in by deploying new JAR files. This becomes something like the relationship between interfaces and classes.</p>
<p>Again, I&#8217;m not arguing that you can&#8217;t achieve some level of encapsulation using package protected classes. But I would argue that it&#8217;s very difficult to build modular software in this way. One of the benefits of object-orientation was that it made it easier to things the right way than the wrong way. OSGi is the same, it almost forces you to make the right decisions. While this might be frustrating initially, I think its definitely worth it in the long run.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-651</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Tue, 05 May 2009 19:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-651</guid>
		<description>Hi, I&#039;m the author of SO question where you linked this post, and I&#039;ve read it.

My question is: can&#039;t this kind of &#039;JAR encapsulation&#039; be achieved by simply choosing which classes of our JAR are public and which are private / package-private, in other words, by defining our JAR public API?

I&#039;ve been doing this for years without a problem, and (more important) without the need for OSGi.

Based on other comments I thought that OSGi was useful only in a heavy-enterprise-application where you need to swap modules and downtime is not an option.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m the author of SO question where you linked this post, and I&#8217;ve read it.</p>
<p>My question is: can&#8217;t this kind of &#8216;JAR encapsulation&#8217; be achieved by simply choosing which classes of our JAR are public and which are private / package-private, in other words, by defining our JAR public API?</p>
<p>I&#8217;ve been doing this for years without a problem, and (more important) without the need for OSGi.</p>
<p>Based on other comments I thought that OSGi was useful only in a heavy-enterprise-application where you need to swap modules and downtime is not an option.</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-650</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 05 May 2009 14:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-650</guid>
		<description>Hi Tom,

During development, the Eclipse compiler is completely OSGi aware and provides appropriate warning and error messages based on what packages are exposed (or not) in a bundle. The visibility of packages is set in the JAR manifest file, and these settings are used instead of what you would normally set with the Java Build Path dialog.

It works extremely well. All you need is Eclipse and the Plug-in Development Environment to get started.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>During development, the Eclipse compiler is completely OSGi aware and provides appropriate warning and error messages based on what packages are exposed (or not) in a bundle. The visibility of packages is set in the JAR manifest file, and these settings are used instead of what you would normally set with the Java Build Path dialog.</p>
<p>It works extremely well. All you need is Eclipse and the Plug-in Development Environment to get started.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.modumind.com/2009/05/04/why-is-osgi-important/comment-page-1/#comment-649</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 05 May 2009 13:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.com/?p=481#comment-649</guid>
		<description>Hi. I must say I totally agree with you. It&#039;s funny people adopted encapsulation on class level but don&#039;t feel the need for the same on jar level.
Not being an expert on OSGi, I have ask what level of support is there for design/compile time enforcement at the moment? Let&#039;s say how soul we achieve that in Eclipe?</description>
		<content:encoded><![CDATA[<p>Hi. I must say I totally agree with you. It&#8217;s funny people adopted encapsulation on class level but don&#8217;t feel the need for the same on jar level.<br />
Not being an expert on OSGi, I have ask what level of support is there for design/compile time enforcement at the moment? Let&#8217;s say how soul we achieve that in Eclipe?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
