On Tue, Feb 3, 2009 at 6:11 PM, Guillaume Sauthier
<[email protected]> wrote:
> Clement Escoffier a écrit :
>>
>> Hi,
>> On 03.02.2009, at 16:40, Stuart McCulloch wrote:
>>
>>> 2009/2/3 Rob Walker <[email protected]>
>>>
>>>> The servicebinder model has served us very well and still does. I note
>>>> though that there are perhaps newer approaches such as Declarative
>>>> Services
>>>> and iPojo. Very interested in views on:
>>>>
>>>>  * benefits of moving from servicebinder (especially any real
>>>>   experiences from others who have done this)
>>>>  * pros and cons of either DS or iPojo as the model to move to
>>>>
>>>
>>> interesting, Karl and I were just chatting about this...
>>>
>>> iPOJO provides a really comprehensive component model, where you
>>> can add almost any sort of behaviour using handlers - the downside in
>>> my opinion is that it requires you to instrument your bundles in the
>>> build
>>> phase - these bundles cannot then be used without iPOJO
>>
>> The instrumentation is made in a way that you don't need iPOJO to use a
>> manipulated class (see
>> http://felix.apache.org/site/dive-into-the-ipojo-manipulation-depths.html).
>> The only downside, is that the iPOJO management will not happen.
>>
>
> Just to be 100% clear, does this means that your instrumented class can be
> reused outside of OSGi ?
> I mean,will the following pseudo code work outside of OSGi, with the
> manipulated classes ?
>
> MyComponent mc = new MyComponent();
> mc.setProperty("hello");
> mc.doSomething();

Yes, that is possible. You would have to provide the packages needed
by the iPOJO classes (as mentioned by Stuart). However, the needed
iPOJO run time bundle is very small so that should not be an issue at
all. In case you don't even want that, all you have to do is to
include the packages inside the bundle and make the imports optional.
This way, the classes can be used with or without iPOJO installed
inside your target platform.

Personally, all I can say is that iPOJO makes OSGi development an
order of magnitude faster for me. What i like most about it is that I
can take boilerplate code and just move it into a handler. This allows
me to actually extend the framework by what I need  (whatever that
might be in a given situation) in a well defined way. Being able to
create compositions is great as well. Also, given the latest
performance figures, iPOJO is  just really fast and lightweight plus
it doesn't depend on java 1.5 (even though it supports annotations) --
hence, can be used in all environments. Definitely have a look at
richard slides 
(http://felix.apache.org/site/presentations.data/ipojo-berlin-20080611.pdf).

regards,

Karl


> Thanks
> --Guillaume
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Karl Pauls
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to