configuring container

Apr 8, 2008 at 7:35 PM
Need some help in finding if Dependency injection (unity) is suitable in my scenario.

Can i use unity for wiring my basic components to form an application. with each component not having a explicit dependency(no dependenc injection) on other component

i am working on a framework for testing web applications. there are some basic components like data generator/source (which holds data to send to web app), requestor (which actually make web request), assert(components which do assert for response) and reporting(generate reports).

the data flow is more like a pipeline (in which one type of component works only after outut from previous component). Like data generators sends data ---> Requestor --->assert ---->Report. So Assert doesn't work unless Requestor has finished its job.

Although they are pipeline, but i don't think them as dependency. for ex Requestor class doesn't have any direct/explicit dependency on Assert. Requestor job is only to send request. and when repsone is recevied it sould have some event pub-sub mechanism so that Assert can start there job.

each component can have mulitple instance. example Requestor can have multiple type of Asserts associated with it.

My requirement is to create tests for mulitple web applications using these basic building blocks(componet). SO there is need to add/remove components from config. Like replacing the reporting component to have a new type of reporting. and changing reproting component doesn't effect any other part.