[flexcoders] Re: Using modules and remote objects

2010-09-08 Thread Amy


--- In flexcoders@yahoogroups.com, Mike msl...@... wrote:

 I recently did something like this for Cisco.  They needed a way for a 
 sub-Application to invoke a method in another sub-Application, which might 
 not be loaded.  The solution was to derive the sub-Applications from a common 
 base class and use the main Application as a broker.  The broker listened to 
 function invocation request events.  Results of the method calls were made 
 available by a custom event that was dispatched by the called method upon 
 completion.
 
 Here is a clue to how to implement this type of mechanism: the SWFLoader that 
 loads a sub-Application has a property called content, which is actually the 
 sub-Application's FlexGlobals.topLevelApplication once the sub-Application 
 loads.
 
 Confused? I created a UML sequence diagram, a static object model diagram and 
 a text narrative to document how the mechanism worked.  Anyone else 
 attempting something similar is well advised to do the same.

There's an example on flexdiary.blogspot.com of how to cast a loaded swf to an 
Interface.  You may find that using a Dependency Injection Framework such as 
Robotlegs simplifies this to the extent you don't need so much documentation.  
Once you understand how the EventDispatcher backbone (or Event bus, as they 
like to call it) works, everything's really intuitive.  Check out 
http://insideria.com/2010/05/pass-the-eventdispatcher-pleas.html.

HTH;

Amy



[flexcoders] Re: Using modules and remote objects

2010-09-07 Thread valdhor
I do this all the time. My main application is a shell that loads in the app's 
layout and loads the menu's based on a users access level. This app then loads 
whatever module the user is interested in. Each module has all of its 
functionality encapsulated including its required remoting. This is all using 
Flex 3.x (Whatever the latest version is) as I don't have time to port it to 4 
yet.

Can you post some code? Flex as well as server would be good. PHP would be even 
better.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 Hi guys i have some issues concerning modules and remote objects. i have an 
 application that is split into modules and in each i use remote objects to 
 display data from the database. the problem is there is no data being 
 displayed and when i try to use the same code in a single app without using 
 modules, the data is displayed. could someone please help me out here. i 
 really need to use modules because it helps reduce the size of my app.





[flexcoders] Re: Using modules and remote objects

2010-09-07 Thread Mike
I recently did something like this for Cisco.  They needed a way for a 
sub-Application to invoke a method in another sub-Application, which might not 
be loaded.  The solution was to derive the sub-Applications from a common base 
class and use the main Application as a broker.  The broker listened to 
function invocation request events.  Results of the method calls were made 
available by a custom event that was dispatched by the called method upon 
completion.

Here is a clue to how to implement this type of mechanism: the SWFLoader that 
loads a sub-Application has a property called content, which is actually the 
sub-Application's FlexGlobals.topLevelApplication once the sub-Application 
loads.

Confused? I created a UML sequence diagram, a static object model diagram and a 
text narrative to document how the mechanism worked.  Anyone else attempting 
something similar is well advised to do the same.

Mike



[flexcoders] Re: Using modules and remote objects

2010-09-06 Thread ZIONIST
so hw do i solve the problem while still using modules?



Re: [flexcoders] Re: Using modules and remote objects

2010-09-06 Thread Alex Harui
It depends.  Folks who have a large application crunching a single source of 
data are more likely to put the data classes in the main app and just use the 
modules to late-load UI and business logic.

Folks building portals probably should require 10.1 and use Marshall Plan 
configurations.

It is technically possible to put the data classes in a  “never-unload” module 
and load it into the main-app and load the UI and business logic in a separate 
module that will unload.


On 9/6/10 12:28 AM, ZIONIST stinas...@yahoo.com wrote:






so hw do i solve the problem while still using modules?






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Re: Using Modules and Remote Objects

2009-02-25 Thread cortlandian
The modules presentation on your blog was very good, Alex. Thanks for
your help.

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Modules and sub-apps have the same rules with respect to
RemoteObject.  There might be a way to get it to work by having no
vestiges of RemoteObject or data classes in the main app and only have
them in the child apps, but it is my understanding that there will be
issues if some classes are in child apps.
 
 You can view the modules presentation on my blog to learn more about
applicationDomains so you'll understand the basic principle that
limits these kinds of configurations.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of cortlandian
 Sent: Tuesday, February 24, 2009 6:55 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Using Modules and Remote Objects
 
 
 Thanks, Alex, this is helpful.
 
 Does this also hold true if instead of modules, we used applications
 i.e. a main application from which swf loaders load other
 sub-applications. In such a scenario, does the RemoteObject and its
 value objects still have to be in the main application or can they be
 distributed to sub-applications? Our app has many java data services
 and each of them have several value objects for data transfer.
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex
Harui aharui@ wrote:
 
  Typically, the RemoteObject tags, and all classes being sent and
 received by RO are in the main app. The Modules only have view
 classes and no new data classes
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of cortlandian
  Sent: Sunday, February 22, 2009 4:52 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: Using Modules and Remote Objects
 
 
  I have used many other technologies, but am new to flex. We are
  porting the front end of a large enterprise application to Flex.
 
  Has anyone been using remoteObject with modules, and if so, is there
  anything different that you had to do in calling your remoteObject
  usin modules compared to deploying everything in a single application?
 
  I described the problem in my prior post, below. Any help would be
  appreciated.
 
  --- In

flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 cortlandian aruns@ wrote:
  
   My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote
   Object to get data from a class in a jar file. The application
worked
   fine while all the code was deployed as a single Application mxml
 file.
  
   I then moved some of the code to a Module mxml file, which I
navigated
   thru a Tab Navigator/VBox/Module Loader combination from inside the
   main application file.
  
   If the mx:RemoteObject tag was included in the Module mxml file,
upon
   running the application nothing would display under the tab loading
   that module. If I removed the mx:RemoteObject tag, the module does
   load and display. Of course, I cannot do anything useful because
I am
   unable to access the remote object and fetch data.
  
   If I include the mx:RemoteObject tag in the main application module,
   nothing displays.
  
   So how do you set up applications which use RemoteObjects and
modules?
   Any help is much appreciated. Have a nice day!
  
 





[flexcoders] Re: Using Modules and Remote Objects

2009-02-24 Thread cortlandian
Thanks, Alex, this is helpful. 

Does this also hold true if instead of modules, we used applications
i.e. a main application from which swf loaders load other
sub-applications. In such a scenario, does the RemoteObject and its
value objects still have to be in the main application or can they be
distributed to sub-applications? Our app has many java data services
and each of them have several value objects for data transfer. 


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Typically, the RemoteObject tags, and all classes being sent and
received by RO are in the main app.  The Modules only have view
classes and no new data classes
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of cortlandian
 Sent: Sunday, February 22, 2009 4:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Using Modules and Remote Objects
 
 
 I have used many other technologies, but am new to flex. We are
 porting the front end of a large enterprise application to Flex.
 
 Has anyone been using remoteObject with modules, and if so, is there
 anything different that you had to do in calling your remoteObject
 usin modules compared to deploying everything in a single application?
 
 I described the problem in my prior post, below. Any help would be
 appreciated.
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com,
cortlandian aruns@ wrote:
 
  My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote
  Object to get data from a class in a jar file. The application worked
  fine while all the code was deployed as a single Application mxml
file.
 
  I then moved some of the code to a Module mxml file, which I navigated
  thru a Tab Navigator/VBox/Module Loader combination from inside the
  main application file.
 
  If the mx:RemoteObject tag was included in the Module mxml file, upon
  running the application nothing would display under the tab loading
  that module. If I removed the mx:RemoteObject tag, the module does
  load and display. Of course, I cannot do anything useful because I am
  unable to access the remote object and fetch data.
 
  If I include the mx:RemoteObject tag in the main application module,
  nothing displays.
 
  So how do you set up applications which use RemoteObjects and modules?
  Any help is much appreciated. Have a nice day!
 





RE: [flexcoders] Re: Using Modules and Remote Objects

2009-02-24 Thread Alex Harui
Modules and sub-apps have the same rules with respect to RemoteObject.  There 
might be a way to get it to work by having no vestiges of RemoteObject or data 
classes in the main app and only have them in the child apps, but it is my 
understanding that there will be issues if some classes are in child apps.

You can view the modules presentation on my blog to learn more about 
applicationDomains so you'll understand the basic principle that limits these 
kinds of configurations.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of cortlandian
Sent: Tuesday, February 24, 2009 6:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using Modules and Remote Objects


Thanks, Alex, this is helpful.

Does this also hold true if instead of modules, we used applications
i.e. a main application from which swf loaders load other
sub-applications. In such a scenario, does the RemoteObject and its
value objects still have to be in the main application or can they be
distributed to sub-applications? Our app has many java data services
and each of them have several value objects for data transfer.

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Typically, the RemoteObject tags, and all classes being sent and
received by RO are in the main app. The Modules only have view
classes and no new data classes

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of cortlandian
 Sent: Sunday, February 22, 2009 4:52 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Using Modules and Remote Objects


 I have used many other technologies, but am new to flex. We are
 porting the front end of a large enterprise application to Flex.

 Has anyone been using remoteObject with modules, and if so, is there
 anything different that you had to do in calling your remoteObject
 usin modules compared to deploying everything in a single application?

 I described the problem in my prior post, below. Any help would be
 appreciated.

 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
cortlandian aruns@ wrote:
 
  My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote
  Object to get data from a class in a jar file. The application worked
  fine while all the code was deployed as a single Application mxml
file.
 
  I then moved some of the code to a Module mxml file, which I navigated
  thru a Tab Navigator/VBox/Module Loader combination from inside the
  main application file.
 
  If the mx:RemoteObject tag was included in the Module mxml file, upon
  running the application nothing would display under the tab loading
  that module. If I removed the mx:RemoteObject tag, the module does
  load and display. Of course, I cannot do anything useful because I am
  unable to access the remote object and fetch data.
 
  If I include the mx:RemoteObject tag in the main application module,
  nothing displays.
 
  So how do you set up applications which use RemoteObjects and modules?
  Any help is much appreciated. Have a nice day!
 




[flexcoders] Re: Using Modules and Remote Objects

2009-02-23 Thread cortlandian
I have used many other technologies, but am new to flex. We are
porting the front end of a large enterprise application to Flex. 

Has anyone been using remoteObject with modules, and if so, is there
anything different that you had to do in calling your remoteObject
usin modules compared to deploying everything in a single application? 

I described the problem in my prior post, below. Any help would be
appreciated.


--- In flexcoders@yahoogroups.com, cortlandian ar...@... wrote:

 My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote
 Object to get data from a class in a jar file. The application worked
 fine while all the code was deployed as a single Application mxml file.
 
 I then moved some of the code to a Module mxml file, which I navigated
 thru a Tab Navigator/VBox/Module Loader combination from inside the
 main application file.
 
 If the mx:RemoteObject tag was included in the Module mxml file, upon
 running the application nothing would display under the tab loading
 that module. If I removed the mx:RemoteObject tag, the module does
 load and display. Of course, I cannot do anything useful because I am
 unable to access the remote object and fetch data.
 
 If I include the mx:RemoteObject tag in the main application module,
 nothing displays.
 
 So how do you set up applications which use RemoteObjects and modules?
 Any help is much appreciated. Have a nice day!





RE: [flexcoders] Re: Using Modules and Remote Objects

2009-02-23 Thread Alex Harui
Typically, the RemoteObject tags, and all classes being sent and received by RO 
are in the main app.  The Modules only have view classes and no new data classes

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of cortlandian
Sent: Sunday, February 22, 2009 4:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using Modules and Remote Objects


I have used many other technologies, but am new to flex. We are
porting the front end of a large enterprise application to Flex.

Has anyone been using remoteObject with modules, and if so, is there
anything different that you had to do in calling your remoteObject
usin modules compared to deploying everything in a single application?

I described the problem in my prior post, below. Any help would be
appreciated.

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
cortlandian ar...@... wrote:

 My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote
 Object to get data from a class in a jar file. The application worked
 fine while all the code was deployed as a single Application mxml file.

 I then moved some of the code to a Module mxml file, which I navigated
 thru a Tab Navigator/VBox/Module Loader combination from inside the
 main application file.

 If the mx:RemoteObject tag was included in the Module mxml file, upon
 running the application nothing would display under the tab loading
 that module. If I removed the mx:RemoteObject tag, the module does
 load and display. Of course, I cannot do anything useful because I am
 unable to access the remote object and fetch data.

 If I include the mx:RemoteObject tag in the main application module,
 nothing displays.

 So how do you set up applications which use RemoteObjects and modules?
 Any help is much appreciated. Have a nice day!