Re: Endovena: a dependency injection framework.

2014-11-19 Thread George Sapkin via Digitalmars-d-announce
On Friday, 17 October 2014 at 22:55:24 UTC, Orfeo wrote: Hi all, I'd like to announce the initial version of endovena, a dependency injection framework. It's based on dejector, a great work by Jakub Stasiak, with some new features borrowed from dryioc (C# IoC) I would be glad to see any

Re: Endovena: a dependency injection framework.

2014-11-19 Thread o3o via Digitalmars-d-announce
Am I missing something or is this a Service Locator anti-pattern? More about it here: http://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Pattern/ Service Locator is *really* an anti-pattern, but endovena (and also dejector) is a Dependency Injector (DI) framework, opposite of Service

Re: Endovena: a dependency injection framework.

2014-11-02 Thread Gary Willoughby via Digitalmars-d-announce
On Saturday, 1 November 2014 at 19:19:51 UTC, JN wrote: But then you have to pass the container around? Or you make it a singleton? Basically yes.

Re: Endovena: a dependency injection framework.

2014-11-01 Thread JN via Digitalmars-d-announce
I may be ignorant, can someone explain what's the difference between: Container container; container.register!(IGreeter, Greeter); auto greeter = container.get!IGreeter(); writefln(greeter.greet) and auto greeter = new Greeter(); writefln(greeter.greet) ?

Re: Endovena: a dependency injection framework.

2014-11-01 Thread Gary Willoughby via Digitalmars-d-announce
On Saturday, 1 November 2014 at 16:36:02 UTC, JN wrote: I may be ignorant, can someone explain what's the difference between: Container container; container.register!(IGreeter, Greeter); auto greeter = container.get!IGreeter(); writefln(greeter.greet) and auto greeter = new Greeter();

Re: Endovena: a dependency injection framework.

2014-11-01 Thread JN via Digitalmars-d-announce
On Saturday, 1 November 2014 at 18:54:04 UTC, Gary Willoughby wrote: It's the fundamental way dependency injection containers are used. Instead of having complex dependencies on other resources you can just rely on the container to serve resources as needed. For example if you have a class

Re: Endovena: a dependency injection framework.

2014-11-01 Thread Kagamin via Digitalmars-d-announce
Usually an object receives all needed dependencies with the constructor and thus doesn't need the container itself. Well, either way, it's better to pass one object around instead of ~10 or more.

Re: Endovena: a dependency injection framework.

2014-10-23 Thread Kagamin via Digitalmars-d-announce
Unity uses UnityContainer. So there can be a discriminator in the name.

Re: Endovena: a dependency injection framework.

2014-10-23 Thread Rory McGuire via Digitalmars-d-announce
Eeek please don't rename, people that find names confusing can use `import endovena = o3o.endovena;` or something like that. Keep names concise, although there are a lot of C++ devs in the D community so perhaps you could just call it Contnr :D we all know how c++ guys like their shortened names

Re: Endovena: a dependency injection framework.

2014-10-22 Thread Orfeo via Digitalmars-d-announce
-8- Container gets confusing with std.container. -8- I agree with you, but 'Container' is widely used in DI context, for example: * SimpleInjector (C#) uses Container * LightInjector uses ServiceContainer * Autofac uses ContainerBuilder * LightCore uses

Re: Endovena: a dependency injection framework.

2014-10-21 Thread Dan Cirnat via Digitalmars-d-announce
On Friday, 17 October 2014 at 22:55:24 UTC, Orfeo wrote: Hi all, I'd like to announce the initial version of endovena, a dependency injection framework. It's based on dejector, a great work by Jakub Stasiak, with some new features borrowed from dryioc (C# IoC) I would be glad to see any

Re: Endovena: a dependency injection framework.

2014-10-21 Thread Chris Williams via Digitalmars-d-announce
On Friday, 17 October 2014 at 22:55:24 UTC, Orfeo wrote: * [endovena] https://github.com/o3o/endovena Boost License 1.0 I would suggest naming the class something other than Container. Injector or Factory or something. Container gets confusing with std.container.