Posts in Category "Presentations"

Apache Flex Presentations at 360Flex 2012 in Denver

I had the honor of giving two presentations on Apache Flex at 360Flex in Denver. One was part of the keynote and focused on things everybody should know about Apache Flex, and the other was more focused on those planning to contribute to the code in the project.

These files are actually pptx files but I had to give them .zip suffixes in order to post them.

Keynote Presentation

Apache Flex Session

Using the Flex Builder 3.x Profiler

I’ve been getting lots of questions about memory leaks lately. I finally found some time to put my techniques for analyzing memory leaks into writing.
Instead of using PowerPoint, I actually created a SWF so you can use the SWF to both view the presentation and learn how to use the Profiler. I cover the differences between profiler memory, System.totalMemory and process memory and show how I analyze the two most common memory leak scenarios.
Run Presentation
As usual, caveats apply.
The SWF also demonstrates an approach to another topic I’ve heard about often, and that is how to do XML-driven or data-driven UI. The presentation in this SWF is controlled by an XML file. A single engine parses the XML and creates the UI widgets as dictated by the XML. To change the presentation, all I have to do is change the XML. I can also add new widgets easily. Source is available here:
Download FlexBuilder Project
The SWF also demonstrates a technique for improving startup time. Because our blog system is painful to use, I don’t like uploading more than one or two files per blog post, but this presentation had more than a dozen images. So, instead of loading images externally, I embedded them into the SWF, but normally, that delays startup by the download time of all of those images. To get around that, I pack all the images into frame 3 of the SWF so that Flex can get up and running while the images download at the end of the SWF. I can get away with that because the images are not needed right away.
Hope this helps.

Marshall Plan At 360Flex Conference

Today I presented more information about the Marshall Plan at the 360Flex conference in San Jose. The PowerPoint presentation can be downloaded here.
Download Presentation
There is a series of demos in the presentation. The code and source are linked below. To get the third child to load you will need to download zoomer.swf and copy it to a server somewhere and fix the URL that loads it
Zoomer is a simple app that has a rectangle you drag around and it will magnify the area under the rectangle. The demo shows how it needs to be modified for being loaded by a main application in different applicationDomain and securityDomain configurations
Pattern 1 would the the standard first attempt. You can run zoomer.swf and see how it works on its own, run mainApplication.swf and see how, when zoomer is loaded, you can’t drag the rectangle out of the area owned by zoomer. See slide Demo #1.
Run Zoomer
Run Zoomer as a sub-app
Pattern 2 works for the first copy of Zoomer, but not for the second or third. See the slides for Demo#2
Run Zoomer
Run Zoomer as a sub-app
Pattern 3 uses getSandboxRoot() so the first and second copy of Zoomer works, but still the third is broken. See slide for Demo#3.
Run Zoomer
Run Zoomer as a sub-app
THe Final Pattern fixes that by listening for MarshalMouseEvent. See slide Demo#4
Run Zoomer
Run Zoomer as a sub-app
Source code is here:
Download Source
You will need a pre-release of 3.2 to build the source.
Preliminary write-up on the Marshall Plan is here:
Marshall Plan Wiki
As usual, caveats apply to all content

Popup Dialogs as Modules

Recently, it was pointed out that there were bugs in the PopUpDialogAsModule example. The dialog would not center and was not draggable. The reason was that the thing being popped up was a Module that parented a TitleWindow and not the TitleWindow tiself. After thinking about that for a bit, I decided to create a subclass of TitleWindow that can be a Module’s top level MXML tag. The source is available at this link:
Download source
Of course, the usual caveats apply. I could have certainly missed something again.
In theory, any component can be made into a module’s top-level tag by adding the [frame] metadata. Hope this helps. I’ve been seeing this issue a lot recently. Also, sorry for the errors in the older example.

Garbage Collection and Memory Leaks

I’ve seen lots of hair-pulling and confusion over memory management and garbage collection in Flex and Flash. Memory diagnostic tools are on the way, but until then, determining if you have a memory leak is a difficult thing to do. The attached presentation attempts to provide a simplified model of how the Flash Player manages memory. Hopefully, once you get a better understanding, it will save you time and hassle trying to detect memory leaks in your applications.
Download Presentation
I also put together a sample app that has a straightforward memory leak that hopefully will serve as an example of how I diagose memory leaks in Flex 2x. The tools in the next release will make this much easier, but the technique used here has served me well.
Download Sample

Embedded Fonts in Modules

A question was asked on Flexcoders about how to use embedded fonts in modules and late-load the embedded font. This example, inspired by Jonas.Eliasson, shows how it can be done.
Note that this example expects you to have an assets folder with arial.ttf and arialbd.ttf which I did not put in the zip because most of you have it somewhere, and I think it may be illegal to ship a .ttf across state lines.
Download file


I put together this presentation for the 360 Flex conference in San Jose. Thank you to those who attended and filled up the room so I could impress my manager with my supposed popularity.
The presentation contains a basic introduction to modules and how to use them, and an attempt to explain ApplicationDomains which are an important factor in how modules and RSLs (Runtime Shared Libraries) work.
The presentation is here: Download file
And some sample code is here: Download file
The sample code has build.script files that require a unix shell and show how some of the MXMLC parameters are used. (The usual caveats, disclaimers, and other legal stuff apply).