I also vote for #2. Seems strange for me to have a boolean in the
ModelLocator that is specific to this UI context. I always thought the
ModelLocator should only have data that is potentially global to the app
(like your list of users), and find it strange that many online Cairngorm
examples put something like the working item of an edit form (e.g., you have
a form that edits the properties of a specific user, and a variable for that
user is added to the ModelLocator). So I wouldn't consider your boolean
flags to be part of your app's model.

On Thu, Oct 23, 2008 at 6:48 PM, Dimitrios Gianninas <
[EMAIL PROTECTED]> wrote:

>    #2 because your app is simple..#1 if you want to be a purist.
>
> start simply and add complexity as you go along, thats my rule.
>
> *Dimitrios Gianninas*
> *RIA Developer Team Lead*
> *Optimal Payments Inc.*
>
>
>  ------------------------------
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *O. Frabjous-Dey
> *Sent:* Thursday, October 23, 2008 6:26 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Cairngorm: should pure view state changes go
> through the ModelLocator?
>
>  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.
>
> *AVIS IMPORTANT*
>
> *WARNING*
>
> Ce message électronique et ses pièces jointes peuvent contenir des
> renseignements confidentiels, exclusifs ou légalement privilégiés destinés
> au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun
> privilège ou à aucun autre droit si le présent message a été transmis
> involontairement ou s'il est retransmis sans son autorisation. Si vous
> n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu
> par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi
> que toutes ses pièces jointes, de votre système. La lecture, la
> distribution, la copie ou tout autre usage du présent message ou de ses
> pièces jointes par des personnes autres que le destinataire visé ne sont pas
> autorisés et pourraient être illégaux. Si vous avez reçu ce courrier
> électronique par erreur, veuillez en aviser l'expéditeur.
>
> This electronic message and its attachments may contain confidential,
> proprietary or legally privileged information, which is solely for the use
> of the intended recipient. No privilege or other rights are waived by any
> unintended transmission or unauthorized retransmission of this message. If
> you are not the intended recipient of this message, or if you have received
> it in error, you should immediately stop reading this message and delete it
> and all attachments from your system. The reading, distribution, copying or
> other use of this message or its attachments by unintended recipients is
> unauthorized and may be unlawful. If you have received this e-mail in error,
> please notify the sender.
>   
>

Reply via email to