tags:

views:

13

answers:

1

I have a number of modules in my flex application and in each module I use a remoteobject to retrieve dynamic data from the server related to each module. Recently I read a couple of comments in some blogs people saying that remoteobjects should not be used in modules, instead they should be in the main application. Is this true and why? And if it's true, what would I do with the resulthandler in the main app, since the code is very specific to each module, there's a lot of data manipulation and code setting values of components in the module, how would the handler in the main app access the components inside the module?

Thanks

A: 

It seems ridiculous to me to avoid using RemoteObject in a module. The whole purpose of a Module is to be a self contained portion of an application. And there is no reason why remote service calls can't be part of the self contained piece.

Do you have links to blog posts making these claims? I'm sure any such claims would be context specific (as are most best practices).

www.Flextras.com
here's one: http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html, you can find this comment "RemoteObject objects and SOAP objects also go into a type registry and should not be in modules.....". There was another blog but unfortunately I lost the URL, am trying to find it.
Yasmine
Interesting. Alex's word is pretty much "God" on these areas. The issue is with unloading of modules then; and to avoid the issue encapsulate out the RemoteObject calls. I'm pretty sure you'd communicate withthe modules using localConnection to pass in the data returned from your main application.
www.Flextras.com