Posted December 1, 2009on:
Within the patterns & practices SharePoint Guidance, there are a few reusable components, such as Hierarchical Configuration, Logging and Service Locator. They are basic infrastructure for SharePoint applications. Here are some my thoughts.
1) The hint is that to start build any types of application, web application, Silverlight application and etc, the first thing is to get configuration, logging, service locator/dependency injection ready.
2) In .NET base class libray, there should be generaric interfaces, such as ILogger, IConfig for custom implementation, like the GeoAPI.NET, which provides OGC/ISO standards based interfaces to .NET GIS projects. Today, the ILogger defined in Microsoft.Practices.SPG.Common is useless to other LOB DLLs.
3) Compare to the Enterprise Library monster, Microsoft.Practices.SPG.Common is much lighter. But the ILogger and IConfigurationManager are coupled w/ SharePoint, and there is no dependency injection.
I am looking into the possibilities to implement dependency injection to SharePoint development, as I did for ASP.NET MVVM.