<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://osgi.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0">
<channel>
 <title>OSGi Zone - Comments for &quot;Creating a Domain Specific Language for OSGi&quot;</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu</link>
 <description>Comments for &quot;Creating a Domain Specific Language for OSGi&quot;</description>
 <language>en</language>
<item>
 <title>I think the point that this</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1777</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;I think the point that this DSL could be used as configuration language for iPOJO is valid, especially since iPOJO separates out the configuration language for just this purpose (e.g., currently it supports manifest entries, an XML file, and annotations).&lt;/p&gt;&lt;p&gt;The real issue is whether you prefer to learn yet another language or yet another XML markup format. That is probably a personal choice.&lt;/p&gt;&lt;p&gt;The type safety aspect of the DSL is nice, but since iPOJO is integrated into the Maven build process, it at least is able to perform type checking during the packaging process, so you are not completely out in the cold with respect to type checking even if you select the XML approach. &lt;/p&gt;</description>
 <pubDate>Tue, 11 Mar 2008 14:32:47 -0400</pubDate>
 <dc:creator>rh21685</dc:creator>
 <guid isPermaLink="false">comment 1777 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>Your article about DSL
gives</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1755</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Your article about DSL
gives a good overview. IMO, DSL are really useful when they abstract technical
details. But, of course, all languages are a DSL (just sometimes finding the
domain is difficult). &lt;/p&gt;

&lt;p&gt;In fact, what I tried to
point out is that component (type) description is a kind of technical DSL too.
More precisely, in the case of iPOJO, it&#039;s a composition of DSLs: each handler
provides its own DSL for its own purpose and they are composed together. I
don&#039;t believe that one DSL only is enough to describe any OSGi
applications (in an efficient way). So, do you plan to investigate how adding
other features to your DSL? &lt;/p&gt;

&lt;p&gt;IMO, the challenge is to
ease the development of OSGi applications to be modular, and dynamic. So for
this purpose, I see two different interesting directions (it is not
exhaustive) : simplify the development model and externalize a maximum of
non-functional concerns, and provide integrated tools (i.e. IDE, SCM, ...)
providing guidelines, generation tools, and architecture styles. &lt;/p&gt;

&lt;p&gt;BTW, iPOJO is able to sends
event too. This is not often used as the Event Admin service is very simple to
use. The handler intercept when a field is set. The set value is considered as
the event (either your field is an Event, either your value is added to an
event created by the handler). It has the advantage to externalize the
synchronous/asynchronous publication, the topic...&lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 13:23:24 -0400</pubDate>
 <dc:creator>clement.escoffier</dc:creator>
 <guid isPermaLink="false">comment 1755 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>Clement, there is no need to</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1751</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Clement, there is no need to defend iPOJO since I said nothing bad about it ;-) But you must seperate between the features offered by iPOJO and the way to configure them. Otherwise you will compare apples and oranges. Take for example the handler mechanism you described. There is no reason not to use this handler with a DSL. Well written, the handler API could be even used as the DSL. That was the whole point of my article.&lt;/p&gt;&lt;p&gt;IMHO, a DSL does not need to be business oriented. It is a &lt;i&gt;language&lt;/i&gt; dedicated to special &lt;i&gt;domain&lt;/i&gt; (here OSGi) that, of course, can be a technical one&lt;i&gt;.&lt;/i&gt; So instead of dealing with objects and methods we are creating a &lt;i&gt;fluent interface&lt;/i&gt; for dealing with services, events, etc. The code&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;context event &amp;quot;TOPIC&amp;quot; ! new MyEvent &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;is a good example for a fluent interface. Here: Sending an event. While iPOJO helps receiving events, it does not help sending events.&lt;/p&gt;&lt;p&gt;You are free to think different about the term DSL (all IMHO here, of course ;-) but I think this &lt;a href=&quot;http://martinfowler.com/bliki/DslBoundary.html&quot; target=&quot;_blank&quot;&gt;article&lt;/a&gt; gives a good overview.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 11:30:30 -0400</pubDate>
 <dc:creator>roman.roelofsen</dc:creator>
 <guid isPermaLink="false">comment 1751 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>I agree that this is not</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1749</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;I agree that this is not really my understanding of a DSL either - this is more like syntactic sugar. &lt;/p&gt;&lt;p&gt;Interesting to note that iPOJO however, actually does make for a foundation of a DSL because of its service level dependencies...&lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 11:07:45 -0400</pubDate>
 <dc:creator>pauls</dc:creator>
 <guid isPermaLink="false">comment 1749 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>First, to improve Karl&#039;s</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1748</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;First, to improve Karl&#039;s comment ( ;-) ), iPOJO provides a quiet simple programming
model hiding all interactions with the OSGi framework. In addition, iPOJO is
extensible, and so is able to manage the event interaction that you described.&lt;/p&gt;

&lt;p&gt;To achieve this, iPOJO instances are executed inside a container. This
container is composed by &amp;quot;handlers&amp;quot;. A handler is a special POJO
which aims to manage one non-functional concern. As you mentioned, it could be
an event based interaction (refer to http://felix.apache.org/site/ipojo-event-handler.html).
&lt;/p&gt;

&lt;p&gt;By using this mechanism, the POJO stills a very  simple class despite
it uses event based interactions. IPOJO handlers can be developed separately
from the iPOJO core and so allow customizing containers for any requirement
(persistence, security, event, wire admin ...). &lt;/p&gt;

&lt;p&gt;I agree that iPOJO component type description (using XML) is not very
elegant despite it tries to be the simplest as possible. For example, to
provide a service just write: &lt;/p&gt;

&lt;blockquote&gt;&lt;pre class=&quot;xml&quot;&gt;&amp;lt;component classname=&amp;quot;...MyClassName&amp;quot;&amp;gt;&lt;br /&gt;	&amp;lt;provides/&amp;gt; &lt;br /&gt;&amp;lt;/component&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;





&lt;p&gt; It is not necessary to describe provided interface as they can be
computed by iPOJO (the POJO must implement the service interface). By using the
same mechanism, requiring a service is quiet simple: &lt;/p&gt;

&lt;blockquote&gt;&lt;pre class=&quot;xml&quot;&gt;&amp;lt;component classname=&amp;quot;...MyClassName&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;requires field=&amp;quot;myService&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/component&amp;gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;





&lt;p&gt;The service objects will automatically be injected inside the “myService”
field. No need to describe the required interface as iPOJO can compute it
automatically. The POJO can just use the myService field as any other field of
the class. &lt;/p&gt;

&lt;p&gt;So, to go further, we can use an &amp;quot;external&amp;quot; handler (developped and provided separately) to allow receiving events:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre class=&quot;xml&quot;&gt;&amp;lt;component className=&amp;quot;...MyClassName&amp;quot;&amp;gt;
&amp;lt;ev:subscriber topic=&amp;quot;mytopic&amp;quot; callback=&amp;quot;receive&amp;quot;/&amp;gt;
&amp;lt;/component&amp;gt;&lt;/pre&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p&gt;Event
published on the “mytopic” topic will be received automatically. At each time a
new event is published, the receive method is called.&lt;/p&gt;



&lt;p&gt;Secondly,
you’re proposing a DSL to develop OSGi applications. Perhaps I&#039;m wrong but a DSL
should be in terms of the business logic of your application, not in technical
terms such as pointed out &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www-adele.imag.fr/Les.Publications/intConferences/SCC2007Mar.pdf&quot;&gt;http://www-adele.imag.fr/Les.Publications/intConferences/SCC2007Mar.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 10:52:31 -0400</pubDate>
 <dc:creator>clement.escoffier</dc:creator>
 <guid isPermaLink="false">comment 1748 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>Yes, there is some overlap</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1742</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Yes, there is some overlap with iPOJO, DS, etc when it comes to an interaction with the service registry. However, there are still several use-cases where you need this direct interaction. For example if you want to register a service in the case of certain events. Additionally, a DSL is helpful whenever you need to use an API, e.g.:&lt;/p&gt;&lt;p&gt;context event &amp;quot;TOPIC&amp;quot; ! new MyEvent&lt;/p&gt;&lt;p&gt;is much more readable than doing an event service lookup, null check, sending, &amp;quot;ungetting&amp;quot;, ...&lt;/p&gt;&lt;p&gt;Of course, this DSL is an alternative to the XML approach of Spring, DS, etc. But because its dedicated to OSGi I would always prefer the DSL rather than &amp;quot;yet another XML syntax&amp;quot;. Additionally, I get type-checking for free and can validate my configuration a priori.&lt;/p&gt;&lt;p&gt;This DSL does not need to be a competitor to iPOJO. Instead, iPOJO could offer a configuration in XML and DSL. Since iPOJO adds more to OSGi than just the configuration (e.g. the component model) I really would like to see a combination. &lt;/p&gt;&lt;p&gt;Regarding your comment on a possible NPE, I assume you meant the Java code for &lt;/p&gt;&lt;p&gt;context service classOf[SuperService] get {s =&amp;gt;&lt;br /&gt;  println(s.msg)&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;And yes, thanks for pointing this out. So the Java equivalent would be even longer than the DSL version!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 09:50:39 -0400</pubDate>
 <dc:creator>roman.roelofsen</dc:creator>
 <guid isPermaLink="false">comment 1742 at http://osgi.dzone.com</guid>
</item>
<item>
 <title>In general, I think this is</title>
 <link>http://osgi.dzone.com/news/creating-domain-specific-langu#comment-1739</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;In general, I think this is an interesting idea, however, somewhat obsolete due to the current IOC frameworks around. iPOJO, DS, DependencyManager, and Spring-DM do go a long way when it comes to avoiding direct interaction with the OSGi service registry. Regarding your last examples, iPOJO does a pretty good job in doing all of this and more declaratively - might be interesting to see whether iPOJO&#039;s xml approach could be turned into a more readable DSL?&lt;/p&gt;&lt;p&gt;As an aside, your java code for context service classOf[SuperService] add new String(&amp;quot;A fake super service&amp;quot;) actually does have the potential for a NPE due to the fact that context.getService(ServiceReference) is allowed to return null if the service is not available anymore :-)&lt;/p&gt;</description>
 <pubDate>Mon, 10 Mar 2008 09:01:10 -0400</pubDate>
 <dc:creator>pauls</dc:creator>
 <guid isPermaLink="false">comment 1739 at http://osgi.dzone.com</guid>
</item>
</channel>
</rss>
