tags:

views:

160

answers:

1

Hi,

I'm a little bit confused about when is better to use Flex Modules or RSL libriaries (in Flex 3.5).

My goal is split my project in several unit projects, so I can test and work separately. Let's assume I have a Customer app and Vendor app. I also have a front-end panel with two buttons. Each button launches Customer app or Vendor app.

These applications make different things. They share some .as functions and common components, too.

I understand that if I make a main project (for user login and to show a first panel) and two modules (customer, vendor) I must have all that components in my Eclipse project, isn't it?

Instead of doing modules, should I create SWC for Vendor and other for Customer app and call from main app by using RSL?

So, which option is more suitable? What do you advise me? Which are the trade-offs of each option?

On the other side, this flex application is integrated with Java through Blaze and ibatis for persistence managment, and hold by a web apache server. I considered also to create independent war files to keep this indpendence, but I thought this do not optimize flex code. I'm right?

Thank you.

Nil

+1  A: 

Modules offer finer grained control over when the content is loaded - and optionally - unloaded.

Assuming the user doesn't have the RSL cached locally, then it is loaded as part of the initial load of the application.

Using Modules, you can defer that load until such time as the user requests it.

In your instance, it sounds like you want to use a combination of both.

Declare a module each for the Customer and Vendor applications, and load the appropriate module only on the button click. This saves you from incurring the download cost of the redundant module.

Common logic that is shared between them could go into an RSL, which would be cached on the client side, and only downloaded once.

Marty Pitt
Hi Marty, Thank you very much for your response.
nil
very professional answer. thanks!
ufk