[flexcoders] Re: Cairngorm Question

2009-04-10 Thread nathanpdaniel
Wrap your head around the idea that the model controls the view.  Even the 
data portions.  You should bind your combo box dataprovider to the model 
property storing that data (from server based on combo box 1 selection).  Why 
you don't need cairngorm for enabling? You can just set you're 2nd combo box's 
enabled property to {combobox1.selectedIndex gt; -1}. An alternative using 
cairngorm is if your dataprovider (in the model) is null, disable combo box 2, 
if it has data, enable it.
Hope this helps!  

 From: skusunam skusu...@...
 To: flexcoders@yahoogroups.com
 Sent: Thursday, April 9, 2009 7:53:48 PM
 Subject: [flexcoders] Cairngorm Question
 
 
 
 
 
 Hello Group,
 
 This is my first question on this group and I have been referring to this 
 group for all my technical challenges with Flex (started using 1 month back). 
 Thanks for such a nice group and support.
 
 I have a complex screen where I have 2 Combo boxes and by default Combo-2 is 
 disabled and will be enabled only when user selects Combo-1 and Server 
 returns any Objects for Combo-2 otherwise it will be still disabled.
 
 I have defined an Event `LoadCombo2Event' which is dispatched when user 
 selects an entry from Combo-1 and the results will be handled in 
 `LoadComb2Command' . I do not have access to Combo2 in this command to Enable 
 or Disable? 
 
 How do we handle this case using Cairngorm?
 
 Thanks,
 Sre




Re: [flexcoders] Re: Cairngorm Question

2009-04-10 Thread Kusunam, Srinivas

Nathan  Claudieu,
Thanks for the response. After I posted my question I started reading  
and thinking how to correct this and came up with the same idea Nathan  
suggested. I started refactoring everything and so far it is going  
great.




On Apr 10, 2009, at 3:46 AM, nathanpdaniel ndan...@bsi-scs.com  
wrote:





Wrap your head around the idea that the model controls the view.  
Even the data portions. You should bind your combo box  
dataprovider to the model property storing that data (from server  
based on combo box 1 selection). Why you don't need cairngorm for  
enabling? You can just set you're 2nd combo box's enabled property  
to {combobox1.selectedIndex gt; -1}. An alternative using cairngorm  
is if your dataprovider (in the model) is null, disable combo box 2,  
if it has data, enable it.

Hope this helps!

 From: skusunam skusu...@...
 To: flexcoders@yahoogroups.com
 Sent: Thursday, April 9, 2009 7:53:48 PM
 Subject: [flexcoders] Cairngorm Question





 Hello Group,

 This is my first question on this group and I have been referring  
to this group for all my technical challenges with Flex (started  
using 1 month back). Thanks for such a nice group and support.


 I have a complex screen where I have 2 Combo boxes and by default  
Combo-2 is disabled and will be enabled only when user selects  
Combo-1 and Server returns any Objects for Combo-2 otherwise it will  
be still disabled.


 I have defined an Event `LoadCombo2Event' which is dispatched when  
user selects an entry from Combo-1 and the results will be handled  
in `LoadComb2Command' . I do not have access to Combo2 in this  
command to Enable or Disable?


 How do we handle this case using Cairngorm?

 Thanks,
 Sre




*
This message has originated from R. L. Polk  Co.'s RLPTechnologies 
Division, 26988 Northwestern Highway, Southfield, MI  48033.
 
If you do not wish to receive further e-mails regarding 
RLPTechnologies, please forward this e-mail to do_not_s...@polk.com 
with the word remove in the subject line.


This e-mail message and any files transmitted with it are 
confidential and intended solely for the individual or entity to 
whom they are addressed.  If you have received this message in 
error, please delete this message and notify the RLPTechnologies 
System Administrator at postmas...@polk.com.

*


[flexcoders] Re: Cairngorm question

2007-03-18 Thread sleekdigital
Some usefull links...

http://labs.adobe.com/wiki/index.php/Cairngorm

http://www.cairngormdocs.org/

-Steve

--- In flexcoders@yahoogroups.com, Michael [EMAIL PROTECTED] wrote:

 Where can I download cairngorm 2.0. I believe I have downloaded 
the .99
 version, but I didn't get a chance to learn it before I got tasked 
with a
 Flex 2.0 project.
 
  
 



RE: [flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-29 Thread Dimitrios Gianninas
Well if your remote call is returning an object, then u do event.result ... if 
its returning a list of objects and u need to access the first, second, etc.. 
element then do event.result[0]. If its a map, then do event.result[keyname]
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
malik_robinson
Sent: Sunday, January 28, 2007 9:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm - Question on using ResultHandler



Hi,

Thanks for the help.  That worked and it called the next command which is 
what I wanted.  

In my result handler in the command that gets called next this works:

public function result( data:Object ):void {
var event:ResultEvent = data as ResultEvent
model.employeeList = event.result[0];
}

This does NOT work:

I am just trying to find out why, and if the above is how most do this.

public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
model.employeeList = event.result
}

Thanks,

-M


--- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] 
wrote:

 You are doing things the right way. If after you login you want to do some 
 more, look at the SequenceCommand.
 
 You would basically add a executeNextCommand() statement after your 
 model.workflowState statement.
 
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
 malik_robinson
 Sent: Sunday, January 28, 2007 1:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Cairngorm - Question on using ResultHandler
 
 
 
 Hi,
 
 I have a question using Cairngorm and Commands. I am new to it but its making 
 more sense to me each day at least it seems that way.
 
 I have the following in my LoginCommand.as
 
 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent;
 
 if (event.result.length  0) {
 model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
 }
 else {
 model.login.statusMsg = Your login credentials are invalid, please try 
 again.;
 }
 }
 
 1. Is there anything wrong with the way I am doing the above?
 2. I would like to call some other remote objects s! o I can populate some 
 datagrids after the user has been authenticated and then load the home page 
 of the app as I am doing above.
 
 
 
 
 -- 
 WARNING
 ---
 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.
 
 AVIS IMPORTANT
 --
 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.



 


[flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-29 Thread malik_robinson
Thanks!

-Malik

--- In flexcoders@yahoogroups.com, Dimitrios Gianninas 
[EMAIL PROTECTED] wrote:

 Well if your remote call is returning an object, then u do 
event.result ... if its returning a list of objects and u need to 
access the first, second, etc.. element then do event.result[0]. If 
its a map, then do event.result[keyname]
  
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of malik_robinson
 Sent: Sunday, January 28, 2007 9:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cairngorm - Question on using 
ResultHandler
 
 
 
 Hi,
 
 Thanks for the help.  That worked and it called the next command 
which is what I wanted.  
 
 In my result handler in the command that gets called next this 
works:
 
 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result[0];
 }
 
 This does NOT work:
 
 I am just trying to find out why, and if the above is how most do 
this.
 
 public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result
 }
 
 Thanks,
 
 -M
 
 
 --- In flexcoders@yahoogroups.com, Dimitrios Gianninas 
dimitrios.gianninas@ wrote:
 
  You are doing things the right way. If after you login you want 
to do some more, look at the SequenceCommand.
  
  You would basically add a executeNextCommand() statement after 
your model.workflowState statement.
  
  Dimitrios Gianninas
  RIA Developer
  Optimal Payments Inc.
  
  
  
  
  From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of malik_robinson
  Sent: Sunday, January 28, 2007 1:49 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Cairngorm - Question on using ResultHandler
  
  
  
  Hi,
  
  I have a question using Cairngorm and Commands. I am new to it 
but its making more sense to me each day at least it seems that way.
  
  I have the following in my LoginCommand.as
  
  public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent;
  
  if (event.result.length  0) {
  model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
  }
  else {
  model.login.statusMsg = Your login credentials are invalid, 
please try again.;
  }
  }
  
  1. Is there anything wrong with the way I am doing the above?
  2. I would like to call some other remote objects s! o I can 
populate some datagrids after the user has been authenticated and 
then load the home page of the app as I am doing above.
  
  
  
  
  -- 
  WARNING
  ---
  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.
  
  AVIS IMPORTANT
  --
  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.
 





[flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-28 Thread malik_robinson

Hi,

Thanks for the help.  That worked and it called the next command which
is what I wanted.

In my result handler in the command that gets called next this works:

public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result[0];
}

This does NOT work:

I am just trying to find out why, and if the above is how most do this.

public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result
}

Thanks,

-M


--- In flexcoders@yahoogroups.com, Dimitrios Gianninas
[EMAIL PROTECTED] wrote:

 You are doing things the right way. If after you login you want to do
some more, look at the SequenceCommand.

 You would basically add a executeNextCommand() statement after your
model.workflowState statement.

 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.


 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of malik_robinson
 Sent: Sunday, January 28, 2007 1:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Cairngorm - Question on using ResultHandler



 Hi,

 I have a question using Cairngorm and Commands. I am new to it but its
making more sense to me each day at least it seems that way.

 I have the following in my LoginCommand.as

 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent;

 if (event.result.length  0) {
 model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
 }
 else {
 model.login.statusMsg = Your login credentials are invalid, please
try again.;
 }
 }

 1. Is there anything wrong with the way I am doing the above?
 2. I would like to call some other remote objects s! o I can populate
some datagrids after the user has been authenticated and then load the
home page of the app as I am doing above.




 --
 WARNING
 ---
 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.

 AVIS IMPORTANT
 --
 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.





RE: [flexcoders] Re: Cairngorm question

2006-06-06 Thread Steven Webster





Bjorn,

This is high on our list of priorities (Flex Data Services 
and Cairngorm) !

Best,
Steven



  
  

  


  
  

Steven WebsterPractice Director (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6108
m: +44 (0)7917 428 947[EMAIL PROTECTED] 
  


  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn 
  SchultheissSent: 06 June 2006 01:10To: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: Cairngorm 
  question
  
  
  Steven,As a 
  request. 
  
  I am very interested 
  in your teams ideas of the cairngorm framework that fully utilizes Flex Data 
  Services.
  I assume the Flex2 
  release isnt far away and I hope an example of this isnt 
  either.
  
  Bjorn
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of Steven 
  WebsterSent: Tuesday, 6 June 
  2006 7:41 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: Cairngorm 
  question
  
  Hi guys,As I'm sure you're aware, 
  the product team are gearing up for Flex 2release. As the product 
  goes through it's final revs towards release,we're focussing our time on 
  ensuring that the next release of Cairngormand the samples are aligned 
  with the final product release.There will be a significant increase in 
  the amount of docs and articlesfrom that point forwards.In the 
  meantime, if you have any specific questions, we'll do our utmostto answer 
  them here in the meantime 
  !Best,Steven Steven 
  WebsterPractice Director (Rich Internet Applications)Adobe 
  ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108m: 
  +44 (0) 7917 428 947 [EMAIL PROTECTED]  -Original 
  Message- From: flexcoders@yahoogroups.com  
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of Mike Britton Sent: 05 June 2006 20:11 To: 
  flexcoders@yahoogroups.com 
  Subject: [flexcoders] Re: Cairngorm question  For what it's 
  worth, I'm also interested in either the  updated articles for 
  CG2B3/Flex 2.0 or a *basic* sample  application, before the Flex 2 
  release if possible.  Mike
 Yahoo! Groups Sponsor  
  ~-- Protect your PC from spy ware with  award 
  winning anti spy technology. It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/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  
 

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  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] Re: Cairngorm question

2006-06-05 Thread Mike Britton



For what it's worth, I'm also interested in either the updated
articles for CG2B3/Flex 2.0 or a *basic* sample application, before
the Flex 2 release if possible.

Mike









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Re: Cairngorm question

2006-06-05 Thread Steven Webster



Hi guys,

As I'm sure you're aware, the product team are gearing up for Flex 2
release. As the product goes through it's final revs towards release,
we're focussing our time on ensuring that the next release of Cairngorm
and the samples are aligned with the final product release.

There will be a significant increase in the amount of docs and articles
from that point forwards.

In the meantime, if you have any specific questions, we'll do our utmost
to answer them here in the meantime !

Best,

Steven

  Steven Webster
Practice Director (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6108
m: +44 (0) 7917 428 947 
[EMAIL PROTECTED] 

 

 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Mike Britton
 Sent: 05 June 2006 20:11
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cairngorm question
 
 For what it's worth, I'm also interested in either the 
 updated articles for CG2B3/Flex 2.0 or a *basic* sample 
 application, before the Flex 2 release if possible.
 
 Mike
 
 
 
 
 
  Yahoo! Groups Sponsor 
 ~-- Protect your PC from spy ware with 
 award winning anti spy technology. It's free.
 http://us.click.yahoo.com/97bhrC/LGxNAA/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
 
 
 
 
 
 
 
 






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Re: Cairngorm question

2006-06-05 Thread Bjorn Schultheiss










Steven,
As a request. 



I am very interested in your teams
ideas of the cairngorm framework that fully utilizes Flex Data Services.

I assume the Flex2 release isnt far
away and I hope an example of this isnt either.



Bjorn











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steven Webster
Sent: Tuesday, 6 June 2006 7:41 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
Cairngorm question





Hi guys,

As I'm sure you're aware, the product team are gearing up for Flex 2
release. As the product goes through it's final revs towards release,
we're focussing our time on ensuring that the next release of Cairngorm
and the samples are aligned with the final product release.

There will be a significant increase in the amount of docs and articles
from that point forwards.

In the meantime, if you have any specific questions, we'll do our utmost
to answer them here in the meantime !

Best,

Steven

 Steven Webster
Practice Director (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh,
 EH12 9DQ, UK
p: +44 (0) 131 338 6108
m: +44 (0) 7917 428 947 
[EMAIL PROTECTED] 



 -Original Message-
 From: flexcoders@yahoogroups.com

 [mailto:flexcoders@yahoogroups.com]
On Behalf Of Mike Britton
 Sent: 05 June 2006 20:11
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cairngorm question
 
 For what it's worth, I'm also interested in either the 
 updated articles for CG2B3/Flex 2.0 or a *basic* sample 
 application, before the Flex 2 release if possible.
 
 Mike
 
 
 
 
 
  Yahoo! Groups Sponsor 
 ~-- Protect your PC from spy ware with 
 award winning anti spy technology. It's free.
 http://us.click.yahoo.com/97bhrC/LGxNAA/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
 
 
 
 
 
 
 
 



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  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] Re: Cairngorm question

2006-06-01 Thread Tim Hoff



Hi Michael,
Probably the best place to start is by reading this article series:
http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html
From there you can continue to learn from the articles and samples available at Adobe.
Sincerely,Tim Hoff
--- In flexcoders@yahoogroups.com, "Michael" [EMAIL PROTECTED] wrote: Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help!  Michael






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Cairngorm Question

2006-01-25 Thread Leon Tanner
Dave,
I am going to test the servlet method (all made perfect sense) - just
wanted to say thanks for the time to write your suggestions - its
appreciated :)
Regards
Leon


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Wolf
Sent: 24 January 2006 13:52
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm Question


Hi Leon,

A couple things here.

1) In ANT you can, at build time, replace tokenized values in any
file.  We do this quite a lot.  So for instance you could modify your
flex-config to do

amf-gateway/@webappname@/amfgateway/amf-gateway

Now when you do your build and copy the file in, you can do
replacements of the @token@ token.  Something like:

  copy todir=${build.dir}
fileset dir=${src.dir}/
filterset
  filter token=webappname value=${web.app.name}/
/filterset
  /copy

You can then prompt for the web app name during the build.

2) If you cant do this during the build you can do it at runtime in a
few ways.  First would be a servlet, listed to load at startup and
placed in order 1.  The servlet would find out its current context,
then modify the flex-config.xml file itself replacing the web app name
with whatever the name is of its own file.  This would be purely J2EE
agnostic.  If though you're using Tomcat you can also do this with a
Tomcat listener.  Effectively the listener fires at server boot and
you could again replace values.  But the prior solution would work on
any app server and without messing with your clients servers.

I hope that helps.

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY


--- In flexcoders@yahoogroups.com, Leon Tanner [EMAIL PROTECTED] wrote:

 Ok, we've gone down the route of using mxmlc.jar for precompilation.
 The reason is purely to include data within the SWF to save a return
 trip to the server - and also to reduce the load on the server at
 initial request time.  
 
 Our process is essentially running a series of Ant tasks that firstly
 compile all our Java classes, secondly precompile our MXML and lastly
 create a WAR ready for deployment.  
 
 Since the MXML is precompiled without using the Flex server
whatsoever,
 we need to specify the gateway to the compiler - this is currently
done
 in flex-config.xml.  At present we can't find a way to make this
 relative - i.e. not to include the name of the root directory.  For
 example:
 
 amf-gateway/myFlexApp/amfgateway/amf-gateway
 
 Ideally what we'd like is:
 
 amf-gateway./amfgateway/amf-gateway
 
 The reason why we'd like this is - when we create a WAR and deploy to
 our customers, we don't have control over what they choose to name the
 WAR file.  Since the name of the WAR file relates to the root
directory
 name and we can't find a way to make that value relative, we have a
hugs
 issue here!
 
 Has anyone come across this or have any ideas we could try to get
around
 it?
 
 Thanks
 L
 
  
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Darron J. Schall
 Sent: 24 January 2006 00:45
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: Cairngorm Question
 
 Dave Wolf wrote:
  I was just shown your weblog today about this and they are awesome. 
  The crazy part is they look a ton like ours.  Guess you have a
couple
  of smart people and they reach the same conclusions!  Really great
  posting Darron.  We have tons of macros for everything from
compiling
  the swf, the rsl's, java jars, deploying web services etc.
 

 Not so crazy - I was talking with Ted on IM when he was working on
them 
 for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
 there's a learning curve.. but it's a powerful technology and one
worth 
 learning, in my opinion.
 
 -d
 
 
 
 --
 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



 






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




RE: [flexcoders] Re: Cairngorm Question

2006-01-25 Thread Leon Tanner
Peter,
I didn't notice this mxmlc argument this before now!  I am going to test
this along with Dave Wolf's earlier suggestions - again just wanted to
say thanks for the heads up - as always appreciate the help from you
guys :)
Regards
Leon



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Watson
Sent: 24 January 2006 18:32
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Cairngorm Question

Hi Leon,
 
This mxmlc option will enable setting the amfgateway url @ runtime:
 
-remoteallowurloverride 
 
 
It will allow you to externally control the amfgateway via the html
wrapper via either of the following usages: 
 
param name='flashVars'
value='gatewayUrl=http://myMachine:8700/samples/amfgateway'
 
Or
 
param name='src'
value='roTest.swf?gatewayUrl=http://myMachine:8700/samples/amfgateway'
 
 
 
regards,
peter

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Leon Tanner
Sent: Tuesday, January 24, 2006 4:46 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Cairngorm Question

Ok, we've gone down the route of using mxmlc.jar for precompilation.
The reason is purely to include data within the SWF to save a return
trip to the server - and also to reduce the load on the server at
initial request time.  

Our process is essentially running a series of Ant tasks that firstly
compile all our Java classes, secondly precompile our MXML and lastly
create a WAR ready for deployment.  

Since the MXML is precompiled without using the Flex server whatsoever,
we need to specify the gateway to the compiler - this is currently done
in flex-config.xml.  At present we can't find a way to make this
relative - i.e. not to include the name of the root directory.  For
example:

amf-gateway/myFlexApp/amfgateway/amf-gateway

Ideally what we'd like is:

amf-gateway./amfgateway/amf-gateway

The reason why we'd like this is - when we create a WAR and deploy to
our customers, we don't have control over what they choose to name the
WAR file.  Since the name of the WAR file relates to the root directory
name and we can't find a way to make that value relative, we have a hugs
issue here!

Has anyone come across this or have any ideas we could try to get around
it?

Thanks
L

 



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: 24 January 2006 00:45
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm Question

Dave Wolf wrote:
 I was just shown your weblog today about this and they are awesome. 
 The crazy part is they look a ton like ours.  Guess you have a couple
 of smart people and they reach the same conclusions!  Really great
 posting Darron.  We have tons of macros for everything from compiling
 the swf, the rsl's, java jars, deploying web services etc.

   
Not so crazy - I was talking with Ted on IM when he was working on them 
for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
there's a learning curve.. but it's a powerful technology and one worth 
learning, in my opinion.

-d



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



 




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

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




RE: [flexcoders] Re: Cairngorm Question

2006-01-24 Thread Leon Tanner
Ok, we've gone down the route of using mxmlc.jar for precompilation.
The reason is purely to include data within the SWF to save a return
trip to the server - and also to reduce the load on the server at
initial request time.  

Our process is essentially running a series of Ant tasks that firstly
compile all our Java classes, secondly precompile our MXML and lastly
create a WAR ready for deployment.  

Since the MXML is precompiled without using the Flex server whatsoever,
we need to specify the gateway to the compiler - this is currently done
in flex-config.xml.  At present we can't find a way to make this
relative - i.e. not to include the name of the root directory.  For
example:

amf-gateway/myFlexApp/amfgateway/amf-gateway

Ideally what we'd like is:

amf-gateway./amfgateway/amf-gateway

The reason why we'd like this is - when we create a WAR and deploy to
our customers, we don't have control over what they choose to name the
WAR file.  Since the name of the WAR file relates to the root directory
name and we can't find a way to make that value relative, we have a hugs
issue here!

Has anyone come across this or have any ideas we could try to get around
it?

Thanks
L

 



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: 24 January 2006 00:45
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm Question

Dave Wolf wrote:
 I was just shown your weblog today about this and they are awesome. 
 The crazy part is they look a ton like ours.  Guess you have a couple
 of smart people and they reach the same conclusions!  Really great
 posting Darron.  We have tons of macros for everything from compiling
 the swf, the rsl's, java jars, deploying web services etc.

   
Not so crazy - I was talking with Ted on IM when he was working on them 
for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
there's a learning curve.. but it's a powerful technology and one worth 
learning, in my opinion.

-d



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

* 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] Re: Cairngorm Question

2006-01-24 Thread Dave Wolf

Hi Leon,

A couple things here.

1) In ANT you can, at build time, replace tokenized values in any
file.  We do this quite a lot.  So for instance you could modify your
flex-config to do

amf-gateway/@webappname@/amfgateway/amf-gateway

Now when you do your build and copy the file in, you can do
replacements of the @token@ token.  Something like:

  copy todir=${build.dir}
fileset dir=${src.dir}/
filterset
  filter token=webappname value=${web.app.name}/
/filterset
  /copy

You can then prompt for the web app name during the build.

2) If you cant do this during the build you can do it at runtime in a
few ways.  First would be a servlet, listed to load at startup and
placed in order 1.  The servlet would find out its current context,
then modify the flex-config.xml file itself replacing the web app name
with whatever the name is of its own file.  This would be purely J2EE
agnostic.  If though you're using Tomcat you can also do this with a
Tomcat listener.  Effectively the listener fires at server boot and
you could again replace values.  But the prior solution would work on
any app server and without messing with your clients servers.

I hope that helps.

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY


--- In flexcoders@yahoogroups.com, Leon Tanner [EMAIL PROTECTED] wrote:

 Ok, we've gone down the route of using mxmlc.jar for precompilation.
 The reason is purely to include data within the SWF to save a return
 trip to the server - and also to reduce the load on the server at
 initial request time.  
 
 Our process is essentially running a series of Ant tasks that firstly
 compile all our Java classes, secondly precompile our MXML and lastly
 create a WAR ready for deployment.  
 
 Since the MXML is precompiled without using the Flex server whatsoever,
 we need to specify the gateway to the compiler - this is currently done
 in flex-config.xml.  At present we can't find a way to make this
 relative - i.e. not to include the name of the root directory.  For
 example:
 
 amf-gateway/myFlexApp/amfgateway/amf-gateway
 
 Ideally what we'd like is:
 
 amf-gateway./amfgateway/amf-gateway
 
 The reason why we'd like this is - when we create a WAR and deploy to
 our customers, we don't have control over what they choose to name the
 WAR file.  Since the name of the WAR file relates to the root directory
 name and we can't find a way to make that value relative, we have a hugs
 issue here!
 
 Has anyone come across this or have any ideas we could try to get around
 it?
 
 Thanks
 L
 
  
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Darron J. Schall
 Sent: 24 January 2006 00:45
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: Cairngorm Question
 
 Dave Wolf wrote:
  I was just shown your weblog today about this and they are awesome. 
  The crazy part is they look a ton like ours.  Guess you have a couple
  of smart people and they reach the same conclusions!  Really great
  posting Darron.  We have tons of macros for everything from compiling
  the swf, the rsl's, java jars, deploying web services etc.
 

 Not so crazy - I was talking with Ted on IM when he was working on them 
 for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
 there's a learning curve.. but it's a powerful technology and one worth 
 learning, in my opinion.
 
 -d
 
 
 
 --
 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

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




RE: [flexcoders] Re: Cairngorm Question

2006-01-24 Thread Peter Watson
Hi Leon,
 
This mxmlc option will enable setting the amfgateway url @ runtime:
 
-remoteallowurloverride 
 
 
It will allow you to externally control the amfgateway via the html
wrapper via either of the following usages: 
 
param name='flashVars'
value='gatewayUrl=http://myMachine:8700/samples/amfgateway'
 
Or
 
param name='src'
value='roTest.swf?gatewayUrl=http://myMachine:8700/samples/amfgateway'
 
 
 
regards,
peter

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Leon Tanner
Sent: Tuesday, January 24, 2006 4:46 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Cairngorm Question

Ok, we've gone down the route of using mxmlc.jar for precompilation.
The reason is purely to include data within the SWF to save a return
trip to the server - and also to reduce the load on the server at
initial request time.  

Our process is essentially running a series of Ant tasks that firstly
compile all our Java classes, secondly precompile our MXML and lastly
create a WAR ready for deployment.  

Since the MXML is precompiled without using the Flex server whatsoever,
we need to specify the gateway to the compiler - this is currently done
in flex-config.xml.  At present we can't find a way to make this
relative - i.e. not to include the name of the root directory.  For
example:

amf-gateway/myFlexApp/amfgateway/amf-gateway

Ideally what we'd like is:

amf-gateway./amfgateway/amf-gateway

The reason why we'd like this is - when we create a WAR and deploy to
our customers, we don't have control over what they choose to name the
WAR file.  Since the name of the WAR file relates to the root directory
name and we can't find a way to make that value relative, we have a hugs
issue here!

Has anyone come across this or have any ideas we could try to get around
it?

Thanks
L

 



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: 24 January 2006 00:45
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm Question

Dave Wolf wrote:
 I was just shown your weblog today about this and they are awesome. 
 The crazy part is they look a ton like ours.  Guess you have a couple
 of smart people and they reach the same conclusions!  Really great
 posting Darron.  We have tons of macros for everything from compiling
 the swf, the rsl's, java jars, deploying web services etc.

   
Not so crazy - I was talking with Ted on IM when he was working on them 
for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
there's a learning curve.. but it's a powerful technology and one worth 
learning, in my opinion.

-d



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



 




--
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] Re: Cairngorm Question

2006-01-23 Thread fowleryj
Hi Robin,

Thanks again for all of the help so far.

The next question I have is for any and all Flexcoders whose
application is growing to a rather large size (100s of files, etc).
How are you keeping your compile time down? Our application takes
between 30 seconds to 1 minute to refresh, and this seems rather high.

Thank you,
YJ



On Fri, 20 Jan 2006 11:22:03 +1100, Robin Hilliard wrote:

We usually just bind the reference to the viewHelper down through the  
UI components, e.g.

registrar:TabTwo label=tab2 viewHelper={viewHelper}/

Remember that our model is kept in instance variables of the  
viewHelper. The viewHelper itself is either:

(a) instanciated as a tag in the mxml, or

(b) in our current implementation we have a singleton workspace  
viewHelper with methods to:
* create new viewHelper instances of various types, and
* methods to create workspaces of corresponding types.
In this current implementation have two sorts of commands -  
LaunchSearchCommand (creates a search in a new workspace) and  
SearchCommand (does a vanilla search and sends results to the view  
helper you pass to it).  LaunchSearchCommand.execute() gets a new  
SearchViewHelper from the workspace view helper (simple Factory  
pattern), broadcasts a Cairngorm event to SearchCommand passing the  
viewhelper it just got and the search criteria, and then calls the  
workspace view helper again to create a new search workspace view  
(spotyoursubappsgo.addChild(yourWorkspaceView, null, ,  
{viewHelper : viewHelper}), again passing the new view helper.  This  
means that the server request and the creation of the new workspace  
happen in parallel, and the timing of the return from the server  
(before or after the view has finished rendering) doesn't matter,  
because the viewHelper is ready to accept the server result, and the  
view will bind to the model in the viewHelper in its own time.   
Lastly (you don't have to do this) every view helper has a  
corresponding interface in the commands package e.g.  
ISearchViewHelper that the commands use to avoid depending on a  
concrete view helper implementation - the workspace view helper  
method return types are all in terms of these interfaces.

Sorry to give such a rushed description, it really needs some  
interaction diagrams to make it a bit clearer but hopefully you get  
the idea.

Cheers,
Robin

PS: BTW I don't mind doing this on-list, other people might find it  
useful.
PPS: I hope to make it to some US conferences this year, so I'll take  
you up on the drinks :-)

__

Robin Hilliard
Director - RocketBoots Pty Ltd
Professional Services for Macromedia Technologies
http://www.rocketboots.com.au

For schedule/availability call Pamela Higgins:
w+61 7 5451 0362
m+61 419 677 151
e[EMAIL PROTECTED]

or Direct:
m+61 418 414 341
f+61 2 9798 0070
e[EMAIL PROTECTED]

  *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***


On 20/01/2006, at 6:52 AM, fowleryj wrote:

 Hi Robin,

 We've started implementing your ideas to solve the multiple 
instances
 problem. Forgive me for the continued questions, but we're wondering
 how you are handling the propagation of the data contained in the
 onResult() method in the Command.

 For instance, one of our sub-applications is laid out in the 
following
 manner (with generic names and labels in this case):

 FileOne.mxml
 mx:HBox
   mx:ViewStack
 search:SearchScreen id=searchScreen label=Open/
 mx:Panel id=infoPanel label=Information
   mx:TabNavigator id=tabNavigator
 view:TabOne label=tab1/
 registrar:TabTwo label=tab2/
   /mx:TabNavigator
 /mx:Panel
   /mx:ViewStack
 /mx:HBox

 So in FileOneViewHelper.as, we broadcast an event to find the results
 of the user's search criteria, and in the Command's onResult(), we
 call the particular view helper's (in this case, FileOneViewHelper's)
 handleEvent() method, passing it the necessary data.

 Once the user selects the match they want to work with, we need to
 propagate that match's data to the tabs in the TabNavigator, so that
 the tabs can fill themselves appropriately. Previously we were doing
 this by broadcasting an event, but now we are faced with the issue of
 passing the data along to the various tabs (TabOne and TabTwo, for
 instance) from the parent ViewHelper. We've explored a few options
 and they all seem to involve significant amounts of hardcoding to
 drill down through the hierarchy. If it's not too much to ask, would
 you share with us your method of passing the data from – for example 
–
 a TabNavigator to its tabs?

 Thank you again for all of the time you've spent helping us with 
this.
 If you ever find yourselves in the Southern United States, drinks are
 on us. :)
 YJ





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

[flexcoders] Re: Cairngorm Question

2006-01-23 Thread Dave Wolf

We are firm believers of precompiling our applications when in
production rather then using the JIT MXML compiler.  We are big
proponents of ANT and automate the builds of not only the MXML but of
the entire production server.  With one command line we build the
entire site ready to go into production.  Its very powerful and has an
immeasureable impact on productivity of our teams.  We've built some
very nice macros in ant that make building Flex applications very simple.

IMHO the JIT compiler is not how you want to run your production
application.

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY

--- In flexcoders@yahoogroups.com, fowleryj [EMAIL PROTECTED] wrote:

 Hi Robin,
 
 Thanks again for all of the help so far.
 
 The next question I have is for any and all Flexcoders whose
 application is growing to a rather large size (100s of files, etc).
 How are you keeping your compile time down? Our application takes
 between 30 seconds to 1 minute to refresh, and this seems rather high.
 
 Thank you,
 YJ
 
 
 
 On Fri, 20 Jan 2006 11:22:03 +1100, Robin Hilliard wrote:
 
 We usually just bind the reference to the viewHelper down through the  
 UI components, e.g.
 
 registrar:TabTwo label=tab2 viewHelper={viewHelper}/
 
 Remember that our model is kept in instance variables of the  
 viewHelper. The viewHelper itself is either:
 
 (a) instanciated as a tag in the mxml, or
 
 (b) in our current implementation we have a singleton workspace  
 viewHelper with methods to:
 * create new viewHelper instances of various types, and
 * methods to create workspaces of corresponding types.
 In this current implementation have two sorts of commands -  
 LaunchSearchCommand (creates a search in a new workspace) and  
 SearchCommand (does a vanilla search and sends results to the view  
 helper you pass to it).  LaunchSearchCommand.execute() gets a new  
 SearchViewHelper from the workspace view helper (simple Factory  
 pattern), broadcasts a Cairngorm event to SearchCommand passing the  
 viewhelper it just got and the search criteria, and then calls the  
 workspace view helper again to create a new search workspace view  
 (spotyoursubappsgo.addChild(yourWorkspaceView, null, ,  
 {viewHelper : viewHelper}), again passing the new view helper.  This  
 means that the server request and the creation of the new workspace  
 happen in parallel, and the timing of the return from the server  
 (before or after the view has finished rendering) doesn't matter,  
 because the viewHelper is ready to accept the server result, and the  
 view will bind to the model in the viewHelper in its own time.   
 Lastly (you don't have to do this) every view helper has a  
 corresponding interface in the commands package e.g.  
 ISearchViewHelper that the commands use to avoid depending on a  
 concrete view helper implementation - the workspace view helper  
 method return types are all in terms of these interfaces.
 
 Sorry to give such a rushed description, it really needs some  
 interaction diagrams to make it a bit clearer but hopefully you get  
 the idea.
 
 Cheers,
 Robin
 
 PS: BTW I don't mind doing this on-list, other people might find it  
 useful.
 PPS: I hope to make it to some US conferences this year, so I'll take  
 you up on the drinks :-)
 
 __
 
 Robin Hilliard
 Director - RocketBoots Pty Ltd
 Professional Services for Macromedia Technologies
 http://www.rocketboots.com.au
 
 For schedule/availability call Pamela Higgins:
 w+61 7 5451 0362
 m+61 419 677 151
 e[EMAIL PROTECTED]
 
 or Direct:
 m+61 418 414 341
 f+61 2 9798 0070
 e[EMAIL PROTECTED]
 
   *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***
 
 
 On 20/01/2006, at 6:52 AM, fowleryj wrote:
 
  Hi Robin,
 
  We've started implementing your ideas to solve the multiple 
 instances
  problem. Forgive me for the continued questions, but we're wondering
  how you are handling the propagation of the data contained in the
  onResult() method in the Command.
 
  For instance, one of our sub-applications is laid out in the 
 following
  manner (with generic names and labels in this case):
 
  FileOne.mxml
  mx:HBox
mx:ViewStack
  search:SearchScreen id=searchScreen label=Open/
  mx:Panel id=infoPanel label=Information
mx:TabNavigator id=tabNavigator
  view:TabOne label=tab1/
  registrar:TabTwo label=tab2/
/mx:TabNavigator
  /mx:Panel
/mx:ViewStack
  /mx:HBox
 
  So in FileOneViewHelper.as, we broadcast an event to find the results
  of the user's search criteria, and in the Command's onResult(), we
  call the particular view helper's (in this case, FileOneViewHelper's)
  handleEvent() method, passing it the necessary data.
 
  Once the user selects the match they want to work with, we need to
  propagate that match's data to the tabs in the TabNavigator, so that
 

Re: [flexcoders] Re: Cairngorm Question

2006-01-23 Thread Anatole Tartakovsky





For large applications I believe you have to do a 
bit of refactoring and start playing with RSLs.
Aside of the obvious reasons of performance gain 
during development by eliminating unnecessary recompilation it kind of force you 
to eliminate weak links and create "layered" components - based view of the 
application. It might save additional time if/when the team/project grows to 
extent that versioning and areas of responsibilities wouldmake single SWF 
not practical.
HTH,
Anatole

  - Original Message - 
  From: 
  fowleryj 
  
  To: flexcoders@yahoogroups.com 
  Sent: Monday, January 23, 2006 2:20 
  PM
  Subject: [flexcoders] Re: Cairngorm 
  Question
  Hi Robin,Thanks again for all of the help so 
  far.The next question I have is for any and all Flexcoders 
  whoseapplication is growing to a rather large size (100s of files, 
  etc).How are you keeping your compile time down? Our application 
  takesbetween 30 seconds to 1 minute to refresh, and this seems rather 
  high.Thank you,YJOn Fri, 20 Jan 2006 
  11:22:03 +1100, Robin Hilliard wrote:We usually just bind the 
  reference to the viewHelper down through the UI components, 
  e.g.registrar:TabTwo label="tab2" 
  viewHelper="{viewHelper}"/Remember that our model is kept in 
  instance variables of the viewHelper. The viewHelper itself is 
  either:(a) instanciated as a tag in the mxml, or(b) in our 
  current implementation we have a singleton workspace viewHelper with 
  methods to:* create new viewHelper instances of various types, and* 
  methods to create workspaces of corresponding types.In this current 
  implementation have two sorts of commands - LaunchSearchCommand 
  (creates a search in a new workspace) and SearchCommand (does a 
  vanilla search and sends results to the view helper you pass to 
  it). LaunchSearchCommand.execute() gets a new SearchViewHelper 
  from the workspace view helper (simple Factory pattern), broadcasts 
  a Cairngorm event to SearchCommand passing the viewhelper it just 
  got and the search criteria, and then calls the workspace view 
  helper again to create a new search workspace view 
  (spotyoursubappsgo.addChild(yourWorkspaceView, null, "", 
  {viewHelper : viewHelper}), again passing the new view helper. 
  This means that the server request and the creation of the new 
  workspace happen in parallel, and the timing of the return from the 
  server (before or after the view has finished rendering) doesn't 
  matter, because the viewHelper is ready to accept the server result, 
  and the view will bind to the model in the viewHelper in its own 
  time. Lastly (you don't have to do this) every view helper has 
  a corresponding interface in the commands package e.g. 
  ISearchViewHelper that the commands use to avoid depending on a 
  concrete view helper implementation - the workspace view helper 
  method return types are all in terms of these interfaces.Sorry to 
  give such a rushed description, it really needs some interaction 
  diagrams to make it a bit clearer but hopefully you get the 
  idea.Cheers,RobinPS: BTW I don't mind doing this on-list, 
  other people might find it useful.PPS: I hope to make it to some 
  US conferences this year, so I'll take you up on the drinks 
  :-)__Robin HilliardDirector - RocketBoots Pty 
  LtdProfessional Services for Macromedia Technologieshttp://www.rocketboots.com.auFor 
  schedule/availability call Pamela Higgins:w +61 7 5451 
  0362m +61 419 677 151e 
  [EMAIL PROTECTED]or Direct:m +61 418 414 
  341f +61 2 9798 0070e 
  [EMAIL PROTECTED] *** Register for WebDU http://www.mxdu.com 2-3 March 2006 
  ***On 20/01/2006, at 6:52 AM, fowleryj wrote: Hi 
  Robin, We've started implementing your ideas to solve the 
  "multiple instances problem." Forgive me for the continued 
  questions, but we're wondering how you are handling the propagation of 
  the data contained in the onResult() method in the 
  Command. For instance, one of our sub-applications is laid out 
  in the following manner (with generic names and labels in this 
  case): FileOne.mxml 
  mx:HBox 
  mx:ViewStack search:SearchScreen 
  id="searchScreen" label="Open"/ 
  mx:Panel id="infoPanel" 
  label="Information" 
  mx:TabNavigator 
  id="tabNavigator" 
  view:TabOne 
  label="tab1"/ 
  registrar:TabTwo 
  label="tab2"/ 
  /mx:TabNavigator 
  /mx:Panel /mx:ViewStack 
  /mx:HBox So in FileOneViewHelper.as, we broadcast an 
  event to find the results of the user's search criteria, and in the 
  Command's onResult(), we call the particular view helper's (in this 
  case, FileOneViewHelper's) handleEvent() method, passing it the 
  necessary data. Once the user selects the match they want to 
  work with, we need to propagate that match's data to the tabs in the 
  TabNavigator, so that the tabs can fill themselves appropriately. 
  

Re: [flexcoders] Re: Cairngorm Question

2006-01-23 Thread Darron J. Schall
Dave Wolf wrote:
 We are firm believers of precompiling our applications when in
 production rather then using the JIT MXML compiler.  We are big
 proponents of ANT and automate the builds of not only the MXML but of
 the entire production server.  With one command line we build the
 entire site ready to go into production.  Its very powerful and has an
 immeasureable impact on productivity of our teams.  We've built some
 very nice macros in ant that make building Flex applications very simple.
   

For the ANT macros Dave is talking about, check out the end of my weblog 
entry here:

http://www.darronschall.com/weblog/archives/000165.cfm

I outline how to build RSL's and .swf files from your .mxml.  This lets 
you precompile your Flex applications, allowing you to deploy those 
.swfs to the web server for production.

ANT rules for this kind of stuff.  Click a button and watch it go...

-d



--
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] Re: Cairngorm Question

2006-01-23 Thread Dave Wolf

I was just shown your weblog today about this and they are awesome. 
The crazy part is they look a ton like ours.  Guess you have a couple
of smart people and they reach the same conclusions!  Really great
posting Darron.  We have tons of macros for everything from compiling
the swf, the rsl's, java jars, deploying web services etc.

Ted might almost be a convert now :)

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY




--- In flexcoders@yahoogroups.com, Darron J. Schall [EMAIL PROTECTED] wrote:

 Dave Wolf wrote:
  We are firm believers of precompiling our applications when in
  production rather then using the JIT MXML compiler.  We are big
  proponents of ANT and automate the builds of not only the MXML but of
  the entire production server.  With one command line we build the
  entire site ready to go into production.  Its very powerful and has an
  immeasureable impact on productivity of our teams.  We've built some
  very nice macros in ant that make building Flex applications very
simple.

 
 For the ANT macros Dave is talking about, check out the end of my
weblog 
 entry here:
 
 http://www.darronschall.com/weblog/archives/000165.cfm
 
 I outline how to build RSL's and .swf files from your .mxml.  This lets 
 you precompile your Flex applications, allowing you to deploy those 
 .swfs to the web server for production.
 
 ANT rules for this kind of stuff.  Click a button and watch it go...
 
 -d







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




Re: [flexcoders] Re: Cairngorm Question

2006-01-23 Thread Darron J. Schall
Dave Wolf wrote:
 I was just shown your weblog today about this and they are awesome. 
 The crazy part is they look a ton like ours.  Guess you have a couple
 of smart people and they reach the same conclusions!  Really great
 posting Darron.  We have tons of macros for everything from compiling
 the swf, the rsl's, java jars, deploying web services etc.

   
Not so crazy - I was talking with Ted on IM when he was working on them 
for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
there's a learning curve.. but it's a powerful technology and one worth 
learning, in my opinion.

-d



--
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] Re: Cairngorm Question

2006-01-18 Thread fowleryj
Thank you Jeff, Bruno, and Robin. We're evaluating the options now,
and I'll get back to you with further questions. We appreciate your
swift responses very much. :)

--- In flexcoders@yahoogroups.com, Robin Hilliard [EMAIL PROTECTED] wrote:

 Hi YJ,
 
 RocketBoots is working with a development team on a large (100s of  
 classes) Flex 1.5 Cairngorm application at the moment with  
 potentially many instances of the same sub-application (we call  
 them workspaces) around at the same time - e.g. two searches, three  
 articles, a calculator etc.
 
 Here's our solution, which is working nicely.  Each type of workspace  
 has it's own viewHelper class.  Each workspace instance has it's own  
 viewHelper instance.  Because there are multiple instances it was  
 going to be difficult to use the ViewLocator and ModelLocator, so we  
 didn't.  Instead, when workspace instance X broadcasts an event, we  
 include a reference to the workspace's viewHelper in the event data.   
 The command's execute method caches this viewHelper in an instance  
 variable, and its onResult method uses the same viewHelper to display  
 the results.  The viewHelper instance also holds our model, using  
 instance instead of static variables (although we can imagine using  
 statics in some situations, for bits of the model shared across all  
 workspaces).
 
 Happy to answer further questions about this approach - this one has  
 been in the backlog of things to blog for a while.
 
 Cheers,
 Robin
 
 __
 
 Robin Hilliard
 Director - RocketBoots Pty Ltd
 Professional Services for Macromedia Technologies
 http://www.rocketboots.com.au
 
 For schedule/availability call Pamela Higgins:
 w+61 7 5451 0362
 m+61 419 677 151
 e[EMAIL PROTECTED]
 
 or Direct:
 m+61 418 414 341
 f+61 2 9798 0070
 e[EMAIL PROTECTED]
 
   *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***
 
 
 On 17/01/2006, at 1:37 AM, fowleryj wrote:
 
  We have been developing a fairly large application using Flex 1.5 and
  the Cairngorm framework, and have recently run across what could be a
  large roadblock. Our application has many sub-applications the user
  can choose to run from a menu in the main application. To implement
  this we are dynamically creating the children the user selects in a
  view stack. All of these sub-applications rely on a particular search
  screen that allows the user to find a particular person in our
  database. The problem is that the sub-applications are bound to the
  selection the user makes in the search screen, and are all reacting to
  the same events (which are broadcast from the search screen). We would
  like the search screens to function as separate instances. For
  example, if I broadcast a change event from the search screen, all of
  the open sub-applications will catch the event and change all of their
  displayed information to reflect that of the most recently selected
  person. Our problem appears to stem from the way the EventBroadcaster
  and FrontController are designed. All events are broadcast in the same
  EventBroadcaster using the getInstance() method, thus everything is
  listening for everything.
 
  Can anyone who is familiar with the intricacies of Cairngorm propose a
  way to deal with this problem? We would like to be able to return the
  information about the selected person only to the sub-application that
  invoked the search screen. Perhaps it is not possible to do this using
  Cairngorm, and we would appreciate knowing that, too.
 
  If anyone has a different/better solution, we'd love to hear about it.
 
  Thanks in advance.










--
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] Re: Cairngorm Question

2006-01-17 Thread fowleryj
Hi Robin,

Your application appears very organized and well thought-out. One
question: If workspace instance X broadcasts an event, and workspace
instance Y is also open (in this example, let's say that both X and Y
are instances of the search screen, and X just broadcasted a search
event), would workspace instance Y respond to the information
returned from the search? Are you using the EventBroadcaster exactly
as it exists in Cairngorm?

Thanks,
YJ

(Sorry if this is a duplicate post... I posted earlier today and never
saw the message make it to the mailing list.)

--- In flexcoders@yahoogroups.com, Robin Hilliard [EMAIL PROTECTED] wrote:

 Hi YJ,
 
 RocketBoots is working with a development team on a large (100s of  
 classes) Flex 1.5 Cairngorm application at the moment with  
 potentially many instances of the same sub-application (we call  
 them workspaces) around at the same time - e.g. two searches, three  
 articles, a calculator etc.
 
 Here's our solution, which is working nicely.  Each type of workspace  
 has it's own viewHelper class.  Each workspace instance has it's own  
 viewHelper instance.  Because there are multiple instances it was  
 going to be difficult to use the ViewLocator and ModelLocator, so we  
 didn't.  Instead, when workspace instance X broadcasts an event, we  
 include a reference to the workspace's viewHelper in the event data.   
 The command's execute method caches this viewHelper in an instance  
 variable, and its onResult method uses the same viewHelper to display  
 the results.  The viewHelper instance also holds our model, using  
 instance instead of static variables (although we can imagine using  
 statics in some situations, for bits of the model shared across all  
 workspaces).
 
 Happy to answer further questions about this approach - this one has  
 been in the backlog of things to blog for a while.
 
 Cheers,
 Robin
 
 __
 
 Robin Hilliard
 Director - RocketBoots Pty Ltd
 Professional Services for Macromedia Technologies
 http://www.rocketboots.com.au
 
 For schedule/availability call Pamela Higgins:
 w+61 7 5451 0362
 m+61 419 677 151
 e[EMAIL PROTECTED]
 
 or Direct:
 m+61 418 414 341
 f+61 2 9798 0070
 e[EMAIL PROTECTED]
 
   *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***
 
 
 On 17/01/2006, at 1:37 AM, fowleryj wrote:
 
  We have been developing a fairly large application using Flex 1.5 and
  the Cairngorm framework, and have recently run across what could be a
  large roadblock. Our application has many sub-applications the user
  can choose to run from a menu in the main application. To implement
  this we are dynamically creating the children the user selects in a
  view stack. All of these sub-applications rely on a particular search
  screen that allows the user to find a particular person in our
  database. The problem is that the sub-applications are bound to the
  selection the user makes in the search screen, and are all reacting to
  the same events (which are broadcast from the search screen). We would
  like the search screens to function as separate instances. For
  example, if I broadcast a change event from the search screen, all of
  the open sub-applications will catch the event and change all of their
  displayed information to reflect that of the most recently selected
  person. Our problem appears to stem from the way the EventBroadcaster
  and FrontController are designed. All events are broadcast in the same
  EventBroadcaster using the getInstance() method, thus everything is
  listening for everything.
 
  Can anyone who is familiar with the intricacies of Cairngorm propose a
  way to deal with this problem? We would like to be able to return the
  information about the selected person only to the sub-application that
  invoked the search screen. Perhaps it is not possible to do this using
  Cairngorm, and we would appreciate knowing that, too.
 
  If anyone has a different/better solution, we'd love to hear about it.
 
  Thanks in advance.







--
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] Re: Cairngorm Question

2006-01-17 Thread fowleryj
Robin,

Your setup seems very organized and well thought-out. One question:
What happens in your application if workspace instance X broadcasts an
event while the workspace instance Y is open (let's say for this
example that both X and Y are searches, and the event that is
broadcast is a search event)? Does workspace instance Y also receive
the results of the search? Are you using the EventBroadcaster exactly
as it exists in Cairngorm?

Thanks,
YJ

--- In flexcoders@yahoogroups.com, Robin Hilliard [EMAIL PROTECTED] wrote:

 Hi YJ,
 
 RocketBoots is working with a development team on a large (100s of  
 classes) Flex 1.5 Cairngorm application at the moment with  
 potentially many instances of the same sub-application (we call  
 them workspaces) around at the same time - e.g. two searches, three  
 articles, a calculator etc.
 
 Here's our solution, which is working nicely.  Each type of workspace  
 has it's own viewHelper class.  Each workspace instance has it's own  
 viewHelper instance.  Because there are multiple instances it was  
 going to be difficult to use the ViewLocator and ModelLocator, so we  
 didn't.  Instead, when workspace instance X broadcasts an event, we  
 include a reference to the workspace's viewHelper in the event data.   
 The command's execute method caches this viewHelper in an instance  
 variable, and its onResult method uses the same viewHelper to display  
 the results.  The viewHelper instance also holds our model, using  
 instance instead of static variables (although we can imagine using  
 statics in some situations, for bits of the model shared across all  
 workspaces).
 
 Happy to answer further questions about this approach - this one has  
 been in the backlog of things to blog for a while.
 
 Cheers,
 Robin
 
 __
 
 Robin Hilliard
 Director - RocketBoots Pty Ltd
 Professional Services for Macromedia Technologies
 http://www.rocketboots.com.au
 
 For schedule/availability call Pamela Higgins:
 w+61 7 5451 0362
 m+61 419 677 151
 e[EMAIL PROTECTED]
 
 or Direct:
 m+61 418 414 341
 f+61 2 9798 0070
 e[EMAIL PROTECTED]
 
   *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***
 
 
 On 17/01/2006, at 1:37 AM, fowleryj wrote:
 
  We have been developing a fairly large application using Flex 1.5 and
  the Cairngorm framework, and have recently run across what could be a
  large roadblock. Our application has many sub-applications the user
  can choose to run from a menu in the main application. To implement
  this we are dynamically creating the children the user selects in a
  view stack. All of these sub-applications rely on a particular search
  screen that allows the user to find a particular person in our
  database. The problem is that the sub-applications are bound to the
  selection the user makes in the search screen, and are all reacting to
  the same events (which are broadcast from the search screen). We would
  like the search screens to function as separate instances. For
  example, if I broadcast a change event from the search screen, all of
  the open sub-applications will catch the event and change all of their
  displayed information to reflect that of the most recently selected
  person. Our problem appears to stem from the way the EventBroadcaster
  and FrontController are designed. All events are broadcast in the same
  EventBroadcaster using the getInstance() method, thus everything is
  listening for everything.
 
  Can anyone who is familiar with the intricacies of Cairngorm propose a
  way to deal with this problem? We would like to be able to return the
  information about the selected person only to the sub-application that
  invoked the search screen. Perhaps it is not possible to do this using
  Cairngorm, and we would appreciate knowing that, too.
 
  If anyone has a different/better solution, we'd love to hear about it.
 
  Thanks in advance.







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




Re: [flexcoders] Re: Cairngorm Question

2006-01-17 Thread Robin Hilliard
Hi YJ,

Sure - the Cairngorm code is unmodified.  For instance, in your view  
you might have:


private var viewHelper : OurViewHelper;
private var searchDefinition : SearchDefinitionVO;
...
EventBroadcaster.getInstance().broadcastEvent 
(OurController.SEARCH_COMMAND,
{viewHelper:viewHelper, searchDefinition:searchDefinition});


And in the command:


private var cachedViewHelper : OurViewHelper;

function execute(event : Event) : Void {
cachedViewHelper = event.data.viewHelper;
delegate.search(event.data.searchDefinition);
}

public function onResult(event : Object) : Void {
cachedViewHelper.showSearchResult(SearchResultCollectionVO 
(event.result));
}

There is a bit more to talk about regarding the initial creation of  
the view helpers and views which I hope to blog soon, but if you have  
more specific questions fire away.

Cheers,
Robin

__

Robin Hilliard
Director - RocketBoots Pty Ltd
Professional Services for Macromedia Technologies
http://www.rocketboots.com.au

For schedule/availability call Pamela Higgins:
w+61 7 5451 0362
m+61 419 677 151
e[EMAIL PROTECTED]

or Direct:
m+61 418 414 341
f+61 2 9798 0070
e[EMAIL PROTECTED]

  *** Register for WebDU http://www.mxdu.com 2-3 March 2006 ***


On 18/01/2006, at 5:50 AM, fowleryj wrote:

 Hi Robin,

 Your application appears very organized and well thought-out. One
 question: If workspace instance X broadcasts an event, and workspace
 instance Y is also open (in this example, let's say that both X and Y
 are instances of the search screen, and X just broadcasted a search
 event), would workspace instance Y respond to the information
 returned from the search? Are you using the EventBroadcaster exactly
 as it exists in Cairngorm?

 Thanks,
 YJ



--
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] Re: Cairngorm question

2005-08-30 Thread Daniel Harfleet
Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:
 Hi all,
 
 The Cairngorm samples are a great resource for understanding how to
best 
 arquitect an specific kind of applications; in this case, applications 
 that talk syncly with some servers that expose some services.
 
 Imagine now that Im building an application which implements,
somewhere, 
 some kind of asynchronous services: a flash comm server chat , for 
 example. This service must be running, in the background, even if im 
 visually working in another part of the application, entering some data 
 for new providers or whatever. So the question is, where is the best 
 place to initialise these services? Or how can I place/work with these 
 services within this arquitecture?
 
 My choice would probably be to initialise evrything inside a 
 initialise() function in the model locator and then use some public 
 var there to control msgs and status of this service and then bind
the 
 chat components to these vars.
 
 I hope someone can help chosing the best option.
 
 Thanks all in advance.
 
 -- 
 Alberto Albericio Salvador
 Aura S.A. Seguros
 Departamento Informática





 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/
 




Re: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alberto Albericio Salvador
Thank you Daniel, if no more suggestions/corrections are done, I will 
take that choice.

Of course a recovery plan was planed plus de mute option is also welcome. :)


Daniel Harfleet escribió:

Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:
  

Hi all,

The Cairngorm samples are a great resource for understanding how to


best 
  

arquitect an specific kind of applications; in this case, applications 
that talk syncly with some servers that expose some services.

Imagine now that Im building an application which implements,


somewhere, 
  

some kind of asynchronous services: a flash comm server chat , for 
example. This service must be running, in the background, even if im 
visually working in another part of the application, entering some data 
for new providers or whatever. So the question is, where is the best 
place to initialise these services? Or how can I place/work with these 
services within this arquitecture?

My choice would probably be to initialise evrything inside a 
initialise() function in the model locator and then use some public 
var there to control msgs and status of this service and then bind


the 
  

chat components to these vars.

I hope someone can help chosing the best option.

Thanks all in advance.

-- 
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática








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



 



  



-- 
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática



 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/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/
 





RE: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alex Uhlmann
Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we have 
developed, we call these Listeners. 

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server (via 
FlashComm) or generated on the client. Everything else about your Cairngorm 
architecture remains the same - using the ModelLocator for instance, to have 
your commands updating the model, and binding the view to the state of your 
model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes such 
as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:
 Hi all,
 
 The Cairngorm samples are a great resource for understanding how to
best 
 arquitect an specific kind of applications; in this case, applications 
 that talk syncly with some servers that expose some services.
 
 Imagine now that Im building an application which implements,
somewhere, 
 some kind of asynchronous services: a flash comm server chat , for 
 example. This service must be running, in the background, even if im 
 visually working in another part of the application, entering some data 
 for new providers or whatever. So the question is, where is the best 
 place to initialise these services? Or how can I place/work with these 
 services within this arquitecture?
 
 My choice would probably be to initialise evrything inside a 
 initialise() function in the model locator and then use some public 
 var there to control msgs and status of this service and then bind
the 
 chat components to these vars.
 
 I hope someone can help chosing the best option.
 
 Thanks all in advance.
 
 -- 
 Alberto Albericio Salvador
 Aura S.A. Seguros
 Departamento Informática





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

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


 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/
 




Re: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alberto Albericio Salvador
Hi Alex,

I like the idea of Listeners and they way you point to manage server 
pushes injecting events and data to the Cairngorm architecture. Mainly 
because server pushes are treat just like if they were data from a 
user-gesture.

If possible, send me a sample code for one of these Listeners, just a 
short one so I can see how to initialise the subscription and how 
handlers for server pushes are defined. I can imagine it's somehow 
similar to a business delegate class calling a remoteobject but I dont 
see how to leave these services in the background listening and 
waiting for server pushes.

Thanks for your help Alex.


Alex Uhlmann escribió:

Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we 
have developed, we call these Listeners. 

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server (via 
FlashComm) or generated on the client. Everything else about your Cairngorm 
architecture remains the same - using the ModelLocator for instance, to have 
your commands updating the model, and binding the view to the state of your 
model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes 
such as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:
  

Hi all,

The Cairngorm samples are a great resource for understanding how to


best 
  

arquitect an specific kind of applications; in this case, applications 
that talk syncly with some servers that expose some services.

Imagine now that Im building an application which implements,


somewhere, 
  

some kind of asynchronous services: a flash comm server chat , for 
example. This service must be running, in the background, even if im 
visually working in another part of the application, entering some data 
for new providers or whatever. So the question is, where is the best 
place to initialise these services? Or how can I place/work with these 
services within this arquitecture?

My choice would probably be to initialise evrything inside a 
initialise() function in the model locator and then use some public 
var there to control msgs and status of this service and then bind


the 
  

chat components to these vars.

I hope someone can help chosing the best option.

Thanks all in advance.

-- 
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática







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

 Visit your group flexcoders on the web.
  
 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



 



  



-- 
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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

Re: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alberto Albericio Salvador
No problem Alex, I was looking for the easy way. I will make a look at 
those papers.

Thanks anyway

Alex Uhlmann escribió:

Alberto,

the Flash Player's SharedObject class listens to server pushes. There's much 
information on remote SharedObjects in Macromedia documentations such as the 
FlashComm Live docs. Sorry, I don't have a generic example right now that 
doesn't belong to a client.

hope it helps,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 14:25
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi Alex,

I like the idea of Listeners and they way you point to manage server
pushes injecting events and data to the Cairngorm architecture. Mainly
because server pushes are treat just like if they were data from a
user-gesture.

If possible, send me a sample code for one of these Listeners, just a
short one so I can see how to initialise the subscription and how
handlers for server pushes are defined. I can imagine it's somehow
similar to a business delegate class calling a remoteobject but I dont
see how to leave these services in the background listening and
waiting for server pushes.

Thanks for your help Alex.


Alex Uhlmann escribió:

  

Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we 
have developed, we call these Listeners.

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server (via 
FlashComm) or generated on the client. Everything else about your Cairngorm 
architecture remains the same - using the ModelLocator for instance, to have 
your commands updating the model, and binding the view to the state of your 
model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes 
such as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:




Hi all,

The Cairngorm samples are a great resource for understanding how to
 

  

best




arquitect an specific kind of applications; in this case, applications
that talk syncly with some servers that expose some services.

Imagine now that Im building an application which implements,
 

  

somewhere,




some kind of asynchronous services: a flash comm server chat , for
example. This service must be running, in the background, even if im
visually working in another part of the application, entering some data
for new providers or whatever. So the question is, where is the best
place to initialise these services? Or how can I place/work with these
services within this arquitecture?

My choice would probably be to initialise evrything inside a
initialise() function in the model locator and then use some public
var there to control msgs and status of this service and then bind
 

  

the




chat components to these vars.

I hope someone can help chosing the best option.

Thanks all in advance.

--
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática
 

  




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

Visit your group flexcoders on the web.

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

Re: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alberto Albericio Salvador
Hi again,

Im trying to create a business delegate class for handling a connection 
to, for example, an xml socket.

When trying to delegate onXML to the responder it keeps on saying there 
is not such property on the responder, but of course there is. If I 
define the function inside de business delegate class, it works 
(changing responder.myOnXML for myOnXML, of course)

I have something like this on my command class:

class org.nevis.cairngorm.prexon.commands.SubscribeCommand implements 
Command, Responder {
   public function execute( event:Event ) : Void {
var delegate: SubscriberDelegate = new SubscriberDelegate( this );
delegate.subscribe( );
}

public function myOnXML( event : Object ): Void {
mx.core.Application.alert(RESPONDER OK);
}
..
}

And the business delegate has:

this.responder = responder; (the parameter for the class)
myListener.onXML = Delegate.create( responder, responder.myOnXML );
...

What Im I doing wrong? Is it okay setting a responder here? Cause I have 
to define a result and fault handler im never using for this kind of 
services...


Alberto Albericio Salvador escribió:

No problem Alex, I was looking for the easy way. I will make a look at 
those papers.

Thanks anyway

Alex Uhlmann escribió:

  

Alberto,

the Flash Player's SharedObject class listens to server pushes. There's much 
information on remote SharedObjects in Macromedia documentations such as the 
FlashComm Live docs. Sorry, I don't have a generic example right now that 
doesn't belong to a client.

hope it helps,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 14:25
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi Alex,

I like the idea of Listeners and they way you point to manage server
pushes injecting events and data to the Cairngorm architecture. Mainly
because server pushes are treat just like if they were data from a
user-gesture.

If possible, send me a sample code for one of these Listeners, just a
short one so I can see how to initialise the subscription and how
handlers for server pushes are defined. I can imagine it's somehow
similar to a business delegate class calling a remoteobject but I dont
see how to leave these services in the background listening and
waiting for server pushes.

Thanks for your help Alex.


Alex Uhlmann escribió:

 



Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we 
have developed, we call these Listeners.

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server 
(via FlashComm) or generated on the client. Everything else about your 
Cairngorm architecture remains the same - using the ModelLocator for 
instance, to have your commands updating the model, and binding the view to 
the state of your model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes 
such as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:


   

  

Hi all,

The Cairngorm samples are a great resource for understanding how to


 



best


   

  

arquitect an specific kind of applications; in this case, applications
that talk syncly with some servers that expose some services.

Imagine now that Im building an application which implements,


 



somewhere,


   

  

some kind of asynchronous services: a flash comm server chat , for
example. This service must be running

RE: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alex Uhlmann
Alberto,

your responder is probably of type Responder and Responder is the interface 
that only contains onResult and onFault. See Cairngorm docs. I suggest you 
implement the communication from your listener to the command via 
EventBroadcaster.

Best,
Alex

-- 
Alex Uhlmann 
Software Engineer 
iteration::two
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 18:32
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi again,

Im trying to create a business delegate class for handling a connection 
to, for example, an xml socket.

When trying to delegate onXML to the responder it keeps on saying there 
is not such property on the responder, but of course there is. If I 
define the function inside de business delegate class, it works 
(changing responder.myOnXML for myOnXML, of course)

I have something like this on my command class:

class org.nevis.cairngorm.prexon.commands.SubscribeCommand implements 
Command, Responder {
   public function execute( event:Event ) : Void {
var delegate: SubscriberDelegate = new SubscriberDelegate( this );
delegate.subscribe( );
}

public function myOnXML( event : Object ): Void {
mx.core.Application.alert(RESPONDER OK);
}
..
}

And the business delegate has:

this.responder = responder; (the parameter for the class)
myListener.onXML = Delegate.create( responder, responder.myOnXML );
...

What Im I doing wrong? Is it okay setting a responder here? Cause I have 
to define a result and fault handler im never using for this kind of 
services...


Alberto Albericio Salvador escribió:

No problem Alex, I was looking for the easy way. I will make a look at 
those papers.

Thanks anyway

Alex Uhlmann escribió:

  

Alberto,

the Flash Player's SharedObject class listens to server pushes. There's much 
information on remote SharedObjects in Macromedia documentations such as the 
FlashComm Live docs. Sorry, I don't have a generic example right now that 
doesn't belong to a client.

hope it helps,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 14:25
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi Alex,

I like the idea of Listeners and they way you point to manage server
pushes injecting events and data to the Cairngorm architecture. Mainly
because server pushes are treat just like if they were data from a
user-gesture.

If possible, send me a sample code for one of these Listeners, just a
short one so I can see how to initialise the subscription and how
handlers for server pushes are defined. I can imagine it's somehow
similar to a business delegate class calling a remoteobject but I dont
see how to leave these services in the background listening and
waiting for server pushes.

Thanks for your help Alex.


Alex Uhlmann escribió:

 



Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we 
have developed, we call these Listeners.

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server 
(via FlashComm) or generated on the client. Everything else about your 
Cairngorm architecture remains the same - using the ModelLocator for 
instance, to have your commands updating the model, and binding the view to 
the state of your model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes 
such as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders