Views: 3.2K
Replies: 0
Archived
|
Recommend a Design PatternI have a list of items and two mutually exclusive ways in which they can be processed-(ex writing to screen vs writing to file). The deciding factor is a property on each item.
I have chosen to use the "Chain of Resp" pattern. I am wondering if this is a good choice Dim proc1 As New Process1 Dim proc2 as New Process2
proc1.nextProcessing(proc2)
For each itm in itmlst proc1.ProcessItem(itm) Next
proc1.DoMore() proc2.DoMore()
--result is an object that resturns the list of items processed by that process. Dim result1= proc1.EndPRocess() Dim result2= proc2.EndProcess() Super Doc, Oct 26, 2011
|