The CommonServiceLocator project was released this week on CodePlex with the general idea of providing an IoC container agnostic API for resolving dependencies using Service Location. Erich Eichinger from SpringSource contributed the Spring.NET implementation, thanks Erich!
Here is the API so you get the basic idea public interface IServiceLocator : System.IServiceProvider {
At that time we did sign a book deal and basically never found the time to write it. We are right now in the process of renegotiating/reviving that contract and hope to have a book out by summer next year.
I am a huge fan of the idea of Common Service Locator since Jeremy's initial blog post. Finally I was able to write really reusable components. I found it most useful in code libraries where one cannot make assumptions on which DI container his users will use.
One thing I was missing in CSL was ability to register new mappings in the container. Such function would be very useful when designing factory objects where the factory class creates a child container for its exclusive use and then registers mappings for classes it produces.
My friend Piotr and I decided to extent CSL with such function. We called our project MetaContainer and published it on codeplex. MetaContainer is built on top of CSL.
I write this e-mail to ask you to help us develop adapters for particular containers. We managed to write three of them (due to out limited knowledge and resources). Because MetaContainer is only an extension to CSL, writing an adapter wouldn't be difficult is one knew particular container very well.
There is one additional issue: CLS project seems to be a little abandoned. During development on MetaContainer we found several problems which should be addressed either on conceptual level or implementation level (like scope of mapping name: can be type-scoped or global-scoped). These problems are also relevant to CSL and should be solved to allow seemles use.
Joe Schmoe says:
Added on October 3rd, 2008 at 2:45 pmIts Apache Avalon^H^H^H^H^H^H^H^H^H Common Service Locator!
Mark Pollack (blog author) says:
Added on October 3rd, 2008 at 2:46 pmYup, as Arjen Poutsma said, "Service Locator is so 90's"
André says:
Added on October 22nd, 2008 at 10:50 amI've recently read an article on InfoQ from 2006 about Spring.NET where you talked about a book that you where publishing.
Can you name the title of the book or the ISBN ?
Thanks.
Mark Pollack (blog author) says:
Added on October 22nd, 2008 at 3:33 pmAt that time we did sign a book deal and basically never found the time to write it. We are right now in the process of renegotiating/reviving that contract and hope to have a book out by summer next year.
Szymon Pobiega says:
Added on June 8th, 2009 at 1:40 amHi
I am a huge fan of the idea of Common Service Locator since Jeremy's initial blog post. Finally I was able to write really reusable components. I found it most useful in code libraries where one cannot make assumptions on which DI container his users will use.
One thing I was missing in CSL was ability to register new mappings in the container. Such function would be very useful when designing factory objects where the factory class creates a child container for its exclusive use and then registers mappings for classes it produces.
My friend Piotr and I decided to extent CSL with such function. We called our project MetaContainer and published it on codeplex. MetaContainer is built on top of CSL.
I write this e-mail to ask you to help us develop adapters for particular containers. We managed to write three of them (due to out limited knowledge and resources). Because MetaContainer is only an extension to CSL, writing an adapter wouldn't be difficult is one knew particular container very well.
There is one additional issue: CLS project seems to be a little abandoned. During development on MetaContainer we found several problems which should be addressed either on conceptual level or implementation level (like scope of mapping name: can be type-scoped or global-scoped). These problems are also relevant to CSL and should be solved to allow seemles use.