This is a discussion on Collecting Parameter within the Software Patterns forums, part of the Testing category; Hello, In a workflow application where in the workflow is customizable, i would like to defer the instantiation of the ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Collecting Parameter
Hello,
In a workflow application where in the workflow is customizable, i would like to defer the instantiation of the class till the workflow is complete. e.g. class ClassA { object1 objA; object2 objB; object3 obj3; ClassA( object1 v1, object2 v2, object3 v3) { object1 = v1; ... object3 = v3; } } Any of the above three member variables could be instantiated first and hence there are nine combinations. The three member variables are being instantiated in three diferent forms in a wizard like app. Since I wanted to keep the model seperate from the view, how could I defer the instantiation of the ClassA but still keep the controller generic enough so that the order in which the member varibles are collected is not sequenced. I read that "Collecting Parameter" pattern supports something similar to this, however I am not too sure since I couldn't find the right examples. BTW: I am writing this in C# and so any other alternatives are welcome as well. Thanks sd |