Pros / Cons for JavaScript API?

4340
19
01-03-2013 04:15 AM
DanielK
New Contributor
I have searched for some sort of list with pros and cons for JavaScript API against the other API's but  haven't found any so can you with experience please help me with this?

What is good with JavaScript API?

What is not so good with JavaScript API?


Is all API's developed at the same time?
Does JavaScript API have the best performance?
Any limits on the JavaScript that other API's doesn't have?

Regards,
Daniel
0 Kudos
19 Replies
JeffPace
MVP Alum
Pros:
No PLUGIN required!
way of the web - Flash and Silverlight are dead
great community
robust API
great performance
Dojo over jQuery
Mobile support (flash dead on mobiles)

Cons:
Steeper learning curve due lack of "drag and drop" apps
Dojo over jQuery  (pro for me, con for many, but hey, just use both, they work great together)
0 Kudos
TracySchloss
Frequent Contributor
I started out as a FLEX developer and I still miss a lot of things about it.  Better options for developing the look and feel of the interface probably most of all.   I haven't heard anything lately about Silverlight, but it sounds like it's not got a long life to it either.  If I was starting from scratch, I would probably pick Javascript just because it's the most likely to be around for the long run.  I wouldn't completely discount Flash, though, if you were needing to develop a mobile app, as opposed to a mobile friendly web site.  These are written in Adobe Air, which doesn't run in the Flash player.
0 Kudos
JeffPace
MVP Alum
Fair enough. But in the common "one developer" shop, being able to develop a single platform that works for desktop, web, mobile, etc.. (no app stores, etc..) is a huge advantage.
0 Kudos
DeminHu
New Contributor
I  just start to learn Javascript API,  but I  will not change what I am doing for now. I may use Javascript API for very simple applications in my work.

I wonder how people feel about Javascript API for the enterprise applications :  service-orienteted, multiple-tire architecture, Model-view-view model design pattern etc. and how people sure html5 is really going to work on all browsers and when it could.

I really like to know GIS developer's experiences on these issues.
0 Kudos
JeffPace
MVP Alum
Our County is still standardized on IE7. Javascript API != HTML5

However, it can leverage it.

We use a single deployment of an enterprise application on Tomcat on an internal webserver.  That also runs java servlets and other applications. It connects directly to our SDE.

That application is accessed internally, and through a Web Application Firewall (tomcat running modproxy) for external; public and secure access.

The advantage of this architecture is we have a single app, single development environment, single webserver, etc..
(Downside is single point of failure, but redundancy/HA could be easily achieved if we had hardware funds). 

Choosing the Javascript API allowed us to not have to worry about platforms/plugins, etc.. And it integrates into our existing JAVA/Tomcat architecture seamlessly.

Plus, if we ever do go to IE9, all i have to do is change the DOCTYPE. I have in fact already done this using quirks mode in IE7 and it seems to be working great!

Long story short is the Javascript API requires the least setup for the end user.  Open browser app works. No plugin download, no patches/security concerns, and free development tools for me.  Win Win
0 Kudos
DanielK
New Contributor
Thank you for all replies!

Does anyone have experience from WPF API?

If we let put the obvious thing as development tools at the side, how does JavaScript work compare to WPF?

Regards,
Daniel
0 Kudos
JohnnyPenet
New Contributor
I  just start to learn Javascript API,  but I  will not change what I am doing for now. I may use Javascript API for very simple applications in my work.

I wonder how people feel about Javascript API for the enterprise applications :  service-orienteted, multiple-tire architecture, Model-view-view model design pattern etc. and how people sure html5 is really going to work on all browsers and when it could.

I really like to know GIS developer's experiences on these issues.


I started writing an ArcGis framework in Silverlight for a customer as a replacement of web ADF. I choose using Microsoft PRISM to support the MVVM pattern in writing Gis applications in Silvelright.
Later I used the patterns found in PRISM for converting the framework written in C# into a JavaScript framework for building GIS applications. To support MVVM I used the knockoutJS library which works pretty well with DOJO. A pattern like dependency injection and the use of containers can be more or less implemented using AMD.
I put the whole process of the Silverlight framework and the JavaScript framework on my blog http://jpenet.blogspot.com , it is not perfect and complete put could give you an idea how you can move from the ArcGis web ADF into an own library driven template of GIS applications. It also shows how you can easily integrate other API's as Google to GIS applications.
0 Kudos
DeminHu
New Contributor
Hi, Johnny

Thank you so much, your reply and your blog is really very valuable for me !

I am  going to spend my weekend on your blog about how you handle SOE and MVVM applications with Javascript APIs.
0 Kudos
HemingZhu
Occasional Contributor III
Thank you for all replies!

Does anyone have experience from WPF API?

If we let put the obvious thing as development tools at the side, how does JavaScript work compare to WPF?

Regards,
Daniel


Most of my recent GIS works are done using silverlight or WPF(silverlight is sub set of WPF for client-side). But since i have some intense work on JS API, I will give my personal opinions.
1. First of all: I like both of them! Then again because i have many years of both javascript and C#(C++ and Java) programming experience. So script language or OOP isn't really a big issue to me
2. Developing environment, time and performance: I prefer Silverlight/WPF. You have the best development IDE -visual studio with full blown debugger and rich test framework(unit test/UI test) for u to use (again not against Firebug at all). Personally I found lot easier and fast to write silverlight(C#). And last thing compiled code is still faster than the fastest JavaScript.
3. Cross platforms: I give Javascript a little edge not because the siliverlight plug-in but because Javascript can easily run on almost any systems and integrate into other language, let alone the hot mobile trend!!
4. Rich functionality vs Html5/Javascript: Because the Silverlight runtime is a samll version of .Net Framework. It has rich features that have no Html5/Javascript equivalent: deep networking support, file access, out-of browser apps, call windows system component, rich ways to connect back end database.. just name a few. The evolution of Javascript in recent years has added OO P features to it (dojo, jquery etc) but it hasn't reached the level the silverlight has.
5 Open resource vs industry standard. You could argue that Open resource like dojo or jquery is low cost. I personally think it is a double-edge sword. The lack of industry standard has add a lot of complexity to the development process.. Just compare the easiness of searching a dojo class library and a silerlight(.net class library). (html5 isn't quite here yet-let's wait)
6 easyness for the starter: definitely goes to the Javascript. Javascript is a good language for the beginner.

The above is my personal opinions on Javascript VS Silverlight. Not specific on JS API vs Silverlight/WPF API. Like I said I like both of them. ESRI did a fairly good job on developing those APIs.
0 Kudos