Large Applications for impatient developers

Half year ago I made few comments regarding tricks I like to use when developing large Flex 2 applications. SInce then I have been receiving steady stream of emails – once every week in the beginning, up to few per days lately. They are asking for information from the upcoming Ria Book we are writing (  Apparently, there are quite a few developers that a) become impatient if the build takes more then 5 seconds and b) concerned that their application will be delivered to the user with similar attention span that could walk away in 10 seconds  or less – regardles of artwork in the progeress meter.

That pretty much forces developers to break the applications in the manner similar to the current generation of loosely  applications:

  • application has to use RSL methodology to speed up development and minimize linkage time 
  • bootstrap application has to be kept to bare minimum – just initialize global managers and list common runtime libraries – to keep “rebuild” time low and initial load fast
  • optimized runtime libraries – while it is tempting to load complete  framework SWC with every application, it would amount to extra 500-600KB on the initial download – better managememt via automatic extract to shared RSL is required
  • application should make use of automatic download of “pages” – essentially parts of application that are either optional or independent or can be customized/added due to subscription /security.

Given those requirements the book talks about static linkage of Flex applications (unlike classical environments that compile everything and then link object modules Flex starts from the “application” and pools necessary resources via sophisticated linker/preprocessor/compiler/optimizer/packager workflow. The book describes the differences between MXML and ActionScript applications, differences between compile-time and run-time linkafe, class loading, self-initialization of dynamically loaded SWFs, and other small details that you only need to know when your application grows over 10-15 screens /1MB of statically linked SWF.

I am starting this thread here in format of Q&A to answer the forementioned issues.

[tags]Flex, ActionScript, large, module, link, static, deployment, distributed[/tags]


3 thoughts on “Large Applications for impatient developers

  1. Marco,
    Breaking your application in two independent units will help some people, also canonic approach with interfaces will help some to use components as black boxes. In the end of the day with these approaches you end up with :
    1. Large build
    2. Need to load all components on the startup of the application.
    While describing the above techniques, the book is more in a favor of different incremental approach – developing core application and pluggable modules allowing you to develop and deploy pieces independently. Think of very specific case for larger enterprise applications of 1-100MB in size – where even loading complete application at once is not an option, not to mention that 10-100 people have to work on it relatively independently – and then scale it down and up – you would see architecture a bit differently.

  2. I completely agree on breaking up a large application into smaller modules that only get loaded as required but the user. It makes no sense for an application that has many views and modules to force a user to download the entire package when only a small portion of that may be all they use. I have been using that approach with RIA’s since Flash 7 and it has always worked very nicely. Can’t wait to get a copy your book once it comes out.

Comments are closed.