Re: [flexcoders] Cairngorm ServiceLocator

2008-04-22 Thread Christophe Herreman
Hi Vivian,

we have recently been talking about this with the development team.
I agree with you that video tutorials would be a great aid, so I'll try to
put something together.

regards,
Christophe

-- 
Christophe Herreman
http://www.herrodius.com
http://www.pranaframework.org

2008/4/23 Vivian Richard <[EMAIL PROTECTED]>:

>
>
>Hey Christophe, is it possible that you create some video tutorial of
> Prana?
>I guess that way developers will be able to adopt it faster. Just my 2
> cents!!!
>
>
>
> On Tue, Apr 22, 2008 at 9:07 PM, Christophe Herreman <[EMAIL PROTECTED]>
> wrote:
>
> >   Hi Eric,
> >
> > have you looked at the modified CairngormServiceLocator in Prana?
> > http://www.herrodius.com/blog/131
> >
> > regards,
> > Christophe
> >
> > 2008/4/23 Eric Cancil <[EMAIL PROTECTED]>:
> >
> > >   I think a little more thought could be put into this class.  Due to
> > > the fact that it uses describeType to discover the services that have been
> > > added to it, and it is not a dynamic class/ does not have any way to
> > > dynamically add services at runtime...it makes it in my view impossible to
> > > add say for example services that youve loaded in an initialization file 
> > > at
> > > runtime.  If an accessor method to add service at runtime was added I 
> > > think
> > > it would make this class a lot more dynamic.  Instead it relies on MXML
> > > being compiled down to AS and variables automatically being added.
> > >
> > > Any thoughts?
> > > Eric
> > >
> > > Ps... please dont suggest to roll my own locator, i know ;)
> > >
> >
> >
> >
> > --
> > Christophe Herreman
> > http://www.herrodius.com
> > http://www.pranaframework.org
> >
>
>  
>



-- 
Christophe Herreman
http://www.herrodius.com
http://www.pranaframework.org


Re: [flexcoders] Cairngorm ServiceLocator

2008-04-22 Thread Vivian Richard
   Hey Christophe, is it possible that you create some video tutorial of
Prana?
   I guess that way developers will be able to adopt it faster. Just my 2
cents!!!



On Tue, Apr 22, 2008 at 9:07 PM, Christophe Herreman <[EMAIL PROTECTED]>
wrote:

>   Hi Eric,
>
> have you looked at the modified CairngormServiceLocator in Prana?
> http://www.herrodius.com/blog/131
>
> regards,
> Christophe
>
> 2008/4/23 Eric Cancil <[EMAIL PROTECTED]>:
>
> >   I think a little more thought could be put into this class.  Due to
> > the fact that it uses describeType to discover the services that have been
> > added to it, and it is not a dynamic class/ does not have any way to
> > dynamically add services at runtime...it makes it in my view impossible to
> > add say for example services that youve loaded in an initialization file at
> > runtime.  If an accessor method to add service at runtime was added I think
> > it would make this class a lot more dynamic.  Instead it relies on MXML
> > being compiled down to AS and variables automatically being added.
> >
> > Any thoughts?
> > Eric
> >
> > Ps... please dont suggest to roll my own locator, i know ;)
> >
>
>
>
> --
> Christophe Herreman
> http://www.herrodius.com
> http://www.pranaframework.org
> 
>


Re: [flexcoders] Cairngorm ServiceLocator

2008-04-22 Thread Christophe Herreman
Hi Eric,

have you looked at the modified CairngormServiceLocator in Prana?
http://www.herrodius.com/blog/131

regards,
Christophe

2008/4/23 Eric Cancil <[EMAIL PROTECTED]>:

>   I think a little more thought could be put into this class.  Due to the
> fact that it uses describeType to discover the services that have been added
> to it, and it is not a dynamic class/ does not have any way to dynamically
> add services at runtime...it makes it in my view impossible to add say for
> example services that youve loaded in an initialization file at runtime.  If
> an accessor method to add service at runtime was added I think it would make
> this class a lot more dynamic.  Instead it relies on MXML being compiled
> down to AS and variables automatically being added.
>
> Any thoughts?
> Eric
>
> Ps... please dont suggest to roll my own locator, i know ;)
>  
>



-- 
Christophe Herreman
http://www.herrodius.com
http://www.pranaframework.org


[flexcoders] Cairngorm ServiceLocator

2008-04-22 Thread Eric Cancil
I think a little more thought could be put into this class.  Due to the fact
that it uses describeType to discover the services that have been added to
it, and it is not a dynamic class/ does not have any way to dynamically add
services at runtime...it makes it in my view impossible to add say for
example services that youve loaded in an initialization file at runtime.  If
an accessor method to add service at runtime was added I think it would make
this class a lot more dynamic.  Instead it relies on MXML being compiled
down to AS and variables automatically being added.

Any thoughts?
Eric

Ps... please dont suggest to roll my own locator, i know ;)


RE: [flexcoders] Cairngorm ServiceLocator Issue

2007-12-12 Thread Dimitrios Gianninas
ok do you have a log inside your java method, I assume u do, make sure it is 
the first line of code fo the method.
 
make sure the method names in Flex and Java match in case. I dont know what 
server u are running, but check your server's log, maybe there is an exception 
in there.
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manu 
Dhanda
Sent: Tuesday, December 11, 2007 11:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator Issue




Yes, server-side logging is set to "Debug".
I tried to put the Alert statement after my delegate.methodCall() and it is
reaching there.

I am not getting any errors anywhere, that is why I am confused like where
to look to sort out this issue.

Thanks.

Dimitrios Gianninas wrote:
> 
> Hi,
> 
> Things you can check are:
> 
> a) did u set the server-side logging to Debug in the services-config.xml
> file?
> b) is your command actually being called? add a trace statement in there
> to see if it, common problem is you forget to add an entry in the
> controller
> 
> are u getting any sort of error anywhere?
> 
> Dimitrios Gianninas
> Optimal Payments Inc.
> 
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  on 
> behalf of Manu Dhanda
> Sent: Tue 11/12/2007 11:23 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Cairngorm ServiceLocator Issue
> 
> 
> Hii..
> 
> Am wondering why I can not connect back to Java.
> Am using RemoteObject, have Services.mxml in place with the RemoteObject's
> defined in that.
> I have configured remoting-config.xml accordingly.
> I had initialized ServiceLocator in my application file.
> 
> But when I generate an event on client side(clicking a button), I supposed
> to see console output from java.
> 
> But, nothing happens with that. No compile time errors in code.
> 
> Can anyone guide me please.
> 
> Thanks.
> Manu.
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288802.html 
> <http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288802.html>
>  
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> -- 
> 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.
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288983.html 
<http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288983.html> 
Sent from the FlexCoders mailing list archive at Nabble.com.



 


RE: [flexcoders] Cairngorm ServiceLocator Issue

2007-12-11 Thread Manu Dhanda

Yes, server-side logging is set to "Debug".
I tried to put the Alert statement after my delegate.methodCall() and it is
reaching there.

I am not getting any errors anywhere, that is why I am confused like where
to look to sort out this issue.

Thanks.


Dimitrios Gianninas wrote:
> 
> Hi,
> 
> Things you can check are:
> 
> a) did u set the server-side logging to Debug in the services-config.xml
> file?
> b) is your command actually being called? add a trace statement in there
> to see if it, common problem is you forget to add an entry in the
> controller
> 
> are u getting any sort of error anywhere?
> 
> Dimitrios Gianninas
> Optimal Payments Inc.
> 
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com on behalf of Manu Dhanda
> Sent: Tue 11/12/2007 11:23 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Cairngorm ServiceLocator Issue
>  
> 
> Hii..
> 
> Am wondering why I can not connect back to Java.
> Am using RemoteObject, have Services.mxml in place with the RemoteObject's
> defined in that.
> I have configured remoting-config.xml accordingly.
> I had initialized ServiceLocator in my application file.
> 
> But when I generate an event on client side(clicking a button), I supposed
> to see console output from java.
> 
> But, nothing happens with that. No compile time errors in code.
> 
> Can anyone guide me please.
> 
> Thanks.
> Manu.
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288802.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> -- 
> 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.
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288983.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Cairngorm ServiceLocator Issue

2007-12-11 Thread Dimitrios Gianninas
Hi,

Things you can check are:

a) did u set the server-side logging to Debug in the services-config.xml file?
b) is your command actually being called? add a trace statement in there to see 
if it, common problem is you forget to add an entry in the controller

are u getting any sort of error anywhere?

Dimitrios Gianninas
Optimal Payments Inc.



-Original Message-
From: flexcoders@yahoogroups.com on behalf of Manu Dhanda
Sent: Tue 11/12/2007 11:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator Issue
 

Hii..

Am wondering why I can not connect back to Java.
Am using RemoteObject, have Services.mxml in place with the RemoteObject's
defined in that.
I have configured remoting-config.xml accordingly.
I had initialized ServiceLocator in my application file.

But when I generate an event on client side(clicking a button), I supposed
to see console output from java.

But, nothing happens with that. No compile time errors in code.

Can anyone guide me please.

Thanks.
Manu.


-- 
View this message in context: 
http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288802.html
Sent from the FlexCoders mailing list archive at Nabble.com.


-- 
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] Cairngorm ServiceLocator Issue

2007-12-11 Thread Manu Dhanda

Hii..

Am wondering why I can not connect back to Java.
Am using RemoteObject, have Services.mxml in place with the RemoteObject's
defined in that.
I have configured remoting-config.xml accordingly.
I had initialized ServiceLocator in my application file.

But when I generate an event on client side(clicking a button), I supposed
to see console output from java.

But, nothing happens with that. No compile time errors in code.

Can anyone guide me please.

Thanks.
Manu.


-- 
View this message in context: 
http://www.nabble.com/Cairngorm-ServiceLocator-Issue-tp14288802p14288802.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Cairngorm ServiceLocator as ActionScript class?

2007-10-05 Thread Tom Chiverton
On Friday 05 Oct 2007, [EMAIL PROTECTED] wrote:
> is it possible to write the cairngorm ServiceLocator as an
> ActionScript class - instead of an mxml file?

Turn on keep-sources in the compiler and see what it does :-)

-- 
Tom Chiverton
Helping to completely harvest professional paradigms
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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


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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

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

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

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[flexcoders] Cairngorm ServiceLocator as ActionScript class?

2007-10-05 Thread kramus0
Hi, 

is it possible to write the cairngorm ServiceLocator as an
ActionScript class - instead of an mxml file? 

Does anybody know how to do that? Which class does it extend?

Thanks for your help.

Markus



[flexcoders] Cairngorm ServiceLocator error - duplicate instantiation

2007-04-19 Thread e_baggg
I am using Cairngorm (Flex 2.0.1)...and if I put the cursor inside the
text area and (holding down the "Ctrl" key) hit "Enter" really fast, I
get this error below where the main application is trying to call the
ServiceLocator constructor again. Any idea why? I can replicate it w/
a simple app.

## code ###

http://www.adobe.com/2006/mxml";
layout="absolute" xmlns:business="com.communify.business.*">




Note: I commented out my code in my service locator Implementation so
I know it is nothing on my side.

Error: Only one ServiceLocator instance should be instantiated
at
org.nevis.cairngorm.business::ServiceLocator$iinit()[C:\kevin\pronto\communify-flex\org\nevis\cairngorm\business\ServiceLocator.as:111]
at
com.communify.business::Services$iinit()[C:\kevin\pronto\communify-flex\com\communify\business\Services.mxml:0]
at
mx.core::Container/createComponentFromDescriptor()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\Container.as:3619]
at
mx.core::Container/createComponentsFromDescriptors()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\Container.as:3533]
at
mx.core::Container/mx.core:Container::createChildren()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\Container.as:2618]
at
mx.core::UIComponent/initialize()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\UIComponent.as:4938]
at
mx.core::Container/initialize()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\Container.as:2555]
at
mx.core::Application/initialize()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\Application.as:829]
at pronto/initialize()[C:\kevin\pronto\communify-flex\pronto.mxml:0]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:1553]
at
mx.managers::SystemManager/mx.managers:SystemManager::initializeTopLevelWindow()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:2330]
at
mx.managers::SystemManager/mx.managers:SystemManager::docFrameHandler()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:2214]
 



RE: [flexcoders] Cairngorm ServiceLocator error

2007-01-16 Thread jason.proulx
I always forget that part too :P

 

Jay Proulx

[EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: January 15, 2007 11:09 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Cairngorm ServiceLocator error

 

of course!!!

 

Thanks.  It's always something simple.  I had commented that part out
when i was testing some stuff and I forgot to uncomment it.

 

- Kevin

 

 

On Jan 15, 2007, at 10:44 AM, <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:





 

Make sure you have:

 



in your main Application file.

 

Jay Proulx

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: January 15, 2007 9:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator error

 

has any one receieved this error when using the CairngormServiceLocator?

 

ReferenceError: Error #1069: Property myListService not found on
com.adobe.cairngorm.business.ServiceLocator and there is no default
value.

 

Here is my code:

 

(in Delegate file)

this.service =
ServiceLocator.getInstance().getRemoteObject("myListService");

 

(in Services.mxml)

http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 

xmlns:cairngorm="com.adobe.cairngorm.business.*">

 







 



 

I am not sure where I am going wrong.

 

- Kevin

 

 

 



Re: [flexcoders] Cairngorm ServiceLocator error

2007-01-15 Thread Kevin

of course!!!

Thanks.  It's always something simple.  I had commented that part out  
when i was testing some stuff and I forgot to uncomment it.


- Kevin


On Jan 15, 2007, at 10:44 AM, <[EMAIL PROTECTED]> wrote:



Make sure you have:





in your main Application file.



Jay Proulx

[EMAIL PROTECTED]

From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin

Sent: January 15, 2007 9:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator error



has any one receieved this error when using the  
CairngormServiceLocator?




ReferenceError: Error #1069: Property myListService not found on  
com.adobe.cairngorm.business.ServiceLocator and there is no default  
value.




Here is my code:



(in Delegate file)

this.service = ServiceLocator.getInstance().getRemoteObject 
("myListService");




(in Services.mxml)

http://www.adobe.com/2006/mxml";

xmlns:cairngorm="com.adobe.cairngorm.business.*">



showBusyCursor="true" destination="amfphp"


 
source="com.onefoot.dbocl.services.GetMyListService">


result="resultHandler(event)" />










I am not sure where I am going wrong.



- Kevin







RE: [flexcoders] Cairngorm ServiceLocator error

2007-01-15 Thread jason.proulx
Make sure you have:

 



in your main Application file.

 

Jay Proulx

[EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: January 15, 2007 9:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator error

 

has any one receieved this error when using the Cairngorm
ServiceLocator?

 

ReferenceError: Error #1069: Property myListService not found on
com.adobe.cairngorm.business.ServiceLocator and there is no default
value.

 

Here is my code:

 

(in Delegate file)

this.service =
ServiceLocator.getInstance().getRemoteObject("myListService");

 

(in Services.mxml)

http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 

xmlns:cairngorm="com.adobe.cairngorm.business.*">

 







 



 

I am not sure where I am going wrong.

 

- Kevin

 



[flexcoders] Cairngorm ServiceLocator error

2007-01-15 Thread Kevin
has any one receieved this error when using the Cairngorm  
ServiceLocator?


ReferenceError: Error #1069: Property myListService not found on  
com.adobe.cairngorm.business.ServiceLocator and there is no default  
value.


Here is my code:

(in Delegate file)
this.service = ServiceLocator.getInstance().getRemoteObject 
("myListService");


(in Services.mxml)
http://www.adobe.com/2006/mxml";
xmlns:cairngorm="com.adobe.cairngorm.business.*">

showBusyCursor="true" destination="amfphp"

source="com.onefoot.dbocl.services.GetMyListService">





I am not sure where I am going wrong.

- Kevin

Re: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread Clint Modien

All you statements make sense...  the only missing piece is the "static"
instance for a singleton.  By subclassing the singleton ServiceLocator you
gain the static getInstance() method.  Your subclass will now be a reference
to a static / global variable called "instance" contained within the
ServiceLocator class.  When you call getInstance() you'll get a reference to
your ServiceLocator implementation.  You can see how this works by putting a
breakpoint on the ServiceLocator constructor.  If you watch the instance
variable you'll see that it's your own ServiceLocator class implementation.

The Singleton pattern used here is to enforce that you only ever want one
ServiceLocator in your application.  (One place to get services.)

I understand that you'd like to call
MyFunkyServiceLocator.getInstance().getService("serviceName")
but static methods aren't inherited.



On 1/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


   Hey All,



Re: Flex at Bell

I'm not sure about everyone else; my team has only just started getting
into it.



The part I don't understand though, is the Cairngorm 2.1 Store example
shows retrieving the service like this:



ServiceLocator.getInstance().getWebService("myService");



However, all of the services are configured in:



*MyFunkyServiceLocator.mxml:*



  





Does that not make MyFunkyServiceLocator a subclass of
com.adobe.cairngorm.business.ServiceLocator?



Why, if I define a parameter in an MXML file is it available to the parent
class via this?  myService shouldn't (to me) belong to ServiceLocator, it
should belong to MyFunkyServiceLocator.



*Jay Proulx*

[EMAIL PROTECTED]
  --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Clint Modien
*Sent:* January 5, 2007 3:41 PM
*To:* flexcoders@yahoogroups.com
*Cc:* Ben Lucyk
*Subject:* RE: [flexcoders] Cairngorm ServiceLocator



I'm assuming you've seen my second email by now but… the reason is because
you're calling the static ServiceLocator.getInstance() method.





The ServiceLocator class is a singleton as well.  You will only EVER have
one in your application so even though you are creating a subclass as soon
as you call getInstance() you will get the only instance there is in your
application.  If you had two Services.mxml files (Service1.mxml and
Services2.mxml) in your app the last one created would be the one returned
by ServiceLocator.getInstance();




 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of [EMAIL PROTECTED]
*Sent:* Friday, January 05, 2007 12:13 PM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Cairngorm ServiceLocator



I traced through the code, com.adobe.cairngorm.business.ServiceLocatorrefers to itself as 
"this" when looking up a service:



  private function getServiceForId( serviceId : String ) : Object

  {

 if ( this[ serviceId ] == null )

 {

throw new CairngormError(

   CairngormMessageCodes.NO_SERVICE_FOUND, serviceId );

 }



 return this[ serviceId ];

  }



Except, in my case, there's no "projectService" associated with
com.adobe.cairngorm.business.ServiceLocator, I've specified it in a
Services.mxml file – How come I'm not running Services.getWebService()
instead of ServiceLocator.getWebService() ?



*Jay Proulx*

[EMAIL PROTECTED]
  --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Clint Modien
*Sent:* January 5, 2007 3:00 PM
*To:* flexcoders@yahoogroups.com
*Cc:* Ben Lucyk
*Subject:* RE: [flexcoders] Cairngorm ServiceLocator



The code is opensource so you can see how it works… here's the call it
makes. (This is cairngorm v2)




 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of [EMAIL PROTECTED]
*Sent:* Friday, January 05, 2007 10:53 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Cairngorm ServiceLocator



I'm a little confused.



How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?



i.e.:

Services.mxml:











var theService = ServiceLocator.getInstance().getWebService("myService");





How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.



It works, I just don't understand why…  What is the relationship between
an MXML file and an AS class that makes this happen?



*Jay Proulx*

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED]

(613) 783-6711



 



RE: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread jason.proulx
Hey All,

 

Re: Flex at Bell

I'm not sure about everyone else; my team has only just started getting
into it.

 

The part I don't understand though, is the Cairngorm 2.1 Store example
shows retrieving the service like this:

 

ServiceLocator.getInstance().getWebService("myService");

 

However, all of the services are configured in:

 

MyFunkyServiceLocator.mxml:



  



 

Does that not make MyFunkyServiceLocator a subclass of
com.adobe.cairngorm.business.ServiceLocator?

 

Why, if I define a parameter in an MXML file is it available to the
parent class via this?  myService shouldn't (to me) belong to
ServiceLocator, it should belong to MyFunkyServiceLocator.

 

Jay Proulx

[EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Modien
Sent: January 5, 2007 3:41 PM
To: flexcoders@yahoogroups.com
Cc: Ben Lucyk
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

I'm assuming you've seen my second email by now but... the reason is
because you're calling the static ServiceLocator.getInstance() method.

 



The ServiceLocator class is a singleton as well.  You will only EVER
have one in your application so even though you are creating a subclass
as soon as you call getInstance() you will get the only instance there
is in your application.  If you had two Services.mxml files
(Service1.mxml and Services2.mxml) in your app the last one created
would be the one returned by ServiceLocator.getInstance();



 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 12:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

I traced through the code, com.adobe.cairngorm.business.ServiceLocator
refers to itself as "this" when looking up a service:

 

  private function getServiceForId( serviceId : String ) : Object

  {

 if ( this[ serviceId ] == null )

 {

throw new CairngormError(

   CairngormMessageCodes.NO_SERVICE_FOUND, serviceId );

 }

 

 return this[ serviceId ];

  }

 

Except, in my case, there's no "projectService" associated with
com.adobe.cairngorm.business.ServiceLocator, I've specified it in a
Services.mxml file - How come I'm not running Services.getWebService()
instead of ServiceLocator.getWebService() ?

 

Jay Proulx

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Modien
Sent: January 5, 2007 3:00 PM
To: flexcoders@yahoogroups.com
Cc: Ben Lucyk
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 



RE: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread Clint Modien
I'm assuming you've seen my second email by now but... the reason is
because you're calling the static ServiceLocator.getInstance() method.

 



The ServiceLocator class is a singleton as well.  You will only EVER
have one in your application so even though you are creating a subclass
as soon as you call getInstance() you will get the only instance there
is in your application.  If you had two Services.mxml files
(Service1.mxml and Services2.mxml) in your app the last one created
would be the one returned by ServiceLocator.getInstance();



 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 12:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

I traced through the code, com.adobe.cairngorm.business.ServiceLocator
refers to itself as "this" when looking up a service:

 

  private function getServiceForId( serviceId : String ) : Object

  {

 if ( this[ serviceId ] == null )

 {

throw new CairngormError(

   CairngormMessageCodes.NO_SERVICE_FOUND, serviceId );

 }

 

 return this[ serviceId ];

  }

 

Except, in my case, there's no "projectService" associated with
com.adobe.cairngorm.business.ServiceLocator, I've specified it in a
Services.mxml file - How come I'm not running Services.getWebService()
instead of ServiceLocator.getWebService() ?

 

Jay Proulx

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Modien
Sent: January 5, 2007 3:00 PM
To: flexcoders@yahoogroups.com
Cc: Ben Lucyk
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 



Re: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread Martin Wood-Mitrovski
the cairngorm service locator just checks to see if it has a property with the 
name of the service defined

if(this [ serviceId ] == null) // throw an error

if it exists then just return it :

return this[ serviceId ];

its a common actionscript technique to access object properties dynamically 
using the [] notation.

and the relationship between mxml and an actionscript class is that mxml is 
converted to actionscript, so an mxml file / component is an actionscript class.

hope that helps, its one of those things that after using AS for a while you 
internalise so my explanation might be lacking.

Martin


[EMAIL PROTECTED] wrote:
> I'm a little confused.
> 
>  
> 
> How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
> service from an MXML component which is a "sub-class" of ServiceLocator?

-- 
Martin Wood

http://relivethefuture.com/choronzon


RE: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread jason.proulx
I traced through the code, com.adobe.cairngorm.business.ServiceLocator
refers to itself as "this" when looking up a service:

 

  private function getServiceForId( serviceId : String ) : Object

  {

 if ( this[ serviceId ] == null )

 {

throw new CairngormError(

   CairngormMessageCodes.NO_SERVICE_FOUND, serviceId );

 }

 

 return this[ serviceId ];

  }

 

Except, in my case, there's no "projectService" associated with
com.adobe.cairngorm.business.ServiceLocator, I've specified it in a
Services.mxml file - How come I'm not running Services.getWebService()
instead of ServiceLocator.getWebService() ?

 

Jay Proulx

[EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Modien
Sent: January 5, 2007 3:00 PM
To: flexcoders@yahoogroups.com
Cc: Ben Lucyk
Subject: RE: [flexcoders] Cairngorm ServiceLocator

 

The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 



RE: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread Clint Modien
Oops wrong key...

 

The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

/**

   * Return the WebService for the given service id.

   * @param serviceId the service id.

   * @return the RemoteObject.

   */

  public function getWebService( serviceId : String ) : WebService

  {

 return WebService( getServiceForId( serviceId ) );

  }

 

/**

   * Return the service with the given id.

   * @param serviceId the id of the service to return.

   * @return the service.

   */

  private function getServiceForId( serviceId : String ) : Object

  {

 if ( this[ serviceId ] == null )

 {

throw new CairngormError(

   CairngormMessageCodes.NO_SERVICE_FOUND, serviceId );

 }

 

 return this[ serviceId ];

  }

 

And when you look at the code... it grabs the instance of your service
from the ServiceLocator.mxml file.

 

For example:

 

.getInstance().loginService;  which equals
this[ "loginService" ] which equals this.loginService.

 

It's just a fancy way of saying this.loginSevice where this is
.

 

You used to be able to simply include the cairngorm framework code and
step through it... it's a little trickier now that they're using
resource bundles.

 

The ServiceLocator class is a singleton as well.  You will only EVER
have one in your application so even though you are creating a subclass
as soon as you call getInstance() you will get the only instance there
is in your application.  If you had two Services.mxml files
(Service1.mxml and Services2.mxml) in your app the last one created
would be the one returned by ServiceLocator.getInstance();

 

Hope that helps.

 

p.s. Is it true that Bell Canada has been using Flex since it was
Royale?  I used to live in Calgary so just curious.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 



RE: [flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread Clint Modien
The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 



[flexcoders] Cairngorm ServiceLocator

2007-01-05 Thread jason.proulx
I'm a little confused.

 

How come I can ask com.adobe.cairngorm.business.ServiceLocator for a
service from an MXML component which is a "sub-class" of ServiceLocator?

 

i.e.:

Services.mxml:







 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED]

(613) 783-6711

 



Re: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-12 Thread JesterXL





Yeah, sounds like what you have for DataService 
works.  I haven't spent time with DataService.
 
- Original Message - 
From: Dimitrios Gianninas 

To: flexcoders@yahoogroups.com 
Sent: Wednesday, July 12, 2006 9:11 AM
Subject: RE: [flexcoders] Cairngorm ServiceLocator and 
FDS

Not sure this quite works for FDS. Because the instance of 
the DataService that we have on the client side has special properties that let 
us know what is happening with that data service. So we need to use the 
DataService instance in various places in the application in order to get things 
done.
 
Right now I am hanging my DataService instance on one of my 
models, and everything works great. I am only looking to make things a bit 
cleaner.
 
Perhaps what you mentioned below works best for the Flex 
Messaging portion.
 
Dimitrios Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXLSent: 
Tuesday, July 11, 2006 11:29 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Cairngorm 
ServiceLocator and FDS



This one's long!
 
Before I gave up on FDS, I had a few ideas that 
seemed to work, but were unforunately only 50% implemented in 
Cairngorm.
 
As people are finding, Cairngorm works great for 
the request / response model, but the push model, you go... wtf?
 
I've used the same ideas with Flash Media Server, 
which is also push, and it seems to hold.  Additionally, because there is a 
significant amount of logic that happens in the actual process of pushed 
messages, everything from simple routing, message context creation (think 
Messages that are ValueObjects), and actual events that happen, a whole other 
class set really helps.
 
Here's a diagram of the circular pattern described 
below.
http://dev.jessewarden.com/flex/observer_pattern.gif
 
I used an Observer pattern.  Basically, 
one class "watches" the Consumer and Producer services.  These exist in the 
ServiceLocator.  They, like Delegates, get the service from that 
class.  Cairngorm handles the sends and even has the Delegate's handle the 
acknowledge messages.  The Observers handle the pushes.  Basically 
Cairngorm handles the Producer, the Observer class(es) handles the 
Consumer.
 
Cairngorm is damn good at the Producer since it 
technically is a request / response.  "Please send the message.  Ok, 
it sent."
 
The Observer, however, is kind of weird.  It 
extends a base class.  This is done for 2 reasons.  First, it 
abstracts away the access to the ServiceLocator.  Second, it also abstracts 
away the onMessage; this is a protected method that is called for you with the 
event passed in.  Extending this class allows you to add context and not 
worry about plumbing.
 
For example, if you are connecting to a simple 
chat channel in your FDS that deals mainly with text based messages, you'd 
extend the ObserverAbstract to be "ChatObserver" or something to that 
effect.  It's onMessage handler would process all messages that came 
in.  Based on their headers & body, he'd know what type of things to 
look for, in this case chat specific messages; "someone joined", "someone sent a 
private message to you", etc.  Because this class is specific to those 
types of messages, it can ignore the rest.  This also allows the creation 
of other Observers that do specific things for specific channels.
 
There is one additional thing, though, that these 
Observers can do.  They too can dispatch events!  This means they can 
do the same thing everything else in the Cairngorm world can do; dispath Events 
to run Commands to modifiy data in the ModelLocator.  In this case, 
updating chat text, showing a new private chat window, etc.
 
The modification to ServiceLocator is minimal; you 
add the method, and put the destination inside as a constant.
 
Cairngorm's Delegate's then send messages via the 
Producer, begotten from the ServiceLocator, and fire their onResults when they 
get a successful Acknowledge message.
 
The setup goes something like this; you add just 
one extra tag:
 
  
 
You should recognize the top 2; they're used in 
your Application class.  The 3rd one is the Observer.  Works pretty 
well.
 
now, for the record, my boss hates this.  
While he likes the Observer part, and digs how Observers can also fire off 
Commands via Events, he doesn't like how I've created them.  There are some 
other tight coupling things he mentioned too, but I can't remember them right 
now.  Bottom line is, one of his many ideas was to have a stateful (read 
"not stateless") Command actually create the Observer instead of the 
Application.  You can then initiate this via an Event class as 
regular.  Events could have the Command handle calling 
methods on the Observer, much like regular Commands call methods on the 
Delegate.
 
I didn't like the thou

RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-12 Thread Dimitrios Gianninas





Not sure this quite works for FDS. Because the instance of 
the DataService that we have on the client side has special properties that let 
us know what is happening with that data service. So we need to use the 
DataService instance in various places in the application in order to get things 
done.
 
Right now I am hanging my DataService instance on one of my 
models, and everything works great. I am only looking to make things a bit 
cleaner.
 
Perhaps what you mentioned below works best for the Flex 
Messaging portion.
 
Dimitrios Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXLSent: 
Tuesday, July 11, 2006 11:29 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Cairngorm 
ServiceLocator and FDS



This one's long!
 
Before I gave up on FDS, I had a few ideas that 
seemed to work, but were unforunately only 50% implemented in 
Cairngorm.
 
As people are finding, Cairngorm works great for 
the request / response model, but the push model, you go... wtf?
 
I've used the same ideas with Flash Media Server, 
which is also push, and it seems to hold.  Additionally, because there is a 
significant amount of logic that happens in the actual process of pushed 
messages, everything from simple routing, message context creation (think 
Messages that are ValueObjects), and actual events that happen, a whole other 
class set really helps.
 
Here's a diagram of the circular pattern described 
below.
http://dev.jessewarden.com/flex/observer_pattern.gif
 
I used an Observer pattern.  Basically, 
one class "watches" the Consumer and Producer services.  These exist in the 
ServiceLocator.  They, like Delegates, get the service from that 
class.  Cairngorm handles the sends and even has the Delegate's handle the 
acknowledge messages.  The Observers handle the pushes.  Basically 
Cairngorm handles the Producer, the Observer class(es) handles the 
Consumer.
 
Cairngorm is damn good at the Producer since it 
technically is a request / response.  "Please send the message.  Ok, 
it sent."
 
The Observer, however, is kind of weird.  It 
extends a base class.  This is done for 2 reasons.  First, it 
abstracts away the access to the ServiceLocator.  Second, it also abstracts 
away the onMessage; this is a protected method that is called for you with the 
event passed in.  Extending this class allows you to add context and not 
worry about plumbing.
 
For example, if you are connecting to a simple 
chat channel in your FDS that deals mainly with text based messages, you'd 
extend the ObserverAbstract to be "ChatObserver" or something to that 
effect.  It's onMessage handler would process all messages that came 
in.  Based on their headers & body, he'd know what type of things to 
look for, in this case chat specific messages; "someone joined", "someone sent a 
private message to you", etc.  Because this class is specific to those 
types of messages, it can ignore the rest.  This also allows the creation 
of other Observers that do specific things for specific channels.
 
There is one additional thing, though, that these 
Observers can do.  They too can dispatch events!  This means they can 
do the same thing everything else in the Cairngorm world can do; dispath Events 
to run Commands to modifiy data in the ModelLocator.  In this case, 
updating chat text, showing a new private chat window, etc.
 
The modification to ServiceLocator is minimal; you 
add the method, and put the destination inside as a constant.
 
Cairngorm's Delegate's then send messages via the 
Producer, begotten from the ServiceLocator, and fire their onResults when they 
get a successful Acknowledge message.
 
The setup goes something like this; you add just 
one extra tag:
 
  
 
You should recognize the top 2; they're used in 
your Application class.  The 3rd one is the Observer.  Works pretty 
well.
 
now, for the record, my boss hates this.  
While he likes the Observer part, and digs how Observers can also fire off 
Commands via Events, he doesn't like how I've created them.  There are some 
other tight coupling things he mentioned too, but I can't remember them right 
now.  Bottom line is, one of his many ideas was to have a stateful (read 
"not stateless") Command actually create the Observer instead of the 
Application.  You can then initiate this via an Event class as 
regular.  Events could have the Command handle calling 
methods on the Observer, much like regular Commands call methods on the 
Delegate.
 
I didn't like the thought of a 
stateful Command, but I totally understood how his ways, which were better 
described by him than me, were less coupled, and more integrated into Cairngorm 
as a whole.  The whole "Observer fires callbacks on the 
Command that never dies" was kind of neat, though.  :: sh

Re: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread JesterXL





This one's long!
 
Before I gave up on FDS, I had a few ideas that 
seemed to work, but were unforunately only 50% implemented in 
Cairngorm.
 
As people are finding, Cairngorm works great for 
the request / response model, but the push model, you go... wtf?
 
I've used the same ideas with Flash Media Server, 
which is also push, and it seems to hold.  Additionally, because there is a 
significant amount of logic that happens in the actual process of pushed 
messages, everything from simple routing, message context creation (think 
Messages that are ValueObjects), and actual events that happen, a whole other 
class set really helps.
 
Here's a diagram of the circular pattern described 
below.
http://dev.jessewarden.com/flex/observer_pattern.gif
 
I used an Observer pattern.  Basically, 
one class "watches" the Consumer and Producer services.  These exist in the 
ServiceLocator.  They, like Delegates, get the service from that 
class.  Cairngorm handles the sends and even has the Delegate's handle the 
acknowledge messages.  The Observers handle the pushes.  Basically 
Cairngorm handles the Producer, the Observer class(es) handles the 
Consumer.
 
Cairngorm is damn good at the Producer since it 
technically is a request / response.  "Please send the message.  Ok, 
it sent."
 
The Observer, however, is kind of weird.  It 
extends a base class.  This is done for 2 reasons.  First, it 
abstracts away the access to the ServiceLocator.  Second, it also abstracts 
away the onMessage; this is a protected method that is called for you with the 
event passed in.  Extending this class allows you to add context and not 
worry about plumbing.
 
For example, if you are connecting to a simple 
chat channel in your FDS that deals mainly with text based messages, you'd 
extend the ObserverAbstract to be "ChatObserver" or something to that 
effect.  It's onMessage handler would process all messages that came 
in.  Based on their headers & body, he'd know what type of things to 
look for, in this case chat specific messages; "someone joined", "someone sent a 
private message to you", etc.  Because this class is specific to those 
types of messages, it can ignore the rest.  This also allows the creation 
of other Observers that do specific things for specific channels.
 
There is one additional thing, though, that these 
Observers can do.  They too can dispatch events!  This means they can 
do the same thing everything else in the Cairngorm world can do; dispath Events 
to run Commands to modifiy data in the ModelLocator.  In this case, 
updating chat text, showing a new private chat window, etc.
 
The modification to ServiceLocator is minimal; you 
add the method, and put the destination inside as a constant.
 
Cairngorm's Delegate's then send messages via the 
Producer, begotten from the ServiceLocator, and fire their onResults when they 
get a successful Acknowledge message.
 
The setup goes something like this; you add just 
one extra tag:
 
  
 
You should recognize the top 2; they're used in 
your Application class.  The 3rd one is the Observer.  Works pretty 
well.
 
now, for the record, my boss hates this.  
While he likes the Observer part, and digs how Observers can also fire off 
Commands via Events, he doesn't like how I've created them.  There are some 
other tight coupling things he mentioned too, but I can't remember them right 
now.  Bottom line is, one of his many ideas was to have a stateful (read 
"not stateless") Command actually create the Observer instead of the 
Application.  You can then initiate this via an Event class as 
regular.  Events could have the Command handle calling 
methods on the Observer, much like regular Commands call methods on the 
Delegate.
 
I didn't like the thought of a 
stateful Command, but I totally understood how his ways, which were better 
described by him than me, were less coupled, and more integrated into Cairngorm 
as a whole.  The whole "Observer fires callbacks on the 
Command that never dies" was kind of neat, though.  :: shrugs :: We only 
talked for a total of 4 minutes over 2 days, so those were just our initial 
ideas.
 
I haven't had time to fully test them out more 
since I've fallen more into the GUI design realm as of late.  Hopefully 
these ideas spark more and/or better ones or discussion at least.
 
- Original Message - 
From: Dimitrios Gianninas 

To: flexcoders@yahoogroups.com 
Sent: Tuesday, July 11, 2006 9:22 PM
Subject: RE: [flexcoders] Cairngorm ServiceLocator and 
FDS

Also, how have people handled DataService responses? 

 
Unlike RPC, DS has 4 events: result, fault, conflict and 
message. Can't use the regular Responder interface in Cairngorm, so I created a 
DataServicesResponder interface.
 
Dimitrios 
Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexco

RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Dimitrios Gianninas





Also, how have people handled DataService responses? 

 
Unlike RPC, DS has 4 events: result, fault, conflict and 
message. Can't use the regular Responder interface in Cairngorm, so I created a 
DataServicesResponder interface.
 
Dimitrios 
Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios 
GianninasSent: Tuesday, July 11, 2006 9:05 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm 
ServiceLocator and FDS



Glad to see I'm not crazy :) With this thread this 
afternoon, I was like "oh ya, I still need to clean my DataServices code and put 
it in the ServiceLocator". And then I started the work and was like, how is 
this going to work, a DataService ain't so simple as RPC services. As you noted 
below it is much more "smart" since it has properties like 'commitRequired' and 
'mergeRequired'... in my app those property are binded to controls to provide 
visual feedback to the user.
 
So my first thought was to wrap it in some class... like a 
delegate, but seems redundant, so still thinking
 
Dimitrios 
Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Steven 
WebsterSent: Tuesday, July 11, 2006 5:32 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm 
ServiceLocator and FDS



Hey Mike,
 
So that's an interesting question you ask; our intention 
for ServiceLocator is support for the RPC services in Flex ... at least that is 
the heritage of the ServiceLocator from Flex 1.5, and that's how we've 
personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're 
still chewing around on a number of different approaches, and haven't yet 
reached a conensus on what we consider "bestest-practice"; there are so many 
different use-cases. 
 
My instincts are that data services don't need to be 
declared on the ServiceLocator, and that managed collections are more akin to 
"intelligent model" objects; that if a command is used to manipulating a 
model (via the model locator) onResult of an RPC call, it makes sense in the 
data services world that a Command no-longer needs asynchronous result handlers, 
but can instead optimistically manipulate a model (a collection with data 
services) within the execute() method of a command.  So a command still 
updates the model, and binding notifies the view - so the "MVC" approach we 
achieve in Cairngorm still holds.
 
This then begs the question of where you 
define/create/initialise/etc your collections; is that the ServiceLocator, or is 
it somewhere else.  Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear 
ours.  It still "feels" right to me that the ServiceLocator remains "RPC 
only", but I can be convinced with a good argument.
 
Thoughts ?
 
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 
  Mike_Robinson_98Sent: 11 July 2006 19:17To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm 
  ServiceLocator and FDS
  
  
  Is it possible to define a  in the ServiceLocator 
  oris ServiceLocator useful only for  
  and? In the examples I have seen you retrieve a 
  servicefrom the ServiceLocator with something like 
  this:ServiceLocator.getInstance().getService("ordersService");However, 
  the getService() method returns an AbstractService which onlyWebService 
  and RemoteObject extend. Is there some other mechanism to be able to 
  use a DataService withinthe ServiceLocator? The getInvokerService method 
  also does not looklike it is useful for this 
  purpose.Thanks,Mike


  
  

  AVIS 
  IMPORTANT

  WARNING
  

  Ce message 
  électronique et ses pièces jointes peuvent contenir des renseignements 
  confidentiels, exclusifs ou légalement privilégiés destinés au seul usage 
  du destinataire visé. L'expéditeur original ne renonce à aucun privilège 
  ou à aucun autre droit si le présent message a été transmis 
  involontairement ou s'il est retransmis sans son autorisation. Si vous 
  n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu 
  par erreur, veuillez cesser immédiatement de le lire et le supprimer, 
  ainsi que toutes ses pièces jointes, de votre système. La lecture, la 
  distribution, la copie ou tout autre usage du présent me

RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Dimitrios Gianninas





Glad to see I'm not crazy :) With this thread this 
afternoon, I was like "oh ya, I still need to clean my DataServices code and put 
it in the ServiceLocator". And then I started the work and was like, how is 
this going to work, a DataService ain't so simple as RPC services. As you noted 
below it is much more "smart" since it has properties like 'commitRequired' and 
'mergeRequired'... in my app those property are binded to controls to provide 
visual feedback to the user.
 
So my first thought was to wrap it in some class... like a 
delegate, but seems redundant, so still thinking
 
Dimitrios 
Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Steven 
WebsterSent: Tuesday, July 11, 2006 5:32 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm 
ServiceLocator and FDS



Hey Mike,
 
So that's an interesting question you ask; our intention 
for ServiceLocator is support for the RPC services in Flex ... at least that is 
the heritage of the ServiceLocator from Flex 1.5, and that's how we've 
personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're 
still chewing around on a number of different approaches, and haven't yet 
reached a conensus on what we consider "bestest-practice"; there are so many 
different use-cases. 
 
My instincts are that data services don't need to be 
declared on the ServiceLocator, and that managed collections are more akin to 
"intelligent model" objects; that if a command is used to manipulating a 
model (via the model locator) onResult of an RPC call, it makes sense in the 
data services world that a Command no-longer needs asynchronous result handlers, 
but can instead optimistically manipulate a model (a collection with data 
services) within the execute() method of a command.  So a command still 
updates the model, and binding notifies the view - so the "MVC" approach we 
achieve in Cairngorm still holds.
 
This then begs the question of where you 
define/create/initialise/etc your collections; is that the ServiceLocator, or is 
it somewhere else.  Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear 
ours.  It still "feels" right to me that the ServiceLocator remains "RPC 
only", but I can be convinced with a good argument.
 
Thoughts ?
 
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 
  Mike_Robinson_98Sent: 11 July 2006 19:17To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm 
  ServiceLocator and FDS
  
  
  Is it possible to define a  in the ServiceLocator 
  oris ServiceLocator useful only for  
  and? In the examples I have seen you retrieve a 
  servicefrom the ServiceLocator with something like 
  this:ServiceLocator.getInstance().getService("ordersService");However, 
  the getService() method returns an AbstractService which onlyWebService 
  and RemoteObject extend. Is there some other mechanism to be able to 
  use a DataService withinthe ServiceLocator? The getInvokerService method 
  also does not looklike it is useful for this 
  purpose.Thanks,Mike

 
  
  AVIS
  IMPORTANT
  
  
  WARNING
  
 
 
  
  Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système.  La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
  
  
  This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient.  No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message.  If you are not the intended recipient of this message, or if you have rece

RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Bjorn Schultheiss

Let me get this straight.
The command manipulates the DataStore on the Model which manages the
DataService, therefore no need for a DestinationLocator?

Is the goal here for the client model to be a virtual snapshot of an exposed
server model?


Regards,
 
Bjorn Schultheiss
Senior Flash Developer
QDC Technologies

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of João Fernandes
Sent: Wednesday, 12 July 2006 8:43 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator and FDS

Steven, 

I can understand your problem with FDS implementation... 

2 questions:
If you manipulate your inteligent model within your command without an
result/fault handler, how can you make your app act between the time you
make the request (fill?,getItem?) and the result(fault)?

How to handle messages from the server without any user
interaction(propertyChange,message, conflict) and how to register them ? 

João Fernandes

-Original Message-
From: flexcoders@yahoogroups.com on behalf of Steven Webster
Sent: Tue 11-Jul-06 10:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator and FDS
 
Hey Mike,
 
So that's an interesting question you ask; our intention for
ServiceLocator is support for the RPC services in Flex ... at least that
is the heritage of the ServiceLocator from Flex 1.5, and that's how
we've personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're still chewing
around on a number of different approaches, and haven't yet reached a
conensus on what we consider "bestest-practice"; there are so many
different use-cases. 
 
My instincts are that data services don't need to be declared on the
ServiceLocator, and that managed collections are more akin to
"intelligent model" objects; that if a command is used to manipulating a
model (via the model locator) onResult of an RPC call, it makes sense in
the data services world that a Command no-longer needs asynchronous
result handlers, but can instead optimistically manipulate a model (a
collection with data services) within the execute() method of a command.
So a command still updates the model, and binding notifies the view - so
the "MVC" approach we achieve in Cairngorm still holds.
 
This then begs the question of where you define/create/initialise/etc
your collections; is that the ServiceLocator, or is it somewhere else.
Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear ours.  It still
"feels" right to me that the ServiceLocator remains "RPC only", but I
can be convinced with a good argument.
 
Thoughts ?
 
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] 

 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98
Sent: 11 July 2006 19:17
    To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator and FDS



Is it possible to define a  in the
ServiceLocator or
is ServiceLocator useful only for  and
? In the examples I have seen you retrieve a
service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService
which only
WebService and RemoteObject extend. 

Is there some other mechanism to be able to use a DataService
within
the ServiceLocator? The getInvokerService method also does not
look
like it is useful for this purpose.

Thanks,
Mike



 




 Yahoo! Groups Sponsor ~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread João Fernandes
Steven, 

I can understand your problem with FDS implementation... 

2 questions:
If you manipulate your inteligent model within your command without an 
result/fault handler, how can you make your app act between the time you make 
the request (fill?,getItem?) and the result(fault)?

How to handle messages from the server without any user 
interaction(propertyChange,message, conflict) and how to register them ? 

João Fernandes

-Original Message-
From: flexcoders@yahoogroups.com on behalf of Steven Webster
Sent: Tue 11-Jul-06 10:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm ServiceLocator and FDS
 
Hey Mike,
 
So that's an interesting question you ask; our intention for
ServiceLocator is support for the RPC services in Flex ... at least that
is the heritage of the ServiceLocator from Flex 1.5, and that's how
we've personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're still chewing
around on a number of different approaches, and haven't yet reached a
conensus on what we consider "bestest-practice"; there are so many
different use-cases. 
 
My instincts are that data services don't need to be declared on the
ServiceLocator, and that managed collections are more akin to
"intelligent model" objects; that if a command is used to manipulating a
model (via the model locator) onResult of an RPC call, it makes sense in
the data services world that a Command no-longer needs asynchronous
result handlers, but can instead optimistically manipulate a model (a
collection with data services) within the execute() method of a command.
So a command still updates the model, and binding notifies the view - so
the "MVC" approach we achieve in Cairngorm still holds.
 
This then begs the question of where you define/create/initialise/etc
your collections; is that the ServiceLocator, or is it somewhere else.
Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear ours.  It still
"feels" right to me that the ServiceLocator remains "RPC only", but I
can be convinced with a good argument.
 
Thoughts ?
 
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] 

 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98
Sent: 11 July 2006 19:17
    To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator and FDS



Is it possible to define a  in the
ServiceLocator or
is ServiceLocator useful only for  and
? In the examples I have seen you retrieve a
service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService
which only
WebService and RemoteObject extend. 

Is there some other mechanism to be able to use a DataService
within
the ServiceLocator? The getInvokerService method also does not
look
like it is useful for this purpose.

Thanks,
Mike



 




 Yahoo! Groups Sponsor ~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
<>

RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Steven Webster





Hey Mike,
 
So that's an interesting question you ask; our intention 
for ServiceLocator is support for the RPC services in Flex ... at least that is 
the heritage of the ServiceLocator from Flex 1.5, and that's how we've 
personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're 
still chewing around on a number of different approaches, and haven't yet 
reached a conensus on what we consider "bestest-practice"; there are so many 
different use-cases. 
 
My instincts are that data services don't need to be 
declared on the ServiceLocator, and that managed collections are more akin to 
"intelligent model" objects; that if a command is used to manipulating a 
model (via the model locator) onResult of an RPC call, it makes sense in the 
data services world that a Command no-longer needs asynchronous result handlers, 
but can instead optimistically manipulate a model (a collection with data 
services) within the execute() method of a command.  So a command still 
updates the model, and binding notifies the view - so the "MVC" approach we 
achieve in Cairngorm still holds.
 
This then begs the question of where you 
define/create/initialise/etc your collections; is that the ServiceLocator, or is 
it somewhere else.  Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear 
ours.  It still "feels" right to me that the ServiceLocator remains "RPC 
only", but I can be convinced with a good argument.
 
Thoughts ?
 
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 
  Mike_Robinson_98Sent: 11 July 2006 19:17To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm 
  ServiceLocator and FDS
  
  
  Is it possible to define a  in the ServiceLocator 
  oris ServiceLocator useful only for  
  and? In the examples I have seen you retrieve a 
  servicefrom the ServiceLocator with something like 
  this:ServiceLocator.getInstance().getService("ordersService");However, 
  the getService() method returns an AbstractService which onlyWebService 
  and RemoteObject extend. Is there some other mechanism to be able to 
  use a DataService withinthe ServiceLocator? The getInvokerService method 
  also does not looklike it is useful for this 
  purpose.Thanks,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] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Steven Webster
> Mike look this post:
> 
> http://weblogs.macromedia.com/pmartin/archives/2006/06/cairngo
> rm_2_sec.cfm
> 
> DestinationLocator extends serviceLocator so you can replace 
> your serviceLocator tags in your services.mxml for 
> destinationLocator and put there your DataServices then use 
> DestinationLocator.getInstance().getDataService("myDS");


I should have posted that link also !  That's one of our current
(favoured) approaches.

(Sorry Peter :) )

Best,

Steven


 Yahoo! Groups Sponsor ~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread João Fernandes

Mike look this post:

http://weblogs.macromedia.com/pmartin/archives/2006/06/cairngorm_2_sec.cfm

DestinationLocator extends serviceLocator so you can replace your 
serviceLocator tags in your services.mxml for destinationLocator and put there 
your DataServices then use 
DestinationLocator.getInstance().getDataService("myDS");

João Fernandes


-Original Message-
From: flexcoders@yahoogroups.com on behalf of Mike_Robinson_98
Sent: Tue 11-Jul-06 7:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator and FDS
 
Is it possible to define a  in the ServiceLocator or
is ServiceLocator useful only for  and
? In the examples I have seen you retrieve a service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService which only
WebService and RemoteObject extend. 

Is there some other mechanism to be able to use a DataService within
the ServiceLocator? The getInvokerService method also does not look
like it is useful for this purpose.

Thanks,
Mike






 Yahoo! Groups Sponsor ~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
<>

Re: [flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread JesterXL
Add this function to Cairngorm's ServiceLocator and it'll work:

public function getMessageAgent ( serviceId : String ) : 
mx.messenging.MessageAgent
  {
   if ( this[ serviceId ] == undefined )
throw new Error( "No MessageAgent found for service name " + 
serviceId );

 return this[ serviceId ];
  }

- Original Message - 
From: "Mike_Robinson_98" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, July 11, 2006 2:16 PM
Subject: [flexcoders] Cairngorm ServiceLocator and FDS


Is it possible to define a  in the ServiceLocator or
is ServiceLocator useful only for  and
? In the examples I have seen you retrieve a service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService which only
WebService and RemoteObject extend.

Is there some other mechanism to be able to use a DataService within
the ServiceLocator? The getInvokerService method also does not look
like it is useful for this purpose.

Thanks,
Mike






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







 Yahoo! Groups Sponsor ~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Cairngorm ServiceLocator and FDS

2006-07-11 Thread Mike_Robinson_98
Is it possible to define a  in the ServiceLocator or
is ServiceLocator useful only for  and
? In the examples I have seen you retrieve a service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService which only
WebService and RemoteObject extend. 

Is there some other mechanism to be able to use a DataService within
the ServiceLocator? The getInvokerService method also does not look
like it is useful for this purpose.

Thanks,
Mike





 Yahoo! Groups Sponsor ~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Cairngorm ServiceLocator DataService support

2006-07-10 Thread Reynaldo Bernal

 I would like to know if there is a way in the current Cairngorm
framework to support DataService binding instead of RemoteObject
binding. I have modified the original version of the basic Flex Phone
sample to use a DataService java class in the web server instead of
using ColdFusion, and it seems to work just fine. When trying to do the
same on the new Cairngorm 2 Phone version, it seems that the
ServiceLocator works only with RemoteObjects in ColdFusion. Is this the
case ? Do I have to have ColdFusion ? Do I have to have RemoteObjects ?

 Thanks



 Yahoo! Groups Sponsor ~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Cairngorm ServiceLocator and AMFPHP

2006-05-13 Thread Andrea Varga




Hi Stefan

You might want to look at this:
http://renaun.com/blog/?p=25

Andi

stefan_schmalhaus wrote:

>I'd like to add an AMFPHP-based service to my Cairngorm
>ServiceLocator. The example from Mike Potter's Flex/AMFPHP tutorial
>works really well (for those who haven't tried it yet here's the URL
>to the tutorial:
>http://labs.adobe.com/wiki/index.php/Flex_Framework:tutorials:flex2_AMFPHP),
>but I don't know how to get it to work in a Cairngorm environment.
>
>In the tutorial an additional AS class ("RemotingConnection") is set
>up that extends "NetConnection". How do I combine this with the usual
>syntax for a adding a new service to the Cg ServiceLocator, e.g.:
>
>
>url="">
>result="event.call.resultHandler( event )"
>fault="event.call.faultHandler( event )"
>showBusyCursor="true"
>useProxy="false" />
>
>Is this possible at all? 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
>
>
>
> 
>
>
>  
>







--
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] Cairngorm ServiceLocator and AMFPHP

2006-05-13 Thread stefan_schmalhaus



I'd like to add an AMFPHP-based service to my Cairngorm
ServiceLocator. The example from Mike Potter's Flex/AMFPHP tutorial
works really well (for those who haven't tried it yet here's the URL
to the tutorial:
http://labs.adobe.com/wiki/index.php/Flex_Framework:tutorials:flex2_AMFPHP),
but I don't know how to get it to work in a Cairngorm environment.

In the tutorial an additional AS class ("RemotingConnection") is set
up that extends "NetConnection". How do I combine this with the usual
syntax for a adding a new service to the Cg ServiceLocator, e.g.:


url="">
result="event.call.resultHandler( event )"
fault="event.call.faultHandler( event )"
showBusyCursor="true"
useProxy="false" />

Is this possible at all? 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








  
  
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.