Flex Pasta » 2008 » November

If you use Firefox for Flex development, you may have had problems with a SWF caching problem.  Even though a Flex compile updates the SWF file on the file system, Firefox doesn’t pull the new SWF from the server, but rather uses its internal already cached SWF file.  This can cause headaches when trying to guess why the code change doesn’t appear in the browser.  To solution has been to clear the cache in Firefox and reload the page.  I turned my browser cache size limit down to 0MB.  This doesn’t seem to fix the problem either.  There is another setting that can’t be found in the Firefox interface.

  1. Open a new tab in Firefox.
  2. Type about:config in the url.
  3. Agree to the warning.
  4. Change the property browser.cache.disk.enable and set it to false.

Thus far this solution seems to keep my SWF file from being cached by Firefox.

I was using an embedded font today with modules and charts.  My embedded font is declared in the css file and is only referenced in the main application page and not in each module.  When embedding the font in the main application, I would expect the font to be carried over into each module, the same way all the other styles work with modules.  For some reason though, the labels on the axes of the column chart don’t appear when the chart is in a module using an embedded font.  I have opened a bug with Adobe regarding this issue.  I’m not sure if it’s the chart doing something weird or the Flex compiler(or maybe me!).  In any case, I don’t think the labels should disappear.

Run the example and see for yourself the behavior: Charting.swf

Panel 1 is a column chart declared in the main application and Panel 2 is the exact same column chart in a module.  There is an embedded font ‘Verdana’ in the main application.

Charting.mxml

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”horizontal” xmlns:local=”*”>
<mx:Style>
Application
{
font-family: Verdana;
}
@font-face {
src:url(”font/verdana.ttf”);
fontFamily: Verdana;
advancedAntiAliasing: true;
}
@font-face {
src:url(”font/verdanab.ttf”);
fontFamily: Verdana;
fontWeight: bold;
advancedAntiAliasing: true;
}
@font-face {
src:url(”font/verdanai.ttf”);
fontFamily: Verdana;
font-style: italic;
advancedAntiAliasing: true;
}
</mx:Style>
<local:ColumnChart width=”50%” height=”100%” title=”Chart 1″/>
<mx:ModuleLoader url=”ChartModule.swf” width=”50%” height=”100%”/>
</mx:Application>

I had a great time at MAX San Francisco.  The weather was great.  There was too much good food…which is a good and bad thing.  The general session topics were outstanding.  I was quickly blown away by these presentations and different research Adobe is doing.  From the new york times awesome flex application to the speech to text video reader, I really enjoyed the innovation.  Overall I thought the conference was a blast!  I have a lot of ideas and things to tinker with after attending the conference!  Thanks to Matt Chotin and the Flex SDK team for giving me the opportunity to attend.

The last and final day featured 5 sessions that I attended.

  1. Security in Air, Peleus Uhley, Ethan Malasky - Session covered most of the information I expected, though I am always a fan of examples and more advanced topics.
  2. Flex for Large Application, Alex Harui - Very well presented.  Adobe is adding a new feature called the Marshall Plan for Flex 3.2.  Basically, the marshall plan is similar to modules but are really more like sub applications.  The sub applications don’t depend on the parent application for any of the classes it needs.  This means that a sub application could be compiled against one version of the Flex SDK, and another could be compiled against another version and they would all play nice together in the Flash sandbox.  Note that this will only work going forward with applications built in Flex 3.2 or later.  But it is nice they are making this feature before Flex 4 is released.
  3. High Performance Web Applications with Adobe Air, Oliver Goldman - Some very cool concepts discussed that not only worked well with AIR, but could be used with any Flex web application.  There were some good tough questions from the audience that Oliver pretty much nailed answers to and even explained the answer well.
  4. Data Visualization with Flex, Tom Gonzalez - This session really was split up and well organized to cover the different aspects of charting: reformatting data, styling, drill downs, etc.  Advanced charting in Flex was a bit of a black box to me until I attended this session, so it is one of my picks for favorite session of the week.  One thing with the session that could have been better is to have a lab instead of just a speaking presentation.  I think the way Tom organized the presentation/code was set up perfectly for a lab and would have been much more engaging if I could play around with the code Tom was showing.  In general with the conference, I would like to have seen more labs with advanced topics.
  5. Cairngorm: Tips and Tricks from the experts, Eric Garza, Peter Martin - If you have read past entries on my blog, you will quickly note that I am not a big fan of Cairngorm.  This presentation by Eric and Peter on Cairngorm was fine, but it also reinforced my dislike for the Cairngorm Framework.  I personally had long compile times on large projects because Cairngorm requires an enormous amount of classes to do simple tasks.  Cairngorm makes it harder to leverage the benefits modules.   One other take away for this session was the new Cairngorm plugin for Eclipse that Peter Martin had worked on.  If you are using Cairngorm I would recommend looking into this plugin or contributing to its development.  It it is still beta yet functional and could add value to your project.  I saw some other frameworks at the conference which I will be looking more into…such as Matte and Swizz.  Of course my favorite is still the Penne Framework!

On MAX Day two, I attended one lab and 3 sessions.

  1. Deploying Services with LCDS presented by Christopher Conraetes - Class talked about real time data synchronization between clients using remote objects and data management.  Chris really presented well and everything was organized.
  2. JPA with LCDS presented by Jeff Vroom.  Learned a lot of information about some of the features of LCDS 2.6.  I am still a little skeptical of some of the advanced data management features.  A lot of things can be done just as well with BlazeDS, so I am not sold on the whole pay for LCDS and get extra features concept.  I would like to see more use of annotations in LCDS rather than having all these pieces of configuration needed to set up each step of remoting.
  3. Flex Deep Dive with RJ Owen and Brad Umbaugh.  These guys explained in more detail with regardes to Bindings, SytleManager, SystemManager.  These guys are good presenters.  The advanced bindings section was kind of quickly skimmed over, rather than skipping over the easy stuff and getting right into advanced bindings under the covers.  The StyleManager and SystemManager sections were helpful, especially the demos.  I would have also liked to see more on the FoucsManager.  It is too bad these tracks are only an hour.  I had an understanding of the basics of the different managers in Flex, but I would have loved to have the speakers just right into the source code and explain how it all works a little more.  Tough to do with the time constraints though.
  4. Devlivery of a mission critical application for NATO - Peter Martin, Mansour Raad.  I didn’t know exactly what I would get out of this session going into it, but it turned out really great!  The authors had a pretty nifty map and graphing application to show.  I didn’t understandhow they did everything in the application, but I really liked that, because it made me think about how the math was done for rendering the maps.  I came in to the session with no expectations and left with my mind racing on the different problems the developers must have had to solve during this project.