Java to Flex

My clients were talking to me about Flex for 2 months, but one day they came back and announced that we need to move the project to Flex instead of traditional AJAX. And, it was time to get into a new technology.

Leading a team into architecture, when you are unsure of the architecture is a tough task and then when the technology is known to your clients adds to the equation, but little was I aware at that time that Flex would be a simple one to beat like a beginner level for Dungeon Siege, with someone who has the most advanced weapons in his toolkit.

I took off by reading on Flex SDK, Flex Architecture and Flex Builder (installed the trial version for 90 days). Knowing the Eclipse environment was an advantage and I did not have to learn the interface. Quickly I had setup a project and in next few minutes I had the traditional “Hello World” in place. Much like Visual Basic 6. This was cool stuff.

Now was the next challenge – ActionScript 3.0. They say that AS is bsaed on ECMAScript which also is a grandfather for JavaScript. Knowing Java, C# and JavaScript, how different can that be, but yes this time there were difference. AS was more close to Java with strongly typed objects. There is a class for everything and I was unaware of them, apart from what are native datatypes like String, int etc.

Next came Events – hmm. This made me to think for a while, something that all desktop based applications are based upon, yet it was evading me. And for goo reason, I was chose not to read through the Event model for Flex and that was my mistake (do not repeat that one). I started off by reading on the Live docs the Event Model for Flex and once that was understood it was simple one.

I knew the basics now, but this was not good enough to use in an Enterprise Application. Could I use all of this for my website – piece of cake, but that was not what I was trying to do. My clients had recommended the Cairngorm library – light-weight, quick start framework. It was said that this will solve all the problems. Before I started off with Cairngorm, it was time to put my Architect hat on and not listen to anyone. And i found out that Cairngorm had a competitor – PureMVC. So, these two have to be be on top of their game to be of any use – I started investigating, but very soon came to a conclusion that PureMVC would take more time to get going. So, Cairngorm was it; looking at the community backing and also that it comes frm Adobe decision seemed a good one.

Few weeks went well, and then we realized that Application was not looking as Crisp as it should be. If Flex builder was to be used to draw layouts quickly and that is what we were doing, what was wrong? There were fine prints missing and now came the Constraint based layouts. It was worth while looking at all different kinds of layouts and how can they work, before settling on Constraints based.

Where am I today – ready to start building training material for my team on all the items as listed down. I am hunting for some videos, so if you have some, please point them to me or else, I will end up creating a few.

One thought on “Java to Flex

%d bloggers like this: