Warning William ... Brain Dump in Progress...

First I want to mention that I try not to compare them too much on email
lists because what invariably happens is that somebody somewhere reads the
post,  takes a line or two out of context and it becomes overemphasized. Or
somebody compiles all the comparison posts into a horribly simplified and
misleading table and posts it somewhere for managers to use instead of
giving their developers the time to evaluate the options for themselves.

I do think it's appropriate to compare them a little bit here as methods of
flash coding and I do want to offer my summary of current thoughts for
fellow flash developers who are thinking of trying them out. But anybody who
reads this, please consider it light conversation. Like Matthias, I've spent
a lot of time now with them both and think that it really comes down to your
criteria more than anything else. I can see a lot of reasons why even the
same company might use one instead of another on different projects and I'm
certain to miss some of the important points of comparison. I'm interested
in Haxe also, but focus on Flash, Flex and Laszlo because I'm a contractor
in a small city, so a lot of work seems to pop up in mid project, when the
language choice has been made long ago and they need an extra set of hands
or help with a problem.

I should mention that I have less experience with Flex than I do with Flash
or Laszlo, and more with Flex 1 than 2, though I've spent 2 months now
trying to catch up with Flex2.

In general, I prefer them both over Flash for projects where you have more
than one person, but for small programs I think it's quicker to do them in
Flash and they both benefit from Flash as a prototype tool and benefit from
swf vector assets guiding the design, even if you are going to use the
drawing api to draw out the images.

The things that I love about Laszlo and Flex are their maintainability and
how they scale to larger applications and more people. These are the same. I
love the declarative nature of the xml tags, but find xml itself to be a bit
clunky and would be curious to see what declarative layout features in a
language like Haxe might look like. It will also be interesting to see what
Flash 9 does for components and layout.

Language Features: States, Binding, Constraints, Animators
These are all very similar since Flex2. In general, Laszlo's syntax is more
terse and Flex's is more formal. Things happen automatically for you in Lzx
that you have to explicitly type in with mxml. Personally I like the terser
syntax of Laszlo, but realize that Flex's more formal style; which reminds
me of taking my medicine, has some advantages. A good example for comparison
here is the repeaters. With Flex you need to embed things in a repeater
component. Laszlo's views automatically replicate when the view is bound to
more than one data node. In general, the lzx way is nicer, but what do you
do when you want to explicitly reference one of the replicated views after
the fact to do some manipulation? You need to know what's happening behind
the scenes and know that an array of clones has been created for you; that
you can use the array to reference them. Something like that tripped up a
friend of mine when he was learning lzx. It's nice to have things happen for
you invisibly, but it raises the stakes that you know what is happening
behind the scenes. Similarly a new coder given the equivalent code written
in the two languages would have the name of the repeater to go from to look
up what is happening, so there is some benefit to being explicit from the
start - and this probably enables some speed optimization in Flex - it just
ends up also being much more verbose, which gets old.

E4x and Regular expressions are two really nice language features Flex has
at this point that Lzx doesn't. But at some point in the future those will
be incorporated into lzx as well.

Flash Player Features:Drawing Api, Video, Sound, Printing, Fonts and Text
Formatting
This is a mixed bag, but is generally in Flex's favor over both Laszlo and
Flash in that Flex and As3 fixed and improved some fundamentals that laszlo
hasn't incorporated yet. A big one is text formatting. Like with Haxe, the
actionscript api's are still available to you with Laszlo, but in most cases
they've wrapped up functionality into their own classes. In many cases there
is some benefit to this as it allowed them to fix things that were
fundamentally wrong with the early versions of the flash player, but now
that everything seems to work, it does potentially become tougher to track
down problems because you have two layers instead of one to look at. On rare
occasions you still need to actually use actionscript to access some of
these features.

Components
The "Out of the Box" Lzx components are generally good, but not quite as
good as the Flex ones. I don't think they look as nice, and a few of them
are slower than their Flex counterparts, though I've yet to see a speed
problem that wasn't fixable. Skining them is about the same in terms of
dificulty, generally less pleasent than it should be, but doable. Flex has a
greater range of style properties. I think it's far easier and quicker to
create new components from scratch in Lzx than in Flex. The Flex charting
components are pretty impressive and the Lzx ones are just a good starting
point.

Managing Data
A big variable here is whether you are using Remoting and/or FDS or whether
you are passing your data all as xml using a REST protocol. If you have a CF
or Java programmer with remoting capabilites and Flex on the front end of a
forms based client server application, I don't know how you can beat that
for either speed of development or efficiency of communication. But if you
have a REST protocol passing xml to your client, which is what Laszlo
recommends and which I do like, they become more comparable. I think I might
still give Flex the edge here if you don't have control over the xml and
have to do a lot of merging of different xml results into new datasets for
display. I found that to be a bit painfull in Lzx but haven't done it in
Flex so I could just be thinking the grass might be greener. I like the idea
of e4x, but I'm not sure it's actually faster or easier, it just seems to
look nicer and be more terse. The validators and formatters are a nice
formalism in Flex. Though you do the same thing in lzx and it takes about
the same amount of effort, it's nice to have them formalized for
consistency.

Layout
Currently I like Laszlo's layout methods much better than Flex's, but I may
change my mind once I get more familiar with the intricate rules that Flex's
layout components use. They seem very well designed for form based
components and interfaces and you can't argue with how easy and nice it is
to put together liquid layouts in flex builder, but the Lzx way is simple
and flexible. You can tell any view or component to either ignore the layout
it's in, or to apply the layout it's in, or to switch back and forth without
changing the view structure.

Accessibility
At this point I think it seems much easier to create accessible applications
with Flex than with Laszlo. Laszlo has an api that you can use to access the
flash player's cababilities, and it looks like simple stuff works simply,
but more complicated interactions might add some real work. I've yet to do
it in Lzx and it seems pretty easy in Flex. I'm waiting until they finish
the dhtml runtime before I look into lzx's accesibility more as I imagine
that will change things. Personally what I'd really like to do is create
tools that help make accessible sites that don't rely on screen readers and
have a real human voice read the text content, but that's another
conversation.

Tools
Flex Builder is really nice and I'm sure will get better. I'm happy to pay
for it too, but it worries me now that I have a Pc as my main computer and a
Mac as my laptop that I can't use the same license for both. If it were just
for Flex Builder I wouldn't mind buying a license for both, but then you
think of all the other Adobe tools with the same license and I worry a lot
how expensive that would get. I really don't want to use a vm and am
starting to regret getting the mac as my laptop. the IDE4Laszlo tool isn't
really worth using. I ended up just using eclipse with subclipse and
xmlbuddy for my laszlo work, which I find to be fine and I don't have to
worry about that licence problem. I like paying for software because it
keeps people creating software that I want, but that license problem is
really nagging at me and could really turn me more open source minded.

I'm also interested in a report from Max where someone said that Fireworks
might end up as a skinning tool for Flex. That would be nice. I always liked
that tool and think it would serve that purpose well. But the more money I
plan on putting towards this stuff the more that license thing will bother
me.

Community and Environment
The Flex community is much larger, it's too bad but Laszlo hasn't gotten as
much help from the open source community as I would have hoped for. The
Laszlo systems folk are really great though and participate regularly on the
laszlo-dev email list, so you always know specifically what they are working
on. I also LOVE having the JIRA bugbase online so that before begining any
project you can do a search on the various things that you are going to be
using and get a heads up on any bugs that might nick you ahead of time.

The Future
I haven't really looked at the dhtml runtime yet, but that obviously has
promise. I feel like I know Laszlo and Flash well enough now, but still need
to get caught up on Flex2, the last time I learned about Flex heavily was
with v1, though I've spent the last 2 months trying to get caught up, it
seems like it will be another month or two before I feel like I really know
how to do everything properly enough to take on contracting work with it. I
hate taking on contracting work until I know something pretty solidly
because otherwise it makes life pretty miserable.

Haxe/Actionstep/Sandy? I was just thinking of how nice that Haxe/Actionstep
would be while writing this and before pressing "send" noticed a post by
Scott Hyndman that such a combo might exist someday as well. I would take
that pretty seriously for personal development in the near future.

Anyway for any trivia buffs out there, that's my long winded take on them up
to this point.

-Cort
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to