Ok, I have just found the review:
http://www.richinternetapps.com/archives/000144.html
 
Best regards
Stanislav
 
On 5/16/06, Stanislav Zayarsky <[EMAIL PROTECTED]> wrote:
>>I'm not 100% sure what you're saying - are you saying you'd have a controller for each >>view?
 
Right, I would like to have a controller for each view, for sake of clean design.
 
By the way Alister, can you give me a link where I can read all info about Cairngorm 2 architecture, features and differences between 0.99 version?
 
Best regards
Stanislav
 
On 5/16/06, Alistair McLeod < [EMAIL PROTECTED]> wrote:
Hi Sanislav,
 
I'm not 100% sure what you're saying - are you saying you'd have a controller for each view? Can you give some pseudo-code showing it?
 
I understand your goal of having a view that is re-usable, but I would go for simplicity to start with and refactor to that reusability should it be required.
 
Cheers,
 
Ali


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Stanislav Zayarsky
Sent: 16 May 2006 16:11

To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Are ViewHelper and ViewLocator deprecated in Cairngorm 2?

 
>>Initially, I might calculate the total in the view, and thereafter use
>>the extract method pattern to put the formatting logic in utility class.

Right Alistair, it's better idea to move it to utility class.

But I propose to extract from view this code:
MyUtilityClass.formatDataToSomethingSimpler(
ModelLocator.getInstance().complexData )

 
extract to controller that works with that view.
 
So after that you will have independent view that can be reused. Am I Right?
 
Best regards
Stanislav

On 5/16/06, Alistair McLeod <[EMAIL PROTECTED]> wrote:
> Hi Stanislav,
>
> But it this instance, the data is being formatted for the view. Eg. We
> get an array of totals from the server, which is displayed as a list on
> one view, but as a total on a different view?
>
> Initially, I might calculate the total in the view, and thereafter use
> the extract method pattern to put the formatting logic in utility class.
> That would also let us test it using FlexUnit.
>
> Where would you propose that logic would go?
>
> Cheers,
>
> Ali
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com ] On
> Behalf Of Stanislav Zayarsky
> Sent: 16 May 2006 15:00
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Are ViewHelper and ViewLocator deprecated in
> Cairngorm 2?
>
> Alistair,
>
> <mx:Label text="{ MyUtilityClass.formatDataToSomethingSimpler(
> ModelLocator.getInstance().complexData ) }" />
>
> I think it is not good when view knows something about how to parse
> data.
> View should be decoupled from this. This is not clear solution.
>
> What do you think?
>
> Best regards
> Stanislav
>
> On 5/16/06, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > Thanks Alistar,
> >
> > That seems like a cleaner way to handle things.
> >
> >  - mike
> >
> >
> >
> >
> >
> >             "Alistair McLeod"                 To:
> < flexcoders@yahoogroups.com>
> >             < [EMAIL PROTECTED]>               cc:
> >             Sent by:                          Subject:  RE:
> [flexcoders] Are ViewHelper and ViewLocator
> >             flexcoders@yahoogroups.com          deprecated in
> Cairngorm 2?
> >             05/16/2006 08:59 AM
> >             Please respond to
> >             flexcoders
> >
> >
> >
> >
> >
> >
> > Hi Michael,
> >
> > In your complex value object case, here's what we'd recommend now.
> >
> > In your command, put the complex object in your model (ModelLocator),
> > eg.
> >
> > ModelLocator.getInstance().complextData = theResultFromTheServer;
> >
> > Now, in your view, you bind to that model item, but call a utility
> > class to massage the results into the format you want. eg,
> >
> > <mx:Label text="{ MyUtilityClass.formatDataToSomethingSimpler (
> > ModelLocator.getInstance().complexData ) }" />
> >
> > Now, you could possibly call MyUtilityClass a view helper, in the
> > broad sense of the pattern, but extracting it this way lets you, for
> > example, unit tests it's functionality and keeps the Model and View
> separate.
> >
> > Cheers,
> >
> > Ali
> >
> >
> > Alistair McLeod
> > Practice Director (Rich Internet Applications) Adobe Consulting
> > Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
> > p: +44 (0) 131 338 6108
> > [EMAIL PROTECTED]
> > http://weblogs.macromedia.com/amcleod
> >
> >
> >
> > -----Original Message-----
> > From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]
> > On Behalf Of [EMAIL PROTECTED]
> > Sent: 16 May 2006 13:14
> > To: flexcoders@yahoogroups.com
> > Cc: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Are ViewHelper and ViewLocator deprecated in
>
> > Cairngorm 2?
> >
> > I am using the viewLocator and viewHelper in a fds2b3 prototype, and
> > they function correctly, although  a post from Steve Webster states
> > that:
> >
> > "My quick response is that we really don't anticipate you needing to
> > use ViewHelpers as much (if at all).  Use ModelLocator instead (that's
>
> > why I left it out the article series"
> >
> > However, I think I understand when you say that:
> >
> > "It seems that the command class has no idea where the view is."
> >
> > Thus I use the command class to set the variable, and that is all.  If
>
> > I have a complex value object that I need to iterate through to get
> > single value to be displayed in a view (although I know that there
> > might be arguments for doing all this on the java layer, however ...),
>
> > I would rather call a viewHelper to handle this (one that is linked
> > intrinsically with a view) rather than fill the command class with
> > business logic.
> >
> > So ... this is probably a long winded way to say that, 'yes' the
> > viewHelper and viewLocator work fine  in fds2b3.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >             "Larry Liang"                     To:
> > flexcoders@yahoogroups.com
> >             < [EMAIL PROTECTED]>            cc:
> >
> >             Sent by:                          Subject:  [flexcoders]
> > Are ViewHelper and ViewLocator deprecated
> >             flexcoders@yahoogroups.com          in Cairngorm 2?
> >
> >             05/15/2006 07:52 AM
> >
> >             Please respond to
> >
> >             flexcoders
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi all,
> >
> > I just donwloaded the latest cairngorm framework for fb2 beta 3. I
> > found that the viewhelper and viewlocator are still included in the
> > package. I remeber (please correct me if I'm wrong) that these two
> > classes are deprecated for flex 2.
> >
> > If this is the case, then suppose a command class needs to update a
> > view, should it only do that throuhg ModelLocator class. It seems that
>
> > the command class has no idea where the view is. For example, if a
> > command class need to set a label on a view to say "downloading..."
> > before start a webservice call and after the rpc call comes back, the
> > command class sets the label text to be empty. How should the command
> > class handle this situation if it does not know where the view is.
> >
> > The only way that I can think of is to have a string variable in
> > ModelLocator class which is bound to the label text property. and then
>
> > command class can update the label text through this string variable.
> > I'm sure there is a better (best practice) way to update a view in a
> > command class. Please give me some hints.
> >
> > Thanks
> > Larry
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > --
> > ---
> > This e-mail message (including attachments, if any) is intended for
> > the use of the individual or entity to which it is addressed and may
> > contain information that is privileged, proprietary , confidential and
>
> > exempt from disclosure.  If you are not the intended recipient, you
> > are notified that any dissemination, distribution or copying of this
> > communication is strictly prohibited.  If you have received this
> > communication in error, please notify the sender and erase this e-mail
>
> > message immediately.
> > ----------------------------------------------------------------------
> > --
> > ---
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > ----- This e-mail message (including attachments, if any) is intended
> > for the use of the individual or entity to which it is addressed and
> > may contain information that is privileged, proprietary , confidential
>
> > and exempt from disclosure.  If you are not the intended recipient,
> > you are notified that any dissemination, distribution or copying of
> > this communication is strictly prohibited.  If you have received this
> > communication in error, please notify the sender and erase this e-mail
>
> > message immediately.
> > ----------------------------------------------------------------------
> > -----
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------~-->
> Get to your groups with one click. Know instantly when new email arrives
> http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
> --------------------------------------------------------------------~->
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------~-->
> You can search right from your browser? It's easy and it's free.  See how.
> http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/nhFolB/TM
> --------------------------------------------------------------------~->
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
> <*> To visit your group on the web, go to:
>     http://groups.yahoo.com/group/flexcoders/
>
> <*> To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]
>
> <*> Your use of Yahoo! Groups is subject to:
>     http://docs.yahoo.com/info/terms/
>
>
>
>
 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS

  •  To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED]
     
  •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






    • --
      Flexcoders Mailing List
      FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
      Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




      YAHOO! GROUPS LINKS




      Reply via email to