Competition Begins

In this post, I am just comparingMicrosoft Silver light API vs Javascript API vs Flex API.

Silver Light API :

Microsoft released Silver light 2 recently. The new API has features like .NET framework support, rich controls like Datagrid, List Box, Scroll viewer, Slider and calendar controls. Deep zoom: This enables unparalleled interactivity and navigation of ultrahigh resolution imagery.

We have already seen some of these new features used. Richie Carmichael developed a nice Microsoft Silverlight Map Viewer For ArcGIS Server 9.3. Microsoft Silverlight 2 will be available for download from http://www.microsoft.com/silverlight and if you have already been using Silverlight you will automatically updated.

Richie has a full write up about this new map control. You can find his write up here.   Albert Pascaul has  written about Using the ESRI Javascrip API as the silver light control SDK .

Another  Silver light impressions is registered here.

Doron’s has given his first impression about javascript API

ESRI resources on Silver Light API is here

Javascript API and Flex API:

There were lot of heated discussions going on blog space about JS API and Flex API.  James in his post provides wonderful insight Flex vs JS API and also comparison about Web ADF vs Javascript API is also quite useful.

“I developed a larger application with the Javascript API and then switched to flex. I am uniquely-positioned to give advice on the differences – Jeremy Bixby has given out the differences- Source : ESRI Forum

1) The javascript api implements an open-source framework, called “dojo” or “the dojo toolkit.” Flex is the framework for the esri flex api. So while javascript is the language that implements the dojo toolkit, actionscript is the language that implements the flex framework. Syntactically speaking, they are both quite similar. For example, in dojo there is the dojo.forEach loop, whereas using Adobe’s flex builder you can simply write “for each(var graphic in arrayOfGraphics){}”.

2) One major difference here is that you have to make reference to the dojo.for Each class in the header script for your application. With flex you can simply write the for each loop and not have to write any includes statement; the code that allows you to write the for each loop is in the flex library that you include in your flex project. Similarly, you have to find and include references for each component in the framework that you would like to use.

3) Developmentally speaking, Flex is hands down the winner (when developing with Adobe’s Flex Builder or Flex Builder Pro. Note that you don’t have to use the adobe developmental products, but it makes development fun!). Flex Builder has integrated support for CSS, component drag-and-drop, code collapse, auto completion, top-notch debugging tools and a profiling tool that allows you to gauge the performance of your application, capture data snapshots and identify areas where you can implement code and memory saving techniques to limit the number of object instantiations.

4) The dojo toolkit is poorly-documented. Half the time the web site with the api listed on it doesn’t even work. The flex framework is open-source, but it is privately-maintained by the Adobe company. If you are building applications that will replace an old IMS application or something like that, I have greater trust that a the flex framework will be better supported and be better integrated into whatever comes after flex then whatever the open-source equivalent is. Plus, the flex language reference, flex api and example snippets are all VERY instructive. Even the people who wrote dojo acknowledge that it is a work in progress, and the api has changed many times in the past year or so.

I guess the big difference here, for me, is the fact that the flex framework was developed privately and then released to be open-source. Dojo is intrinsically trying to develop from an open-source perspective. The result is a mess!

5) Object orientation of your code is easier with flex. If your application is a larger application and you need to encapsulate functionality in a series of objects, flex is the way you should go. To be sure, the dojo toolkit offers you the ability to develop an object-oriented application, but the management of the objects in flex builder as well as the testing and debugging functionality make life a lot easier. Unit testing is much easier with the flex unit testing framework (from adobe), then whatever dojo has going on.

6) The flex api from ESRI is more, well, flexible then the javascript api. Styling components is easier, and more likely to work correctly with any given flex component above and beyond esri components, and it is easier to trace inheritance in flex. Components are more likely to work together then they are in dojo.

7) There are also financial considerations here: to use the javascript api and dojo all you need is a text editor. Flex Builder Pro will run you $700ish. Even VS 2005 cost some X$.

8) Flex allows you to embed javascript in your flex, so that you can call javascript functions from your flex code! How is that for open-endedness and flexibility?”

I guess my bottom-line opinion is this: If you need to develop a large application that relies on complex algorithms, object orientation, or many different components, I would use flex. If you are looking to just throw a couple of maps on the internet with zoom in and zoom out, Javascript is probably the way for you to go. The javascript API does not expose as much as the REST API and Flex .

But finally one big reason to go off  the Web ADF. It uses the post back model and doesn’t work on ASP.NET MVC. Callbacks is eliminated when we use JS API and provides easy mechanism for the developer.

Most of the GIS professionals/projects developed /started using Javascript API as it straight forward approach and provides smooth transition from WEB ADF background.  Hence it would be difficult to judge or decide between these three at this moment, every API has its own features . The decision of selecting one depend on the bussiness requirement and other factors like developers skill set etc. I have added a opinion poll to caste your vote.

Cast your vote now ; and your answers will certainly matters a lot.

Advertisements

Tags: ,

3 Responses to “Competition Begins”

  1. Satheesh Says:

    Hy that is in details but frame works like prototype really cool and cross browser. I keep switching between Flex and JS frame works. Though the later is a lil quirky, there is fun and freedom. Still, flex is amazingly good tool if we want an application feel and all the stuff you mentioned but JS/CSS/HTML/JSON makes me feel like host a news paper or magazine with interactivity. Freedom, freedom, freedom…………

  2. iamlaksh1 Says:

    Hi Satheesh,

    Thanks for visiting my blog and giving your comments. Yes, I do agree with you. Flex API is cool and provides rich UI and easy to develop. As you said, I also enjoy the same freedom and make life easy for developers. Those who are coming from Web ADF flex is a demi-god.

  3. dh42891 Says:

    This is the write-up I was looking for! Well done and as concise as it could be. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: