Taffy minimum requirements for 3rd party Dependency Injection frameworks

Adam Tuttle edited this page Nov 9, 2012 · 3 revisions

In theory, you can use whatever Dependency Injection ("DI") framework you want with Taffy.

"If you choose not to decide, you still have made a choice." -Rush

If you don't use a 3rd party DI framework, Taffy will use its own, ridiculously small and lightweight DI framework, simply called its "Factory".

Both the Taffy Factory and ColdSpring adhere to the same (imaginary) interface:

  • bool containsBean( string beanId )
  • any getBean( string beanId )
  • some method to get a list of all bean id's that the DI framework is aware of.
    • ColdSpring uses string getBeanDefinitionList(), and Taffy Factory uses string getBeanList().
    • The name/implementation doesn't really matter as we can code around this. The important thing is that we can get a list of all beans. Even better if we can filter that list by a parent class. E.g. get beans that (at some point in their inheritance chain) extend from taffy.core.resource. If filtering isn't provided, we get all beans and filter manually.

That's it! If your DI framework implements that interface, it's Taffy-compatibile.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.