Recently I have been getting my hands dirty with Adobe Flex. Now, let me just state for the record that I have never been fond of creating frontends. I find the bulk of traditional web programming mind numbingly boring. It never posed me with enough interesting challenges and the code-deploy-test cycle is very counterproductive. Come to think of it, that may very well be the reason why I never liked to create frontends: the feedback cycle was too long. I am the kind of guy who wants to see how my site looks like again once I add a mere button to it.
This does not mean that frontend design does not hold my interest, though. I always try my best to create an attractive, user-friendly site for my customers. However, in most cases we have to hire a web designer for a graphical design. I guess that’s okay, but I always felt I lacked an important skill.
Ever since AJAX introduced itself I found myself increasingly more interested into frontends. For the first time you were able to create user interactivity in web applications rivaling that of desktop applications. Even though AJAX was (and still is) a very exciting technology I still did not like the programming model much. Applications often evolve into a big unmaintainable mess of Javascript code. Rightfully so, a lot of AJAX guru’s and books emphasize on the fact that Javascript requires just as much structure and discipline as an object oriented language, like Java. I can’t disagree with them, but you have to admit that it’s a lot easier to make a mess of Javascript code. Due to the amount of freedom Javascript gives you it inherently requires more discipline to handle. The other thing I found lacking was a good set of UI widgets. DOJO has perhaps the best set.
During the course of this year two AJAX-like technologies gained momentum: Google Web Toolkit and Adobe Flex (strictly speaking I would not categorize Flex as an AJAX-based technology, but for the sake of argument I will). I have been experimenting with both technologies; recently I’m using GWT in a project, but mostly I have been playing around with Flex in a pet project. I don’t feel comfortable comparing the two just yet, but I do know that I am very excited about Flex and it’s not in my personality to get excited quickly. I have read a lot on Flex and seen some presentations on it. One thing I quickly noticed is that Adobe really thought this technology through. They didn’t just jump on the bandwagon; no, they took their time, thought things through and created their own programming model focused on user interactivity.
Flex applications run on the Flash player, which ~98% of the internet users have installed. Its programming model is based on MXML and Actionscript 3.0. You can think of MXML as a declarative domain specific language focused on constructing UI’s. It is based on XML that eventually translates down to Actionscript 3.0. I find MXML to be an elegant way of creating UI’s. The code is compact, easy to read and expressive. Actionscript completes it nicely with a way to program any logic that needs to happen. Flex is actually a pretty substantial framework. Not only does it provide you with a lot of cool and useful widgets, it also provides you with the means to connect to a backend written in an entirely different language (e.g. Java) through Flex Data Services. Be it an HTTP service, a Web service or RPC calls. I probably should also mention Flex Builder. It is an IDE specifically targeted to writing Flex applications. Flex Builder is a great asset for building Flex applications as it is quite sophisticated. It provides auto-completion, code assistance and an extremely helpful visual editor. You can actually drag&drop your application together without making a mess of your code. I can go on and on about what Flex has to offer, but I think you get the picture.
I just started programming a real-world application with it and so far the experience has been a blast. I look forward to sharing more of my experiences on Flex in the future.
Recent Comments