Back to list
Views:   3.2K
Replies:  0
Archived

Recommend a Design Pattern

I 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 want the list to be processed and output a list of which what got processed using what method.

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


Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.2.2