Filed under: actionScript, appCoreLib, contracting, development, flex
Preface
For the longest time I have been using a little set of helper classes that I have just recently named AppCoreLib. I have used this on various projects of varying sizes. Everything from Enterprise level apps to my pet projects.
Though not entirely original, the idea hasn’t really been put into an open-source swc that I know of. So I decided to do so. Thanks and credit goes out to my bud EKZ who spawned the idea in this particular flex-flavor.
Application Core Library
AppCoreLib consists of a few lite-weight classes.
- broker based classes
- a special event class
- an application interface
The idea is this: Ofttimes an application needs to load various content and settings files prior to the application’s view being shown. The reason is that if you are using an MVC framework with {bindings} and/or other mechanisms on your model, you may encounter null pointer exceptions if a view tries to load prior to content dependencies being loaded. Enter AppCoreLib. It provides a very lite-weight framework added at the <application/> level of your RIA.
How it Works
- default flex loading mechanism loads swf
- IApplicationShell implementor’s creationComplete handler instructs instances of the broker classes to retrieve data dependencies
- broker classes notify handlers that they have indeed loaded their data
- upon all dependencies being loaded, IApplicationShell.shellInitiliazed() is triggered where normally you would put your RIA’s UI classes to be loaded.
- Since certain broker classes are Singleton implementors, you can easily access their data from anywhere in your application.
Check It Out
I have set up the project home at google code. Here are some various links:
- AppCoreLib home
- AppCoreLib docs (coming soon)
- AppCoreLib swc
- AppCoreLib source
- example application
- example source view
1 Comment so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

[...] February 18, 2008 · No Comments I’m looking to implement a configuration and asset loader and have come upon the AppCoreLib. [...]
Pingback by Asset and project config preloading « Steve.Learns.Flex Monday, February 18, 2008 @ 1:10 pm