tags:

views:

19

answers:

1

Should i keep Remoting Methods outside a class in a seperate AS file or is it possible to call Remoting inside a class.

A: 

It is possible to have your remote objects in the main Application MXML file, but the general rule of thumb is that it is almost always better to move your external calls away from the center of your processes. This will make the code easier to debug, but it will also make the code easier to maintain down the line.

Actually, Adobe's recommended architecture, Cairngorm, not only abstracts the Remote Objects themselves into a single class (the ServiceLocator class), but they also recommend that everything which is used to handle that class should be abstracted as well.

The RemoteObject in Cairngorm:
http://www.adobe.com/devnet/flex/articles/cairngorm_pt5_03.html

Christopher W. Allen-Poole