Sunday, August 26, 2007

The Bold New World of Flex


Introduction

We all have viewed flash applications at one time or the other in our life on the web inform of e-cards, ads, games etc . It is a very different from the boring static html pages we normally view. Over the years Macromedia has created a revolution in the web world by developing a very strong platform for developing web graphics on the Internet. Now there is a new revolution taking place.
Macromedia, which is now owned by Adobe, has created a new technology for the developing web sites which is based on the existing flash platform, known as Flex.


One Night Stand!

Over the years I have tried and tested many technologies, both web and standalone. Ive dwelled into .NET (VB.NET, C#, ASP), Java (JSP, Servlets, J2ME), python, Ruby/Rails, Groovy, PHP, C, C++, perl etc. To be honest my skill level is not the same in all languages but I do know the pros and cons of each technology I use and believe you me, some of these technologies are just over hyped and once you hook on to any of these, they just suck you deeper and deeper into their vortex and by the time you realize that it was a mistake you are 60 and on the verge of retirement. My latest fascination was Ruby/Rails which I invested a lot of time and money(for books).

Couple of months back I had to develop two rich client web application, a web service for myself, say A and another for a Brokerage and Investement Firm, say B. Both application were entirely different wrt their demands. The former required a simple UI for the user. When I mean simplicity it means getting the maximum relevant information for the user with minimum number of clicks. The second application required a very complex UI but within a level of user friendliness. A has small volumes of data but large number of users. B has large volumes of data but small number of users. A was hosted on the Internet. B was restricted to an office My first choice was rails. It was easy, fast to develop application, and very powerful in terms of features. But it failed in performance and support. That was unacceptable for both applications.

I dove into AJAX. After an exhaustive study i selected Google Windows Toolkit or GWT. It was an obvious choice for me because the programming language was JAVA, but my curiosity did not stop me from exploring other technologies. So GWT was my client site technology and PHP was my server side technology. Although development was smooth, I had problems with interfacing PHP and GWT. Adding to my woes, the time it look to load the page would put most people to sleep. GWT was out along with the number of hours I spent on it. I hate to admit it, but I felt google did not release the optimized version of the GWT compiler. It was not even close to optimised


Flex, will you marry me?

During my research, I had accidentally come across Flex in one of my Developers IQ magazine CD. I had to reject it due to RAM constraints. It requires 512MB and I had just half that. Later I decided to back to it and I was glad. My prior knowledge in XML and JavaScript helped me pick up the MXML-ActionScript Syntax quite easily. But it took time to learn the internal working of the platform. I fell in love with it instantly.

I did not use Flex for project A. First, it required Flash 9 which were few people use. Second, it cannot be parsed by search-engines. Third, we felt that the UI would be too advanced and complicated to use for novice web users. We stuck to plain old but nevertheless effective HTML and JavaScript. We used flex to implement the Administrator UI and functions.

Project B just couldn't do without Flex type UI. Although my client cant tell the difference between a rich client web application and plain text even if it hit them in the head, I had to do my part to make their life easy, at least as easy as much as they can pay for it.

The server-side technology is PHP /MySQL and communication takes place using AMFPHP2, a RPC Service implemented in PHP. I use Flex Builder as the development environment.

Now my life cool, my work is easy and my client is happy. Well what else would I want? I don't know but Adobe thinks it does. It has released Flex 3 beta with new features. I am eagerly awaiting the final release. And for all you source fans there is an Open Source version on the way.

So what are you waiting for? Put on your swimming suits and dive into the world of flex.



No comments: