Archive for October, 2005

Thinking about the role of Flex comparing with Flash IDE

This Monday MM released the new Flex 2 and ActionScript 3 (alpha test). Although it’s not a final release, it’s interesting to know what the role of Flex product line and how will it affect to Flash professional developers.Flex 2 includes several parts software, Builder 2, Framework 2, Charting components, and late enterprise service 2. In them the core parts are Framework 2 and enterprise service 2.Generally, without Flash IDE, Flex Builder 2, Framework 2,(sometime with charting components) together will create a Flash SWF file, which compiled from MXML script, ActionScript 3 classes, together with standardized components, class library. I think this SWF file will have no difference with what we will create with Flash professional (should be 9). Like what we did with Flash 8, Flex SWFs could also talk with HTTP url, XML socket web service. But it seems Flex is more focus on enterprise/e-commerce, and maybe, more focus on Java developers. It offers standardized graphics user interface layout/elements, that become jobs drag/drop/move/set, save a lot of time and much fast for development, leave developers more time on Actionscript classes and server side. The Flex enterprise service 2, a J2EE server side program, will be something integrating with Flash SWFs, whatever made by Flash professional or Flex Framework (I suppose). So compare Flex Bulder/Framework with Flash IDE? Flex pros:
1. Fast, standard(wholesale), cheaper Flash user interface for clients. 2. (Maybe) Buy Flex 2 also buy enterpise J2EE server side (or bundle discount).
Cons:
1. No flexible interface(although it could I don’t think ppl will try to). 2. Bigger size SWF files (think about Visual Basic).
Thus in my opinion(only valid this moment of course), Flex will be used by lazy Flash developers, or serious Java developers, while Flash (9) for Flash artists, hard-working Flash developers. A bad news for Flash professional developers will be, some enterprise clients may look for lower rate Flash developers with the wholesale Flash by Flex.

Flex Builder 2

MVC:

|- Model component: data/behaviors |- View component: UI |- Controller component

mxmlc: mxmlc -file-specs a.as main.mxml mxmlc -library-path=….swc, …swc main.mxml

Actionscript: define classes (class name must begin with an uppercase letter) Include AS inline of MXML or AS class:

#include

Import AS into MXML:

import ...

Notice:

The Flex compiler transforms the main MXML file and its child files into a single ActionScript class. As a result, you cannot define classes or use statements outside of functions in MXML files and included ActionScript files.

What Flex 2 will do?

Flex 2 has two sections in its product line, Flex Framework, and Flex J2EE enterprise server.

Flex builder is the kit to create MXML files, some like dreamweaver for html. Flex creates flash files with MXML component-based script, together with ActionScript classes, and ActionScript code embedded inside MXML. The difference between Flex and Flash professional is that Flex do simple jobs in graphics user interface, with Macromedia style components. The Flex J2EE enterpise server is another side of Flex, I think Flash professional could use it as well.

Some points of Flex J2EE enterprise server:

1. Support multi-clients synchronize. 2. JMS API(Java message I/O) support. 3. Flash clients could subscribe data objects on server, that server will push updates when happens. 4. Support session waiting if connection broken.