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: Seperate Project for Modules  (Read 7330 times)
deepshar027
Newbie
*
Posts: 1


View Profile Email
« on: May 18, 2009, 02:57:59 »

Hey guys,
Has anybody looked at creating seperate project for modules? Darshan has a sample for modules which has the module included within the main application.I was trying to understand best way of pulling that out and create a seperate project for it.I have been playing with cairngorm so far and just looking out for a good framework to deal with modules.

Thanks!
Deepak.
Logged
Gilbi
Full Member
***
Posts: 22


View Profile Email
« Reply #1 on: May 19, 2009, 05:35:11 »

I don't know if I fully understand your question, but I think how you deal with modules might depend on your work-flow. I use FlashDevelop and the latest release (RC3) has a feature that lets you right-click on a project file in the Project Explorer and compile it from the pop-up menu without actually opening the project file. This is a feature that was specifically added for multi-swf apps like those with modules.

Therefore, in FlashDevelop you should have a project for each module, and put all of your project (.as3proj) files in the same directory. This way, it's really easy to compile any module regardless of which project file you have open (because they all show up close to each other in the Project Explorer). As far as your source code goes, either put it all under the same src folder, or create one src folder for the shell, and one for modules, or even one for each module. One of the Fabrication examples puts them all in the same src folder.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: May 20, 2009, 06:25:37 »

When everything is in the same project, you can develop much faster. I find that making dependencies between projects in Flex Builder doesn't always work (a bug I'm sure will be fixed eventually). So when I set up a modular app as multiple projects, the first job is to get an Ant script going with targets that build everything.

Even for a shell and one module you'll probably need at least 3 projects. The Shell, The Module and the Common library that holds any classes they both need.

So for a small app (like the Sea of Arrows site: http://seaofarrows.com/srcview) I do everything in one project if possible. But for large projects where there are many modules and team members working on them, it can be beneficial to do the extra setup required to break it into separate projects. For instance if its a commercial project and you want to outsource a few modules without giving the game away, so to speak, you can give the contractor access to the specs and and source code for the module, and a way to deploy it into a working build of the app, and effectively isolate them in a single project.

-=Cliff>
Logged
Pages: [1]
Print