Currently my architecture is a monolithic block that handles a really specific duty. Now it needs to be generalized.
Right now it handles a request and all processes (1 or many) associated to it. There's a class
Request and a class
Process and since it serves one specific duty this model was OK.
Right now I need to split both classes to achieve modularity. For instance, the
Request class should be split. So I'll still have a
Request class, which holds general request information, and many
RequestDetailsForServiceTwo and so on, that hold detailed information relatively to a specific type of request. Equally for
The question right now is: how to bind together
Request class with
RequestDetailsForServiceOne (at run time)?
I had thought about Dependency Injection, but
RequestDetailsForServiceTwo doesn't share any common behaviour, (that classes only store some properties), this way will drive me to code an
IRequestDetailsForService completely empty. That sounds as a code-smell to me.
Would be a better idea in this case use, (inside
Process class) a Dictionary of properties and completely avoid
I don't really like the loss of type-checking that this way get me back. What would be an ideal solution?