<< Wicket In Action: Chapter 1 Review | Home | "Best Tool for the Job" is a Myth >>

Some Reasons Flex Looks Appealing

Update It has been brought to my attention that I have repeated some information contained on the Flex homepage in my ramblings here. I just wanted to point out that is wasn't intentional and I was not trying to plagiarize. But the fact that my sentiments reflect that of Adobe's is pure coincidence.

In my JavaFX Too Late... entry I said the following about Flex.

But where are the Flex driven applications? Where are the AIR applications? I'm sure some of you will drop a few links in the comments. But considering the number of blogs I read the the number of different kinds of websites I visit not only for fun but also to try and keep abreast of the latest and greatest going on in development, I have yet to run across a Flex driven web site.

James Ward politely pointed out some links where I could see more Flex in action (not the book). After spending some time doing this I started doing a bit of home brewing of my own with Flex. Here are a few reasons why Flex looks appealing to me (in no particular order).

I don't have to give up Java - Right off the bat this is huge for me. I've invested much of my career in Java and for me to move to something entirely away from Java, well, that something would have to be phenomenal. With flex I can leverage all my Java skills on the server while providing a really nice UI on the client. And I can even use my Java skills while writing ActionScript because they are similar languages.

Useful out of the box - The core set of components are useful enough in themselves for most basic applications. And its not like Swing components where they just do the most basic trivial thing. Flex stock components do what typical users want them to do without any extra work from the developer, for the most part. This segues into my next point pretty well.

Less code more goodiness - Look, I don't mind coding. I am a developer. Writing code is fun. But I'd rather write code that doesn't already exists. I think we all would. Getting flex components up and running requires, generally, very little code to do most common things.

Browser issues - I love JQuery. It solves so many problems when it comes to JavaScript. But it doesn't solve all of them. I spend more time debugging browser issues than anything else. And its not just JavaScript. It's CSS also. I have style-ie.css files. Enough said. With Flex those issues disappear because no matter what browser you use it is Flash (as long as you can live with the 'it is Flash' part).

Open Source - Flex 3 is open source. All of it. Adobe is moving in a good direction to make Flex as viable as it can be and as attractive to developers as they can.

So these are my current reasons for digging deeper into Flex. What I plan to do next is try and come up with a list of reasons not to use Flex. Reasons other than not being the right tool for a specific task. I still believe strongly in choosing the right tool. To choose the right tool you need as much information as possible. The only way for me is to write code so that is what I need to do.

I am still looking for the defacto place to ask specific Flex questions. I've been looking over the official Adobe Flex forums as well as the Yahoo Flex+Java UG. I'm not sure where the real experts hang out. I know for Java it's JavaRanch. Maybe JavaRanch needs a Flex department.



Re: Some Reasons Flex Looks Appealing

Although I agree with your take that Flex had a lot of attractive benefits, especially for Java folks, there is still something about Flash based solutions that seems well, "just wrong" to me.

I will admit that I have engaged in "Flash bashing" in the past which I have eased up on most recently (and not just because Flex and OpenLaszlo are so Java friendly).

My easing has in no small part come from the fact that my negative attitude toward Flash isn't about Flash at all.

Flash is a product of: "necessity is the mother of invention". Flash was at least partially a response to the inherent limitations of the collective 'standard' <cough> internet technologies.

It's not just the browser wars that made style-ie.css and ie-hack.js common place, it the fact that we *RUN* to the JQuery and YUI type libraries for what I would call "standard interface functionality".

In the name of good software design, shouldn't the interface goodiness provided by JQuery UI, YUI and other interface libraries be included or at least enabled by the HTML DOM/CSS spec? Isn't that what solid software design principles would suggest? Keep like functionality where it belongs?

I'm not even talking about supplying the <grid> or <tabview> or <acordian> elements... how about <combobox>? Why do I need a 3rd party 'control' or worse, roll my own combobox? That guys been around forever... why can't the HTML spec just provide it? When's the last time the HTML spec was expanded to include really useful features?

The HTML DOM is archaic and completely incomplete for today's web, shoot they could at least create an extention point to the DOM where you could roll your own UI libraries built in the 'native language' instead of Javascript having to re-invent the wheel all the time.

This is a huge part of why today's webapps are "mash-ups" of various technologies and languages that can be nightmarishly fragile and hard to maintain.

Obviously, this is a whole other can-of-worms.

So...all that to say, given that the challenges that 'standardized' web technologies face, there will continue to be new 'work-arounds' that must be included in the web developers 'bag-o-tricks. I have jumped off the bandwagon of DHTML/Ajax zealots with both feet. Sometimes you just can't argue with strait face anymore.

So, having said that, FLEX is a VERY slick and viable alternative to the challenges RIA developers face, even though in the end it is just a colossal 'hack'.

Re: Some Reasons Flex Looks Appealing

Logan, I agree. And while giving HTML more bang is an excellent idea, I just don't see it ever happening. I think where we are heading is technology like AIR and the browser as we know it along with HTML will just go away.

I know less about AIR than I do about Flex. So I only used it has an example, not an endorsement. We started out with thick disconnected clients. We moved to thin web/browser based clients. Now we are moving towards thin "rich" clients. History repeating itself? Maybe. Hopefully we've learned from our historical mistakes and things get better.

Maybe I'm just burned out

Re: Some Reasons Flex Looks Appealing

Hi Gregg,

Great post! I'm looking forward to your next one so we can compare our lists of the reasons not to use Flex. (I certainly don't think Flex is a silver bullet!)

BTW: A lot of the Flex engineers hang out on the flexcoders Yahoo Group. But it's pretty high traffic.

-James

Re: Some Reasons Flex Looks Appealing

Thanks James. I've already started formulating a small list of obvious reasons but I need to wait until I run into actual "gotchas" while developing.

Re: Some Reasons Flex Looks Appealing

SEGUE, holy poop: Segways are the machines designed to launch people into concrete.
I don't have to give up Java
You don't for other solutions, either; most client-side frameworks can consume XML, JSON, and so on.

Be very wary of treating Java and AS3 as similar langauges: AS3 is obviously much, much more like JavaScript than like Java, and should be programmed with JavaScript-y paradigms.
Browser/CSS issues
Use a good reset stylesheet.
Logan said: shouldn't the interface goodiness provided by JQuery UI, YUI and other interface libraries be included or at least enabled by the HTML DOM/CSS spec? Isn't that what solid software design principles would suggest? Keep like functionality where it belongs?
Not really. they're libraries that build on the DOM; there's no reason to turn it into a specification, and doing so would lock us in to whatever gets put into the spec.

And obviously the functionality provided by third-party client-side libraries *is* enabled by DOM, CSS, and JavaScript, or they wouldn't work.

Re: Some Reasons Flex Looks Appealing

@Caligula: Thanks for the spelling correction. I've edited my post.

Flex is not THAT appealing

Flex is a great tool, but it still needs lot of work. One big limitation we found is the lack of any serious HTML viewing/editing capabilities, the rich text editor that comes with Flex only supports a few HTML tags and it crashes if you try to embed more than 3 images so you have to end up using horrible hacks such as putting HTML IFRAMEs over the Flex app.

Flex is not THAT appealing

Ok, so Flex has a hard time with HTML. Is that something that Flex apps need to do often? My assumption was that with Flex applications, HTML wasn't really needed. But I don't know because I am no expert. I'll keep this in mind moving forward.

Re: Some Reasons Flex Looks Appealing

Hey Gregg, I don't know anything about Flex but do you mean that we can build a front end Flex application that talks to server side Java code (Servlet, JSP and whatever)? What is your favourite list for Flex & ActionScript? Thanks.

Add a comment Send a TrackBack