Tuesday, August 07, 2007

Flex

After a brief hiatus I'm back. I was busy relocating. Just a dump on what I understood about Flex so far.

JavaFX Script = ActionScript.
JavaFX Pad = Flex Builder, in the long run.
JRE = FlashPlayer.
MXML no real equivalent, but AjaxToolkits (Dojo, etc and jMaki are of help here).
Flex seems to be a clear leader, innovator in this space.

Presentation tier if it resides on client, what's the use of JSP/Servlet technology! A web app is just a packaging of Flex applications: a set of SWF files and HTMLs that refer them. A web server that dishes out such HTMLs and its embedded objects (SWF files) is just enough.

Looks like presentation with its dynamic aspect is back on the client box.
State management is back on the client box, i.e. state is maintained at client box, server gets back its scalability (to dish out data, or execute business logic, or any Web 3.0 functionality).
Business logic, if simple, can be part of client-side following MVCS (MVC with a communication service S to fetch data) pattern. If business logic is complex say transactional in nature, it can reside in a JEE server.

Flex application can use two free/open RPC services, HTTPService and WebService, to interact with remote servers (to fetch data, or perform a business logic step). By "free/open" I mean you don't need any special proprietary (or for pay) infrastructure on the server side. The third type of RPC service, using RemoteObjects, is available if you have Adobe provided Flex Data Service (FDS) server infrastructure that maps Action Message Format (ActionScript binary object marshalling format) message to instantiate Java objects on server side. FDS is not free; may have changed now. { TODO: Not sure if it allows instantiating .NET CLR compliant objects for M$ platform. }

Flex Builder is Eclipse plugin; to develop Flex application you need C++ based IDE, and at run-time it needs JRE! { TODO: Why it needs JRE at run-time? }

Just a side-note: FlashPlayer is about 1.5MB size, JRE is about 15MB in size. Probably it is good for Sun to break JRE as say full vs minimum (to compete with FlashPlayer considering JavaFX).