Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Use dependency injection instead of singletons for services
Use dependency injection instead of singletons for services [message #553713] Wed, 18 August 2010 14:56 Go to next message
Ken Wenzel is currently offline Ken Wenzel
Messages: 39
Registered: July 2009
Member
Hello,

instead of using singletons for Graphiti's services which are accessed by Graphiti.getGaService() and others, dependency injection would open the possibility of replacing the standard services by user-defined ones.

Does the Graphiti team plan to use Guice or other frameworks for dependency injection?

Best regards,

Ken
Re: Use dependency injection instead of singletons for services [message #553859 is a reply to message #553713] Thu, 19 August 2010 08:24 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1595
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hello Ken,

thanks for this suggestion. As always it is a good approach to seperate API
from implementation, e.g. by using dependency injection.

Nevertheless, currently we see our services more or less as a static
offering towards the tools. So, at least currently we don't have plans in
this respect. Do you have a concrete usecase in which you would need this?

Best regards,
Michael


"Ken Wenzel" <kenwenzel@gmx.net> wrote in message
news:i4gsb3$7nd$1@build.eclipse.org...
> Hello,
>
> instead of using singletons for Graphiti's services which are accessed by
> Graphiti.getGaService() and others, dependency injection would open the
> possibility of replacing the standard services by user-defined ones.
>
> Does the Graphiti team plan to use Guice or other frameworks for
> dependency injection?
>
> Best regards,
>
> Ken
Re: Use dependency injection instead of singletons for services [message #553864 is a reply to message #553859] Thu, 19 August 2010 08:54 Go to previous messageGo to next message
Ken Wenzel is currently offline Ken Wenzel
Messages: 39
Registered: July 2009
Member
Hello Michael,

the idea was to replace IPeCreateService and IGaCreateService to provide alternative implementations of Graphiti's diagram model.

Best regards,

Ken
Re: Use dependency injection instead of singletons for services [message #554096 is a reply to message #553864] Fri, 20 August 2010 07:27 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1595
Registered: July 2009
Location: Walldorf, Germany
Senior Member
With Tim's idea how to solve that, you might not need to do this. I'm also
curious, just let me know if that works....

Best regards,
Michael


"Ken Wenzel" <kenwenzel@gmx.net> wrote in message
news:i4irfo$fma$1@build.eclipse.org...
> Hello Michael,
>
> the idea was to replace IPeCreateService and IGaCreateService to provide
> alternative implementations of Graphiti's diagram model.
>
> Best regards,
>
> Ken
Re: Use dependency injection instead of singletons for services [message #563539 is a reply to message #553859] Thu, 19 August 2010 08:54 Go to previous message
Ken Wenzel is currently offline Ken Wenzel
Messages: 39
Registered: July 2009
Member
Hello Michael,

the idea was to replace IPeCreateService and IGaCreateService to provide alternative implementations of Graphiti's diagram model.

Best regards,

Ken
Re: Use dependency injection instead of singletons for services [message #563611 is a reply to message #563539] Fri, 20 August 2010 07:27 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1595
Registered: July 2009
Location: Walldorf, Germany
Senior Member
With Tim's idea how to solve that, you might not need to do this. I'm also
curious, just let me know if that works....

Best regards,
Michael


"Ken Wenzel" <kenwenzel@gmx.net> wrote in message
news:i4irfo$fma$1@build.eclipse.org...
> Hello Michael,
>
> the idea was to replace IPeCreateService and IGaCreateService to provide
> alternative implementations of Graphiti's diagram model.
>
> Best regards,
>
> Ken
Previous Topic:Alternative implementations of diagram meta model?
Next Topic:How to resize Polygon shapes and How to have a multiline text
Goto Forum:
  


Current Time: Sun Sep 21 04:04:00 GMT 2014

Powered by FUDForum. Page generated in 0.06093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software