Hi Katya! To pick up your question:
DS isolates your code from OSGi fully - e.g.: * Create a new bundle * Include a existing "myservice.jar" * Define a component.xml where you reference your service. * Other components can use your service now. Your own service does not need a "import org.osgi.*" - so you're isolated from OSGi. If you take a look at the BundleActivator you'll see that it does basically the same thing - but you have to write code on your own. (Both approaches have it's pros and cons). (The Activator is osgi-related and instantiates your not osgi related services). greetings, Michael Am 16.11.2010 um 12:31 schrieb Todorova, Katya: > Hi Jeff, > > I looked at the Toast example and I think it's a great guide for development. > It's nice to use DI, what I can't see is how using DS isolates you from OSGi? > I think that defining OSGi sevices declaratively helps you only not to care > about tracking your dependencies manually. Though in some cases it adds > unneeded complexity. > > Let me take for example Eclipse touchpoint and the actions it provides - what > is the point to declare them as DS components as they should be immidiate and > don't need anything injected by the framework? They are still OSGi services. > Maybe I miss something? > > Thanks a lot, > Katya > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Jeff McAffer > Sent: Thursday, November 11, 2010 5:30 PM > To: P2 developer discussions > Subject: Re: [p2-dev] SAP Contribution > > http://wiki.eclipse.org/Toast#Getting_started > > The code in and of itself is not that useful in this case. It is more an > example of a good sized system that uses OSGi but isolates itself from OSGi > via DI and DS. > > I'd be happy to talk about particular scenarios etc and point to relevant > places in the code. > > Jeff > > > > On 2010-11-10, at 1:09 PM, Pascal Rapicault wrote: > >> Thx for the pointers Jett. This is indeed one of the direction Katya and I >> had discussed. >> Do you have precise pointers in the Toast code? >> >> On 2010-11-10, at 12:16 PM, Jeff McAffer wrote: >> >>> Overall this is a great direction. >>> >>>> At Eclipse Summit Pascal mentioned that replacing extension points with >>>> services for example could lead to unexpected side effects. >>>> So before contributing back changes like this one, I would like to >>>> discuss them in the mailing list - is there a better solution, do they fit >>>> into p2 architecture, etc. >>> >>> Ideally we would move to more of a dependency injection technique so p2 is >>> not coupled to services or extensions. For example, in the Toast example >>> (http://wiki.eclipse.org/Toast) for the OSGi book (http://equinoxosgi.org) >>> we used a interface that provides the things needed. We provided service >>> backed and extension backed implementations. Much nicer. >>> >>> Jeff >>> _______________________________________________ >>> p2-dev mailing list >>> [email protected] >>> https://dev.eclipse.org/mailman/listinfo/p2-dev >> >> _______________________________________________ >> p2-dev mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/p2-dev > > _______________________________________________ > p2-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/p2-dev > _______________________________________________ > p2-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/p2-dev -- Best regards / Mit freundlichen GrĂ¼ssen Michael Mangeng ------------------------------------------------------------------------ Project Management and Software-Development automationNEXT GmbH, Millennium Park 4, A 6890 Lustenau, Austria Tel +43/5577/89953 - 23 | Fax - 51 e-mail: [email protected] Internet: http://www.automationnext.com FN 326040x | LG Feldkirch | ATU 65 020 666 ------------------------------------------------------------------------ _______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
