Improving ProviderFactory

The ProviderFactory is a light weight component for mapping (I)nterfaces to Class implementations through standard app/web config files. The goal is to create a re-usable factory the is flexible and easy to understand and implement. If you are looking for a more feature-rich environment, then we suggest looking at Castle, Spring.net or PnP IoC projects.

Improving ProviderFactory:

- promotes better software design through simple component decoupling and easy to configure factory pattern/provider model implementations
- property injection to easily wire up needed config values (for example "connection string")
- .NET generics to return specific type without casting return type
- custom Config section to map Interface to Class/Assemblies
- to change your Interface implementation: update Config and deploy assembly to /bin/ folder. No need to recompile or reference new assembly.

To Use:
  1. Reference Improving ProviderFactory from your code.
  2. Add config information to your project (from sample)
  3. Add project interfaces and assembly/class mappings to config file. (Feel free to use development mock-ups - you can always change out the implementation later!)
  4. Develop your application
  5. update config values, test your code
  6. Serve hot and enjoy!
Last edited Oct 8 2007 at 10:27 PM by calebjenkins, version 7

 

Want to leave feedback?
Please use Discussions or Reviews instead.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987