Hi everyone,

Here's a design question for you Cairngorm experts.

In my application's view, I have two main subcomponents: a control bar sort
of custom component that I wrote that we'll call the FrabjousControlBar, and
a DataGrid, which lists all the users in my application.  These users are
either Administrators or Members.

The FrabjousControlBar contains two checkboxes: a checkbox labeled "Show
Administrators" and a checkbox labeled "Show Members".  Both are checked by
default, but when "Show Administrators" is unchecked, the DataGrid removes
all of the Administrators.  Something similar happens for "Show Members".

I'm having trouble choosing the correct implementation for this.  There are
two ways I can see to do this:

1) When a user unchecks "Show Administrators," the control kicks off a
Cairngorm Event, the controller executes a Command that changes a boolean
flag in the ModelLocator, and the DataGrid responds to the change on that
flag.

2) Since the user interaction affects the view only, no MVC round trip
occurs.  My view knows when the box is unchecked and updates the DataGrid
accordingly.

Which is better?  1) is more pleasingly MVC, but comes with a lot of
overhead and additional effort.

Thanks,
O.

Reply via email to