« Return to Thread: n00b help

Re: n00b help

by Joel Hooks-2 :: Rate this Message:

Reply to Author | View in Thread

Hi Jesse,

I use NetConnection not RemoteObject. Generally I create a factory class so that I have a central place using a single connection and my various classes that need it grab an instance of my configured NetConnection (I guess this is a ServiceLocator).

I'd like to fix my example if it is confusing :>

Joel Hooks (@jhooks)
http://joelhooks.com




On Jul 4, 2009, at 3:47 PM, Jesse Warden wrote:

Just trying to ensure I get it.  Python & Django n00b, ActionScript & Flex veteran.  I managed to get the HelloWorld working in another project & app.  AMF through Django with authentication.... not so much...

It seems if I follow the instructions here:


I just need to have an "amfgateway.py" file in my app folder.  This is basically a FrontController, and from it, I can define functions that my Flex client can call.  Looking at the example on Joel's blog, however, has me confused.  So, bunch of questions:

----------------------------------

How do I wire up my Remoting tag?  Assuming I have this in my amfgateway.py services dict:

services = {
    'cloud.echo': echo
}

And my modified urls.py in the main project has this added:

(r'^gateway/', 'powerz.cloud.amfgateway.echoGateway'),

Then I'd have a RemoteObject tag in Flex like:

<mx:RemoteObject id="remoteObj" destination="powerz.cloud.amfgateway.echoGateway" endpoint="http://localhost:8000">
   <mx:method name="echo" result="onResult(event)" fault="onFault(event)"/>
</mx:RemoteObject>

Right?

----------------------------------

What is the difference between this:


And the client example here:


Are both just examples to use during development?  What do I actually have to deploy for production?  Are errors from authentication something I can recognize on the Flex client vs. a regular scripting error?

Thanks for your time.



_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

 « Return to Thread: n00b help