FLEX vs OpenLaszlo

You may have already asked yourself, which is better. FLEX or Laszlo? Where are the differences? What do they have in common and which is the right one for me? Let’s try to find out.
First of all, both have a lot in common like the xml based syntax, the component model, javascript/actionscript and the modularity for additional third party code. This means, that while you are actually developing your app, you will find a lot of similarities between both technologys. I personally believe that the most important differences are the license policy, popularity and compatibility issues.

  • License policy

This one is simple. Laszlo is completely free of charge. You won’t have to pay for anything while Adobe charges at least for the FLEX IDE which is a quite nice tool for developers especially if it comes up to skinning of your UI.

  • Popularity

After the assimilation of Macromedia by Adobe many common and well known webdevelopment-applications like Dreamweaver or Flash belong now to the creator of Photoshop, which makes it very easy for them to reach a wide popularity for their new products FLEX and AIR. Laszlo on the other side is only well known by insiders of the scene who seek for alternatives. Laszlo Systems, the creators of OpenLaszlo don’t have the financial power like Adobe to run big advertisement campaigns. This leads to a big problem: The less a development platform is known, the fewer developers will produce code for third party plugins and modules. While there are quite a lot of pre-made scripts and modules out there for FLEX, the laszlo developer will have to build a lot by own hand.

  • Compatibility issues

A big advantage of laszlo is the already mentioned ability to let the developer and/or the user choose wether to use a Flash version or the DHTML/AJAX alternative, where first mentioned requires at least Flash5. FLEX, on the other side, can only output Flash while its plugin must be at least version 7. This leads to compatibility problems with users, who don’t have an updated version of their flash plugin installed or maybe no plugin at all (Which doesn’t happen that often, tbh). Laszlo developers have the big advantage at this point to simply transform their code into DHTML/AJAX code, which should work in every more or less modern browser.

So, what should I take?
This one ain’t that difficult as you might think. If you’re already a FLEX developer and you’re doing fine, stick to it. There is no reason to switch if you like FLEX. The skinning abilities and the big community behind it make it a solid development platform for RIA’s.
If you’re short on money to buy the FLEX IDE or just like the idea of open source, you might want to check out OpenLaszlo, which has no real big disadvantage compared to FLEX. On top of that the OL documentation ist quite clean and lightweight, which makes it easier for beginners to start developing. The “Laszlo in 10 mins” tutorial is very very nice. You should definately check that out if you’re interested into OL development. The only thing you might miss is the wide popularity from Adobe’s counterpart product.

If you want to check out OpenLaszlo, the “Getting Started” Website of Laszlo Systems is a good spot to start.


ActionScript and JavaScript – Some differences

Some of the differences between ActionScript and JavaScript are as follows:

• ActionScript does not support browser-specific objects such as Document, Window,
and Anchor.
• ActionScript does not completely support all the JavaScript built-in objects.
• ActionScript does not support some JavaScript syntax constructs, such as statement labels.
• In ActionScript, the eval() action can perform only variable references

An introduction to important ActionScript terms.

Actions are statements that instruct a SWF file to do something while it is playing. For example,
gotoAndStop() sends the playhead to a specific frame or label. In this manual, the terms action
and statement are interchangeable.
Boolean is a true or false value.
Classes are data types that you can create to define a new type of object. To define a class,
you use the class keyword in an external script file (not in a script you are writing in the
Actions panel).

Constants are elements that don’t change. For example, the constant Key.TAB always has the
same meaning: it indicates the Tab key on a keyboard. Constants are useful for comparing values.
Constructors are functions that you use to define the properties and methods of a class.
By definition, constructors are functions within a class definition that have the same name
as the class. For example, the following code defines a Circle class and implements a
constructor function:
// file Circle.as
class Circle {
private var radius:Number
private var circumference:Number
// constructor
function Circle(radius:Number) {
circumference = 2 * Math.PI * radius;
The term constructor is also used when you create (instantiate) an object based on a particular
class. The following statements are constructors for the built-in Array class and the custom
Circle class:
my_array:Array = new Array();
my_circle:Circle = new Circle();

Data types describe the kind of information a variable or ActionScript element can hold. The
ActionScript data types are String, Number, Boolean, Object, MovieClip, Function, null, and

Events are actions that occur while a SWF file is playing. For example, different events are
generated when a movie clip loads, the playhead enters a frame, the user clicks a button or movie
clip, or the user types on the keyboard

Event handlers are special actions that manage events such as mouseDown or load. There are two
kinds of ActionScript event handlers: event handler methods and event listeners. (There are also
two event handlers, on() and onClipEvent(), that you can assign directly to buttons and movie
clips.) In the Actions toolbox, each ActionScript object that has event handler methods or event
listeners has a subcategory called Events or Listeners. Some commands can be used both as event
handlers and as event listeners and are included in both subcategories

Identifiers are names used to indicate a variable, property, object, function, or method. The first
character must be a letter, underscore (_), or dollar sign ($). Each subsequent character must be a
letter, number, underscore, or dollar sign. For example, firstName is the name of a variable.

Instances are objects that belong to a certain class. Each instance of a class contains all the
properties and methods of that class. For example, all movie clips are instances of the MovieClip
class, so you can use any of the methods or properties of the MovieClip class with any movie
clip instance

Instance names are unique names that let you target movie clip and button instances in scripts.
You use the Property inspector to assign instance names to instances on the Stage. For example, a
master symbol in the library could be called counter and the two instances of that symbol in
the SWF file could have the instance names scorePlayer1_mc and scorePlayer2_mc. The
following code sets a variable called score inside each movie clip instance by using
instance names:
_root.scorePlayer1_mc.score += 1;
_root.scorePlayer2_mc.score -= 1;
You can use special suffixes when naming instances


are functions associated with a class. For example, getBytesLoaded() is a built-in
method associated with the MovieClip class. You can also create functions that act as methods,
either for objects based on built-in classes or for objects based on classes that you create

Objects are collections of properties and methods; each object has its own name and is an
instance of a particular class. Built-in objects are predefined in the ActionScript language. For
example, the built-in Date object provides information from the system clock

Packages are directories that contain one or more class files, and reside in a designated classpath

Target paths are hierarchical addresses of movie clip instance names, variables, and objects in a
SWF file. You name a movie clip instance in the movie clip Property inspector. (The main
Timeline always has the name _root.) You can use a target path to direct an action at a movie clip
or to get or set the value of a variable.

Courtesy: http://makinguseofpython.blogspot.com/2007/03/actionscript.html