remoting and class files
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Macromedia Flash Server > remoting and class files




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    remoting and class files  
grant


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-05 07:45 AM

hi. normally i call remoting like this:

categoryLinks =3D linkCFC.getCategoryLinks({categoryID:catID});
categoryLinks.responder =3D new RelayResponder(this,
"categoryLinks_return", "service_fail");

where the 'categoryLinks_return' and 'service_fail' are the result
handlers for the service call, and 'linkCFC' is a predefined service.

i'm developing some classes and have the need to return the result
from a call directly, such as:

return linkCFC.getCategoryLinks({categoryID:catID});

which would ideally be in a 'getter' function on the class file. is
there a simple way of doing this? what is the correct way to make
remoting calls and retaining encapsulation?

or have i gone down the wrong path? (again)

Grant

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: remoting and class files  
Ken Dunnington


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-27-05 10:45 PM

I encapsulate my remote data using beans and DAO's. I have a UserGateway=20
class that acts as my DAO, and I call getUser() on that class, which return=
s=20
a fully populated User object (in reality, it returns the object in an even=
t=20
dispatched by the result function of the RelayResponder object.) Because of=
=20
the asynchronous nature of Flash Remoting, you can't get a result directly=
=20
from a service call, since that always returns a PendingCall object. Once m=
y=20
User object is populated, I can use getters and setters on that as I need=
=20
to. I also have a setUser() method on my UserGateway class which accepts a=
=20
User object as input and stores it back to the server.

Hope that helps,
Ken

On 5/24/05, grant <grantmr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> hi. normally i call remoting like this:
>=20
> categoryLinks =3D linkCFC.getCategoryLinks({categoryID:catID});
> categoryLinks.responder =3D new RelayResponder(this,
> "categoryLinks_return", "service_fail");
>=20
> where the 'categoryLinks_return' and 'service_fail' are the result
> handlers for the service call, and 'linkCFC' is a predefined service.
>=20
> i'm developing some classes and have the need to return the result
> from a call directly, such as:
>=20
> return linkCFC.getCategoryLinks({categoryID:catID});
>=20
> which would ideally be in a 'getter' function on the class file. is
> there a simple way of doing this? what is the correct way to make
> remoting calls and retaining encapsulation?
>=20
> or have i gone down the wrong path? (again)
>=20
> Grant
>=20
> -----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> -----------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20



--=20
It's a metaphor for life itself. For that matter, everything in life is a=
=20
metaphor for life. Except life. Life is probably a metaphor for metaphor. -=
-=20
James Lileks

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:24 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register