Tuesday, October 17, 2017

Friday, February 10, 2017

Apache FlexJS Summit

I wanted to help spread the word that Apache FlexJS is holding a summit in Miami this year.

Get all the details at the summit website at http://us.apacheflexjs.org/

Quoted From the website:

FlexJS is a new summit track that shows where FlexJS is today and lays out the future for the FlexJS project. It is aimed at existing Apache Flex and new Apache FlexJS developers, designers, and users. Hosted along side the ApacheCon event, participants have a wonderful opportunity to discover new projects and exchange ideas. 

Miami is a wonderful travel destination with something for everyone. Consider extending your stay a day or two to enjoy the beach and sun. 

The summit is being hosted at ApacheCon, so attendees will be registering to attend ApacheCon.


The earlier you register, the more you save, so get your tickets early. 


Monday, July 4, 2016

Happy July 4th!

Happy July 4th to The United States!

Keep Flexing and don't forgot to enjoy the parades and BBQ.

Tuesday, April 12, 2016

Apache FlexJS 0.6.0 and Apache Flex FalconJX 0.6.0 Released

The people working on FlexJS have released a new version of the FlexJS framework and the FalconJX compiler.

Grab the code and read more at https://blogs.apache.org/flex/entry/apache_flexjs_0_6_0.

Quoted from the above link:

The Apache Flex community is pleased to announce the release of Apache
FlexJS SDK 0.6.0 and Apache Flex FalconJX Compiler 0.6.0.

Apache Flex is a highly productive, open source application framework for
building and maintaining expressive applications that deploy consistently
on all major browsers, desktops and devices (including smartphones,
tablets and tv).

Apache FlexJS is a next-generation Flex SDK that enables developers to use
MXML and ActionScript to not only create SWFs but also cross-compile the
same MXML and ActionScript to HTML/JS/CSS so applications can run natively
in browsers. The cross-compiled code can also be used in Apache Cordova
(Adobe PhoneGap) mobile applications.

Apache Flex FalconJX is a next-generation MXML and ActionScript
cross-compiler. It extends the next-generation SWF compiler known as
Falcon. Both are contained in the release package and are used by the
FlexJS package to compile SWFs or cross-compile to HTML/JS/CSS.

Sunday, December 13, 2015

Modules and Runtime Errors

Quick heads-up to anyone working with Modules (https://flex.apache.org/asdoc/spark/modules/Module.html):

When working with Modules, unresolved runtime errors are commonly a result of the error throwing class not being included in the Application instance. A common example of the problem is when a module invokes the PopupManager class without it being included in the main Application instance.

To resolve the error, simply include the error throwing class's package in the main application to resolve this problem. Below I have included the PopupManager package explicitly.





It isn't necessary that the main Application file initializes an instance, simply including the code is enough. I hope this proves helpful.

Keep flexing!

Tuesday, October 6, 2015

Flash Builder Memory Allocation

Flash Builder is based on the open source Eclipse IDE. Regardless of how you feel about Eclipse, one thing is for sure: Eclipse can really use memory.  Lots and lots of memory. If your copy of  Flash Builder is running sluggishly, here are a few things that can help.  



Show Heap Status 

You can see the state of memory allocation at all times via the following setting: Window -> Preferences -> General -> Show Heap Status (3rd checkbox down) Now you should be able to see a little garbage can icon, usually at the bottom of the screen.  Hover over the yellow bar to see allocation statistics, or click the trash icon to manually run the garbage collector.

When compiling, you may see the memory fill up and the garbage collector will run, possibly several times, before compilation is complete.  The IDE will likely freeze when the garbage collector runs, which is very annoying.  



Assign More Memory To The Compiler

To reduce the frequency of garbage collection, assign more memory to Flash Builder via the following steps:

Exit Flash Builder

Find the FlashBuilder.ini file. On a Windows machine, it is located at C:/Program Files(x86)?/Adobe/Adobe Flash Builder/FlashBuilder.ini

Open FlashBuilder.ini

Find the maximum heap size, look for a setting like “-Xmx512m”.

Up the max heap size. I set it to 2 gigabytes, e.g. “-Xmx2048m”.

Save and restart Flash Builder.  



These steps should improve Flash Builder performance, especially when compiling.  Remember to manually run the garbage collector via the trash icon if your copy of Flash Builder is running slowly.

Keep Flexing!

Friday, August 28, 2015

Performance Tips

Do you want to speed up your Flex based application?  Here are some tips in no particular order:

If you are using a Vector array, specify the size of the Vector.

In my tests it was 50% faster to loop through a Vector with 30,000 elements when the Vector's length was set at compile time rather than at runtime.
var coordinates:Vector.<Number> = new Vector.<Number>(300000, true);

Use SpriteVisualElement when applicable.

For Spark components, SpriteVisualElement is much lighter than UIComponent or Group and it implements IVisualElement. It cannot function as a container but it is very useful as a canvas for vector drawing.

Before dispatching events, check if anything is listening with .hasListener() .

If your app is dispatching large numbers of Events, this can save some cycles because generally Event creation is slower than invoking methods.

For drop shadows use RectangularDropShadow instead of a DropShadowFilter.

Filters automatically trigger bitmap caching of the target element which eats up significant amounts of memory.

Cast using “as” instead of function casting via “Type()”.

"as" casting is ~ 5 times faster than "Type()" casting.

Disable Mouse interaction.

If mouse interaction is not desired or needed for a visual element, disable it via mouseChildren = mouseEnabled = false.

Stop event propagation.

Save some cycles by calling .stopPropogation() for bubbling events.

Use appendText() when available.

This is a minor point unless you are working with huge strings. That said, .appendText() is much faster than raw string addition via text += .

Use FTETextField in item renderers.

If you need to display text in an item renderer and require the FTE engine, the FTETextField is much faster than a Spark Label.  The downside with the FTETextField class is that it is low-level and harder to use than Label, but it is much more performant.

Do not put large amounts of data in mxml files.  

Large data sets via declarations in an .mxml file compile painfully slow. Include data in separate files to vastly speed up compilation.
 
Keep flexing!