I've worked now on two very large Flex projects. I'm not sure how that parallels a straight ActionScript project, but I can share how those have been organized, since they've been quite different.
The first was heavily modularized. We had one main application that loaded over twenty different sub modules depending in what function the user was trying to perform. Each module for the Flex application was a separate Maven module. We had three different additional Maven modules which contained common classes and interfaces which could be used in any Flex module. All told, that project was broken down into about thirty Maven modules. In terms of each module's size, the result was quite good. However, it took new developers a little while to get used to the layout and know which module to look in for specific classes. Both FlexBuilder and IntelliJ IDEA navigated the structure well, however. The second project only has about six Maven modules, and is not modularized at all. It produces a single swf that is currently about 11MB (Note: I'm not advocating this approach or the other; I'm simply describing how two large projects I've worked on have been arranged). The overwhelming majority of code (about 250,000 lines of code) is in a single Maven module. This arrangement is certainly simpler than the other in terms of new developers coming up to speed on the basic layout. However, the Maven configuration is more complex, because the module with so much code in it has many dependencies and relies on many FlexMojos pieces to compile successfully. That module also has almost 5000 unit tests, which take about 20 minutes to run (we've had to increase the FlexMojos test timeout values quite a bit in that module because ASMock code generation for the unit tests takes a long time). Both projects use heavy packaging to organize the classes, with deep trees. It's become increasingly important to have consistent making and packaging guidelines in order to keep the codebase navigable and comprehensible. Those guidelines are, in my opinion, more important than how you choose to modularize your Maven projects. In my experience, IntelliJ navigates projects better than any of Adobe's own tools do. It has both better navigation and better refactoring support. However, it does not integrate well with FlexMojos 4, only 3. Since FM 3 is no longer actively updated or maintained, that is becoming more of an issue. Of course, Flex/FlashBuilder also do not integrate well with FlexMojos 4, and the FM 3 goals for them are buggy and outdated. Hope this helps in some way! Bryan Turner On Jul 3, 2011 3:01 PM, "Richard Lee" <[email protected]> wrote: > Thx for the response. > > It is logically grouped into 4 major areas, with each of those areas > grouped into 5-20 sub areas. However, it all needs to come together to > make the final AIR application. It is useful for the engineers to have > access to all the source for debugging, code completion, hover asdocs, > etc. Changes can happen at all levels, but most frequently at the upper > levels of the code. When there are low level changes, an automated way > of everyone picking them up would be great... perhaps if made into maven > projects using SNAPSHOT versioning and a central repository, that would > 'just work'? > > I'm getting the feeling as we go along with this project that no one > builds big, complex software with Actionscript, as the tools seem not up > to the task. :-( > > Also, Maven seems really slow to compile even trivial swc/swf > applications. Is this expected? > > Richard > > On 07/03/2011 02:43 PM, Marvin Froeder wrote: >> 2500 sources? That alone feels wrong. You should split that into >> multiple pieces. Find some logical way to group the source and go for it. >> >> Em 03/07/2011 17:59, "Richard Lee" <[email protected] >> <mailto:[email protected]>> escreveu: >>> Hi there- >>> >>> I'm working on an Actionscript 3 project with approx 2500 source >>> files. How do people organize and build such projects using modern >>> IDEs without those IDEs falling over and dying due to poor memory >>> management? The code is loosely divided into 4 major parts, with many >>> subparts. It does have a highly layered and fairly clean architecture, >>> but most engineers need to have access to all of it, so segmenting it >>> into different deliverables is not helpful. >>> >>> We have a few other design goals with our build system which may or >>> may not be helpful. One is that the source repository is largely read- >>> only as far as the build is concerned. This means all build byproducs >>> must go 'elsewhere'. Most build systems I've seen, including maven, >>> seem to want to stick the build byproducts in the source repository, >>> usually as a child of the build files. Another goal is that the build >>> needs to support enforcement of architectural layering, but needs to >>> also be fast. >>> >>> Are there any good example opensource projects out there people could >>> point me at? >>> >>> Richard >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Flex Mojos" group. >>> To post to this group, send email to [email protected] >> <mailto:[email protected]> >>> To unsubscribe from this group, send email to >>> [email protected] >> <mailto:flex-mojos%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/group/flex-mojos >>> >>> http://flexmojos.sonatype.org/ >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Flex Mojos" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/flex-mojos >> >> http://flexmojos.sonatype.org/ > > -- > You received this message because you are subscribed to the Google > Groups "Flex Mojos" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
