Thursday, February 28, 2008

Flex Architecture

This morning was a long day of traveling. Ikram's bike was broken, so he couldn't catch up with my train at 8.17. Unfortunately, something was wrong in my train.. it stopped several times and ran very very slowly. I really got a good extended-sleep there hehehe :p
After about 1 hour in the train (30 minutes late), finally I arrived at Den Bosch Station... and of course my bus wasn't there... got to wait 20 minutes for that and ..... finally i'm here at the office at 10.15... !!!!! -_-!
while ikram probably is on his way coming here....

Okayy... anyway back to the PRIMA project....
Recently, we were busy with the architecture and implementing the architecture. There was not much picture that we could find to describe the architecture of Flex. So we just made up some pictures by ourselves and discussed it with our colleague, Michel. He helped us a lot defining the architecture using the terms layers and tiers.

Here's how he defined it:
- layers are a logical separation of code. For example the MVC pattern for presentation: you separate model, view and controller programmatically, but they all exist within the same (presentation) tier.
- tiers are a physical separation of application functionality. Most common tiers (from front-to-back) are: Client tier, Presentation/Web tier, Business tier, Integration tier and Resource tier.


For the presentation layer (Flex application), we use the MVCs pattern. There are two good guides from Adobe about implementing MVC in Flex: An Architectural Blueprint for Flex Applications and Architecting Flex Applications. And there's also the source code that can be downloaded: Phone Sample

Yesterday, we started to apply the MVCs pattern into our project. We were still in the progress of understanding how the model class (ActionScript class and ColdFusionComponent-CFC) and the view class (MXML file) relate to each other. We are not sure whether we need to have the AS class for the CFC mapping or not. Our AS class consists of the CFC mapping and that's all. What we understand is that using AS object we could easily modify the data without going through the SQL database. In the case of our project, it's about presenting data and not adding/modifying data, therefore probably we don't need the AS class at all. However we need to investigate more about the possibility of using only CFC as the Model class.

Anyway... we just found out that the Flex 3 was officially released last Monday with the price of €593.81 for the full version of Flex Builder 3 Professional.

I think I need to go back to my Flex Builder .... and ikram is here already... and maybe he wants to add something later....

we'll keep you update!

No comments: