D
D
Lets say we have a tree control with a user as the root node with child
nodes that represent test sets they subscribe to (which map directly to sql
tables) and related reports (sql stored procedures returning data viewed in
a datagrid)
list so
User
|___TestSet1
|_____Report1
|_____Report2
|___TestSet4
|_____Report8
|_____Report9
My first thoughts are to use the command pattern so that when the user
double clicks on a report the command classes Execute function is executed
which runs the stored procedure with certain parameters all of which are
stored as data members in the class.
Now lets add a twist and say that I want to create a new node type called
BatchReports which will run all the reports under it like so
User
|___TestSet1
|_____BatchReport1
|_____Report1
|_____Report2
|_____Report3
|___TestSet4
|_____BatchReport1
|_____Report7
|_____Report8
|_____Report9
so that clicking BatchReport1 will cause Reports 1, 2 & 3 to execute. Which
pattern would be good there, I guess the command pattern again and perhaps
the interpreter pattern? that might be over kill.
I'm pretty new to patterns so if anyone has some suggestions I welcome them.
Thanks
nodes that represent test sets they subscribe to (which map directly to sql
tables) and related reports (sql stored procedures returning data viewed in
a datagrid)
list so
User
|___TestSet1
|_____Report1
|_____Report2
|___TestSet4
|_____Report8
|_____Report9
My first thoughts are to use the command pattern so that when the user
double clicks on a report the command classes Execute function is executed
which runs the stored procedure with certain parameters all of which are
stored as data members in the class.
Now lets add a twist and say that I want to create a new node type called
BatchReports which will run all the reports under it like so
User
|___TestSet1
|_____BatchReport1
|_____Report1
|_____Report2
|_____Report3
|___TestSet4
|_____BatchReport1
|_____Report7
|_____Report8
|_____Report9
so that clicking BatchReport1 will cause Reports 1, 2 & 3 to execute. Which
pattern would be good there, I guess the command pattern again and perhaps
the interpreter pattern? that might be over kill.
I'm pretty new to patterns so if anyone has some suggestions I welcome them.
Thanks