[flexcoders] Re: Cairngorm commands - best practise

2006-10-11 Thread Tim Hoff
WTF, since when do Delagates know about the ModelLocator?  Tom, I'm 
sorry to disagree with you here, but a Delagate is nothing more than 
a proxy for a service call; a layer of abstraction to help 
encapsulate the Commands.  Basically, what you're talking about here 
is an event, containing the searchSting, that is dispatched to a 
Command and a VO that is passed, from a Command to a Service; via a 
Delagate.  

package com.vo
{
import com.adobe.cairngorm.vo.ValueObject;

[Bindable]
public class SearchVO implements ValueObject
{
public var searchString : String;
public var userID : String;
}   
}

The userID is persistant, while the searchString is temporary.  In 
the view, the searchString should be attached to the event, either 
by using a custom event or using the event's data property.  The 
Command then takes the searchString from the event and updates the 
VO in the ModelLocator.  The VO is then passed on to the Delegate 
which passes it on to the Service.  This way only the Command 
updates the ModelLocator; nice encapsulation.  I've seen code that 
has the view update the VO directly and uses the VO with a custom 
event. But I don't beleive that this is the intended best practice.  
I think that events should only carry temporary data and the 
ModelLocator (VO's) should hold persistant data.  In this scenario, 
the searchString is temporary, but is held in the VO because it 
might be needed for user notification of a failed search attempt. 
IMHO, Delegates shouldn't know about the ModelLocator at all and 
Views should only know about the ModelLocator through binding.  The 
Commands should do all of the work.

-TH

--- In flexcoders@yahoogroups.com, "Ben Lucyk" <[EMAIL PROTECTED]> wrote:
>
> I second this.
>  
> Ben Lucyk
> http://esria.com  
> p 1.877.TRY.ESRIA ext 718
> c 1.408.489.3913
> f  1.877.828.4436
> [EMAIL PROTECTED]
>  
>  
>  
>  
>  
>  
>  
>  
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Ralf Bokelberg
> Sent: Wednesday, October 11, 2006 4:27 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Cairngorm commands - best practise
>  
> My delegates don't know about the model locator, but my commands 
do.
> So I vote for commands.
> 
> Cheers,
> Ralf.
> 
> On 10/11/06, hank williams <[EMAIL PROTECTED]
>  > wrote:
> > So we have Tom saying do it in the delegate and Bjorn saying do 
it in
> > the command.
> >
> > Any tie breakers?
> >
> > Hank
> >
> > On 10/11/06, Tom Chiverton <[EMAIL PROTECTED]
>  > wrote:
> > > On Wednesday 11 October 2006 02:12, Robin Burrer wrote:
> > > > However I also want to send the userID when I do my server
> request.
> > > > Should the SearchDatabaseCommand get the userID from the 
model or
> from
> > >
> > > I reasoned that passing any parameters not connected with what 
to do
> was no
> > > business of the Command, and had the service delegate look up 
the
> additional
> > > parameters from the model:
> > > public function
> search(r:String,c:String,o:String,d:String,h:String):void {
> > > var call:Object =
> serviceInstance.search(model.sessionToken,r,c,o,d,h);
> > > call.resultHandler = responder.onResult;
> > > call.faultHandler = responder.onFault;
> > > }
> > >
> > > --
> > > Tom Chiverton
> > > Helping to efficiently transform magnetic systems
> > >
> > > 
> > >
> > > This email is sent for and on behalf of Halliwells LLP.
> > >
> > > Halliwells LLP is a limited liability partnership registered in
> England and Wales under registered number OC307980 whose registered
> office address is at St James's Court Brown Street Manchester M2 
2JF. A
> list of members is available for inspection at the registered 
office.
> Any reference to a partner in relation to Halliwells LLP means a 
member
> of Halliwells LLP. Regulated by the Law Society.
> > >
> > > CONFIDENTIALITY
> > >
> > > This email is intended only for the use of the addressee named 
above
> and may be confidential or legally privileged. If you are not the
> addressee you must not read it and must not use any information
> contained in nor copy it nor inform any person other than 
Halliwells LLP
> or the addressee of its existence or contents. If you have 
received this
> email in error please delete it and notify Halliwells LLP IT 
Department
> on 0870 365 8008.
> > >
> > > For more information about Halliwells LLP visit 
www.halliwells.com.
> > >
> > >
> > >
> > > --
> > > 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] Re: Cairngorm commands - best practise

2006-10-12 Thread Tim Hoff
I see what you're saying Tom.  We just have different points of view 
concerning this matter.  The choice is whether you want to scatter 
the arguments throughout your code or scatter unnecessary references 
to the ModelLocator similarly.  The bottom line: if it works for 
you, that's all that really matters.  Thank you for the discourse.

-TH

--- In flexcoders@yahoogroups.com, Tom Chiverton <[EMAIL PROTECTED]> 
wrote:
>
> On Wednesday 11 October 2006 20:48, Tim Hoff wrote:
> > WTF, since when do Delagates know about the ModelLocator?  Tom, 
I'm
> > sorry to disagree with you here, 
> 
> Go right ahead and disagree :-)
> 
> > a proxy for a service call; a layer of abstraction to help
> > encapsulate the Commands. 
> 
> Delegates encapsulate commands ? It's the other way around - the 
Delegate hide 
> all the gubbins of how the command is run at the other end, and 
that for me 
> means passing an auth. token (username).
> 
> 
> > event. But I don't beleive that this is the intended best 
practice.
> > I think that events should only carry temporary data and the
> > ModelLocator (VO's) should hold persistant data. 
> 
> With you so far.
> 
> > the searchString is temporary, but is held in the VO because it
> > might be needed for user notification of a failed search attempt.
> > IMHO, Delegates shouldn't know about the ModelLocator at all and
> > Views should only know about the ModelLocator through binding.  
The
> > Commands should do all of the work.
> 
> But, but, but... either I scatter my requirement for the first 
argument to a 
> Remoteing call to be a particular string all over my code (in the 
VO and the 
> Command), or in one place (the Delegate). 
> I don't see the harm in binding my Delegate to a specific Model 
property as I 
> can't see us ever changing the security mechanism.
> 
> -- 
> Tom Chiverton
> Helping to quickly enhance interdependent segments
> 
> 
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the 
registered office. Any reference to a partner in relation to 
Halliwells LLP means a member of Halliwells LLP. Regulated by the 
Law Society.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>





--
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/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> 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/
 



Re: [flexcoders] Re: Cairngorm commands - best practise

2006-10-12 Thread Tom Chiverton
On Wednesday 11 October 2006 20:48, Tim Hoff wrote:
> WTF, since when do Delagates know about the ModelLocator?  Tom, I'm
> sorry to disagree with you here, 

Go right ahead and disagree :-)

> a proxy for a service call; a layer of abstraction to help
> encapsulate the Commands. 

Delegates encapsulate commands ? It's the other way around - the Delegate hide 
all the gubbins of how the command is run at the other end, and that for me 
means passing an auth. token (username).


> event. But I don't beleive that this is the intended best practice.
> I think that events should only carry temporary data and the
> ModelLocator (VO's) should hold persistant data. 

With you so far.

> the searchString is temporary, but is held in the VO because it
> might be needed for user notification of a failed search attempt.
> IMHO, Delegates shouldn't know about the ModelLocator at all and
> Views should only know about the ModelLocator through binding.  The
> Commands should do all of the work.

But, but, but... either I scatter my requirement for the first argument to a 
Remoteing call to be a particular string all over my code (in the VO and the 
Command), or in one place (the Delegate). 
I don't see the harm in binding my Delegate to a specific Model property as I 
can't see us ever changing the security mechanism.

-- 
Tom Chiverton
Helping to quickly enhance interdependent segments



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
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/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> 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/
 




Re: [flexcoders] Re: Cairngorm commands - best practise

2006-10-16 Thread Tom Chiverton
On Thursday 12 October 2006 20:30, Tim Hoff wrote:
> to the ModelLocator similarly.  The bottom line: if it works for
> you, that's all that really matters.  Thank you for the discourse.

The whole point of a framework is to use it in a way that helps you, and 
explore that with others.

Maybe our next project we'll try it the other way.

-- 
Tom Chiverton
Helping to authoritatively leverage market-driven architectures



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
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/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> 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/