Wednesday, February 27, 2008

RIA Technology crown




The race for the crown for the RIA Technology reader has been on for a long time now.And so far there is no clear winner. But clearly there are distinct players that have emerged out of all that dust and smoke. AJAX and Flex. (I'm sure there will be a lot of people who argues the presence of Microsoft products in here..but I feel its a completely different war...which was correctly depicted in the picture http://mshiltonj.com/software_wars/current/current.png (But its kind of old..needs to be updated with more products and companies trying a dig at Microsoft :-) )

AJAX Vs FLEX

Well now this is tough..I have been reading a lot on these and geting my hands dirty with some of these too. AJAX as such is a huge Gang bang which is represented by a good number of independent Frameworks, JavaScript libraries and individual implementations. On the other hand you have Flex(I read it some where...The first child of Flash)from the heavy weight "Adobe" (who incidentally are the current owners of "Macromedia", who coined the term "Rich Internet application".). So lets do one thing..The old way..the best way..take it point by point

1)User Experience
Flex - Having Flash as its paternal hereditory helps. It has a lot more tool support, graphs and charts and being one of the pioneers in video streaming , takes the lead in there too.

AJAX - No doubt there are amazing applications(even at enterprise scale)that have been built using AJAX that will mesmerize you.(Take some of the Google apps as example)But nothing comes for free...there would be good amount of work by sheer talents and geniuses that has made it possible. And no AJAX frameworks/libraries helps you do this straightforward. Be ready to sweat it out to be there.

2) Developement (Ease of developement and Time taken ...which are actually propotional)
Flex - Flex has its own IDE...Flex builder (built over Eclipse) which has a design view with drag and drop features...But wait its not free..Be ready to shell out some dollars to get it.(There goes the point from Flex). And being run by Flash player you don't have to worry about Application looking like Empire State building in one browser and as Bombay Stock Exchange building in another.

AJAX - Some frameworks has IDE's (and yes most of them are paid one's and those which are not are not exactly that great). But again most AJAX programmers doesn't expect the help from an IDE...They tend to like it the hard way..the best way. But again writing same Javascripts and DHTML's that work in all browsers is more propable than Microsoft using Java for his next OS. There are some AJAX F/w's and JS libraries taht will help you overcome this...but you know its going to break somewhere.

3) Performance
Flex - If you don't consider the download of Flash player plugin for the browser(one time..and something that 92% of browsers in the world already seems to have installed...as per Adobe..)there still is a minimum download size of 128 kb for Flex apps. Adobe is going to intoduce caching a good portion of this on the clientside for the next version..which should straight away boost the initial download time. The apps are compressed and sent to the client and the painting is done by the Flash Player, which Adobe continuously optimizes for performance.

AJAX - No extra download in this case other than the actual application contents (I'm not too sure about this..there could be some F/w which has a initial dependency download). And the painting is something entirely dependent on the browser(On which you have no control on but something that seems to be getting better and better..Thanks to the sudden surge of Firefox, which literally made Microsoft come up with IE7). Also there are existing components like GZip which helps in compressing JS libraries.

4) Extensibility (Ease of Customization)
Flex - Well the Flex SDK has been open sourced (which was a success and something that prompted Adobe to come out with "Apollo" or should I call it "AIR" ??) which means you can customize whatever you want and come up with controls of your own. But again its not exactly a walk in the park.

AJAX - Well being HTML, XML and javascript, customization wouldn't be a problem(Again there could be some F/w's where something specific is written which means bye bye customization)

5) Security
Flex - Swf files are not exactly plain texts...so reading them at the client level is not an easy task. Also the Flash player seems to be having a lot of inbuilt security enhancement features.

AJAX - Being plain text it’s easier to read. Plug-in from Firefox like Firebug, although helps in debugging, also allows the complete manipulation of the HTML DOM. (I know a friend who has used firebug to rig a website by increasing the vote for an article..there by making it the best article)

6)Server Communication
Flex - Flex helps in communication via HTTP ,SOAP for webservices and Remoting using a concept called RemoteObjects which uses Flex Data Services. Connection through RemoteObjects tend to be fast and easily configurable, but then you will have to pay for Flex Data services

AJAX - Ajax uses the web browser’s underlying communication mechanism. Several F/w's support several protocolas and ways of communication, although it tends to vary in different F/w's. SOAP, JSON and even remoting is allowed(Eg; DWR, GWT).

We can go on adding more points like widget support, Industrial Standards, Developer Community etc. and taking the high's and low's of these two technologies. Arguments like dependency of Flash Player for Flex(which has a 92% adoption rate) gets nullified with the fact that AJAX applications will not work without javascript enabled in the browsers(which almost 96% of browsers have turned on...data courtsey w3schools). So each and every pros and cons even out somewhere. Infact majority of the articles that I have gone through (including the one's from Adobe) says that its always better to use both the technologies in tandem...you know something like get the best of both worlds. And they seem to coexist very peacefully. There are tools like Flex Ajax Bridge and Ajax Data Services which helps you in this. But in the end you need a leader..A market leader where you can Say RIA means this Technology. But for the foreseeable future nobody will be ready to put their money on any particular technology. But hey whats fun without some risk...So who's your money on?

No comments: