Usage Example of Weak References

Posted by - February 25, 2009

You might have heard about weak references which are used when listener functions for events in Action Script are being set. In 2006 gskinner was wondering why all the listeners were not set in weak reference mode. Some of guys on Habrahabr in comments to my article about functions contexts insisted on the fact that weak references are the bad practice and all the operations related to their removal you should do only manually.

I have known about them for a long time because I try to keep tabs on all Adobe’s news but I understood how it works recently just after using Flex Builder’s profiler. Instead of retelling background information I will give you an example where you might see how useful these weak references may be:

More…

The Best Code Pattern for RemoteObject

Posted by - February 20, 2009

Continuing the topic Advises for beginners I am going to talk about the most comfortable way to incapsulate server’s methods calls. Let’s call it ServiceBase pattern. It is a base class for all your possible services (bunch of methods which correspond to the server ones):

More…

To Flex Or Not To Flex

Posted by - September 22, 2008

In this article I would like to share my experience in application development using Flex to make it easier for you to choose to use or not to use it in particular situations. Far too often it appears that using Flex is not only unwelcome because of time limits but can also be damaging to the project.

First let’s overview application types to search for the fertile field for starting Flex development. Apparently we can already divide the applications we are interested in into desktop and web-top applications. Web applications may be usual (casual) or RIA, and each of them may have either front-end (surface site) or back-end (admin panel). We must never forget that they may be internet type for casual men of the web and intranet type for corporative users. With the help of Adobe AIR Flex became available on desktop but its usage comply with the same requirements as it does on web.

More…

My Two Cents About Mate Flex Framework

Posted by - September 1, 2008

Until the last moment I have been very sceptic about every Flex framework I have seen. I have not paid too much attention to Cairngorm or PureMVC but I was aware of their specifics. For example I don’t really like a global accessibility of View which appears to be available everywhere in code of a project which is written using Cairngorm. Also I was stuck with amount of mediator classes in PureMVC which cause growing up of the code’s size. That is why I have never used something except default component and event model of Flex Framework.

I was impressed by great feedbacks of RIA-gurus and decided to find out that is the matter. Don’t expect, I am not going to write about Mate’s model behavior but I will write only a few sentences. Mate is really cool!

I think the success of Mate relates to the fact that framework is not ported but exclusively written for Flex. It uses the main (maybe not very correct) principals and peculiarities of Flex Framework, such as:

  • Inheritance of all visual components from EventDispatcher which give us possibility to use bubbling-events as transport messages between View and Model.
  • Binding for IOC (Inversion of Controls).
  • MXML for describing in simple way dependency declarations between application’s layers.

All I have described above works with your custom classes and components without mandatory inheriting of fatiguable abstract classes for commands, mediators, models etc. And for afters Mate Framework is extensible by custom plugins.

Altogether you could get the first impression after reading Mate documentation not longer then one hour. Reviewing of the source code confirms that framework’s authors are good professionals who turned back Flex’s issues to benefits. Let’s use it.

ResizeableLayoutBox Component

Posted by - March 20, 2008

There is an example.

The component ResizeableLayoutBox is used for creating a GUI like dockable IDE. It must be used with CollapsablePanel which give us a possibility to expand and collapse panels.

Current realization of the component supports either a vertical (Accordion way) positioning or a horizontal one. Size of the panel can be changed by dragging it’s header by the mouse. While resizing such properties as minWidth, maxWidth, minHeight, maxHeight are considered.

Classes are located in Go!Verla Library.

AIR Runtime Installation Problems

Posted by - December 17, 2007

Thanks to the article(Installing AIR Runtime Environment on Mac OS X) at last I have installed AIR Runtime Beta 3 for Mac OS X Leopard.

The problem was in “air_b3_mac_121207.dmg.bz2″ file which I get from Adobe’s site. The file has incorrect extension *.bz2, it is automatically added by Safari but it’s useless. The file with this extension raise an error in Disk Utility: “There are not mountable filesystem in package”. So, after file was renamed to “air_b3_mac_121207.dmg” the installation of AIR Runtime executes perfectly.

PatternRectangularBorder Component

Posted by - October 17, 2007

There is an example.

The component PatternRectangularBorder can be used as background for such containers as Application, Canvas, HBox, VBox, Form etc. It based on RectangularBorder and BitmapData classes from Flex 2 SDK and works more natural then CSS image patterns in WSBackgroundPixelSkin component.

The component supports base Container’s style property background-image, also it extends that one by a new style property background-repeat which is usually used in HTML CSS. Possible values are

  • repeat
  • repeat-x
  • repeat-y

I was unable to extend RectangularBorder because it’s totally private so copy-past way is a solution here for me.

The class is located in Go!Verla Library.

List of related links