Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: plugin architecture and updates  (Read 11785 times)
ricardokirkner
Jr. Member
**
Posts: 18


View Profile Email
« on: May 28, 2008, 08:32:37 »

Hi. For the design of my app I am thinking of using something like "plugins". What I want to have is this:

The main app basically consists of a product (for some definition of product) editor. The list of available products is dynamic, so that you will only have the choice of products among the products available at run time (I want to be able to add/remove available products on demand, so compiling everything right into the swf file is not the best option). I thought of using modules or something like that, so that I could just drop a new file into the app's directory and it would (when started) detect the new product implemented in that file, and make it available. That file should hold the product's view, model and controller parts (i.e. everything that is necessary to work with that product).

This way of architecting my app is to enable updates without having to download the whole app's code again.

I hope the main idea is clear. Now my question is: what is the best way to architect my app in order to achieve this? Are modules the answer? or RSL/SWC?
Can I use the standard AS3 version of the framework, or do I have to use the multicore version?

On a side note.. how would you manage updates to your app's functionality, in general?

Any ideas or suggestions (and critics) are welcome.

Ricardo
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: May 29, 2008, 05:39:28 »

MultiCore is what you want to use for modular apps.

I don't think you'll get 'drop-in' detectability as you describe though without inolving a clever service as well. Probably you'll need to add the modules that are available to a config file manually.

Are you doing this in pure AS, or Flash? Flex Modules (the latest incarnation of RSL) is probably what you want if you're using Flex or AIR.

Not sure what you mean about handling updates to the app. Deployment? Announcement? Repository version tagging?

-=Cliff>
Logged
ricardokirkner
Jr. Member
**
Posts: 18


View Profile Email
« Reply #2 on: May 29, 2008, 06:44:13 »

Hi Cliff, thanks for the answer

I am using Flex, but embedding the app in xulrunner, so I can execute external commands (as far as I know, this cannot be done with AIR at the moment). With regard to updates, the idea is that the user will download the app only once, and get new product definitions and/or new functionality as plugins (when possible), so that they can be downloaded and integrated with the app without having to download everything again.

With respect to 'drop-in' detectability, I was thinking of something like executing a filesystem inspection, either through xulrunner, or by executing an external command, to detect wich files are present in the application directory, and (if new files are present) update the available products list. For now, this is what I need (i.e. I don't think I need to detect changes while the app is running, only at startup).

I have seen some posts by Zilet about using modules. Is this the currently best approach for the kind of stuff I am trying to do? I have seen that MultiCore is marked as alpha. How true is that? Does that mean that it currently is not an option for a production application?

Thanks again

Ricardo
Logged
ricardokirkner
Jr. Member
**
Posts: 18


View Profile Email
« Reply #3 on: May 29, 2008, 08:33:28 »

I was just thinking...

maybe I don't need to use modules.. because I just want to dynamically *load* stuff (at app's startup time), but I don't really need to isolate each part from the other, and I don't need to unload it or reload it once the app has started.

what do you think? are modules my only option here?

thanks

ricardo
Logged
ryebrye
Newbie
*
Posts: 7


View Profile Email
« Reply #4 on: June 25, 2008, 03:38:30 »

As far as the bridge to calling local calls goes - Merapi bridges Java and Flex.

As far as updates go... isn't the auto-update one of the selling points behind AIR?

http://adamflater.blogspot.com/search/?q=merapi
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #5 on: June 26, 2008, 05:49:23 »

MultiCore has recently been promoted to 'production' and is the recommended solution for modular programming in AS3. The differences are minor, but the capability added is major.

To your situation, even if you don't care about the code isolation benefits, I don't see how you will achieve your ends without Flex Modules, loaded swfs or RSLs.

RSLs are not a great answer for you as you need to have compiled your app to link to them to begin with. You couldn't introduce a new one without recompiling (and redistributing) the main app, defeating your purpose.

With loaded swfs or Flex Modules, you could vary the modules to be loaded by changing a remote configuration file, checked at startup.

And whether you use loaded swfs or Flex Modules, MultiCore is the recommended solution.

-=Cliff>
Logged
ricardokirkner
Jr. Member
**
Posts: 18


View Profile Email
« Reply #6 on: June 26, 2008, 06:16:47 »

Hi Cliff,

thanks for the answer. I have been walking this last path (using modules with multicore). Since you are telling them apart, what is the difference between loaded swfs and flex modules? Aren't flex modules also compiled to swfs which can be loaded dynamically at run-time (this is actually what I am doing).

thank you for any clarification
Logged
Pages: [1]
Print