Sep 15, 2008 at 10:47 PM
Edited Sep 15, 2008 at 10:48 PM
So I'm faced with a project where the target deployment platform might very well be Windows Mobile 6.0 - which from what I gather rules out quite a few building blocks that we otherwise use at our organization. Enterprise Library being one of them.
What I'm wondering is how can I achieve an IoC container-like degree of loose coupling on Windows Mobile. Can Unity be used? What about his competitors like Windsor or Spring.NET or StructureMap... I'd prefer to align this effort with the P&P deliverables
but also need to ensure my design can be realized on the target platform.
At this point I'm steering our UML modeling efforts to utilize classes with discrete interfaces so that a "Controller" implementing "IController" can be used by registering "IController" with some form of container. The question
becomes whether I can use an existing solution such as Unity or whether I have to come up with some "poort mans" container on Mobile and forego dependency injection and simply use the "container" as a "locator" providing mapping
of interfaces to implementations.
The simple mapping of interface to implementation will help with loosely coupling the modules in the system (preventing circular references / dependency chains) and some versatility in swapping out implementations (i.e. a NullLogger class for ILogger)
but won't provide any further benefit for IoC/DI...
What are my options here? If Unity is NOT an option on Mobile, what is the future plans - if any - for an IoC/DI container for Windows Mobile? From what I'm seeing, the world of Mobile development is a far cry from the current Web/WinForm worlds...