I am Siva, a passionate java developer, open source enthusiast, blogger. I like to cover Java, Struts, Spring, Hibernate, Ajax Tutorials, How-To's and Best Practices. Sivaprasadreddy is a DZone MVB and is not an employee of DZone and has posted 35 posts at DZone. You can read more from them at their website. View Full User Profile

Criteria for Javascript frameworks comparision

01.11.2011
| 7491 views |
  • submit to reddit

Nowadays using Ajax for a web application becomes a default choice. The real challenge is choosing the right Javascript library for the application.
Today we have plenty of Javascript frameworks which are greately reducing the development time for front-end development.

Here I am coming up with the comparision criteria for evaluating the frameworks.

1. DOM navigation/manipulation
2. Basic UI components support
3. Advanced UI widget library
4. Themes and skinning support
5. Validations support
6. Ease of server interaction
7. Multiple data exchange formats support


1. DOM navigation/manipulation:
    DOM navigation/manipulation is the core feature needed while building an ajax based rich application.
    
2. Basic UI components support:
    Any Javascript framework user expects the following UI components support that are necessary to develop even a simple ajaxified web app.
    Form Controls such as TextBox, Radio buttons, Checkboxes, Dropdowns, Calendars, Date Time pickers, Color Picker etc.
    
3. Advanced UI widget library:
    Now a days any Ajaxified web application needs the following advanced UI widget to develop RichUI.
        a) Grid/DataTable with pagination, sorting and filtering.
        b) AutoComplete
        c) Tab/Tree View
        d) Layout managers
        e) Popup dialogues

        
4. Themes and skinning support:
    Javascript tool kit should support theme or skin changes with minimal changes.
    
5. Validations support:
    The web application which is presenting the dynamic content and taking the user input will definitely need several kinds of validation support.
    Required, Email, Numeric, Regex validations are bare minimum validations needed.

6. Ease of server interaction:
    Server interaction is a must feature for an ajax library. The ajax library should provide easy to use ways of getting the data from server and posting the content onto the server. Also it should support binding the result got from server to UI widgets.
    
7. Multiple data exchange formats support:
    XML is the default data exchange format for Ajax. But recently JSON is being preferred than XML. So at a minimum it should support both XML and JSON.

 Guys,

Please share me your thoughts on this.

 

 

0
Your rating: None
Published at DZone with permission of Sivaprasadreddy Katamreddy, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Gesiel Moura Mota replied on Tue, 2011/01/11 - 12:57pm

qooxdoo

Andy Leung replied on Tue, 2011/01/11 - 3:24pm

I am so sorry to say it but your first "3 words" caught my attention: Now a days is actually 1 word. No offense but please correct it. :)

By the way, it's not Ajax Framework; it's Javascript Framework. Because Ajax is a mechanism, and you could use these framework without using Ajax functionalities including rendering 2D animations without retrieving information asynchronously from server-side. So your title and intention may be misleading to the readers.

Silvio Bierman replied on Tue, 2011/01/11 - 4:02pm

You seem to equate Ajax to JavaScript programming.

IMHO the most important attribute of an Ajax framework is whether it is client-centric or server-centric. Only after you have decided which type you need will details like the ones you mention come into play.

For those who don't know: server-centric Ajax frameworks usually present some server-side GUI API (a la Swing) to the application programmer who therefore is (almost) completely shielded from JavaScript and HTML.

Sivaprasadreddy... replied on Tue, 2011/01/11 - 8:01pm in response to: Andy Leung

@Andy

Corrected the title and 'first 3 words' :-)

Sivaprasadreddy... replied on Tue, 2011/01/11 - 8:44pm in response to: Silvio Bierman

@Silvio,

Yes, You are correct.

Once the approach whether to use client or server centric approach is decided we need to decide the evaluation criteria.

If we want to go with the server-centric ajax frameworks we can take DWR, GWT, Wicket, JSF and FacesFamily(RichFaces, PrimeFaces, ICEFaces etc..) and can come up with a different evaluation criteria.

But in this post i took the client-centric javascript frameworks and prepared the criteria. And obviously for server-centric ajax frameworks comparision the criteria will be totally different.

Jose Maria Arranz replied on Wed, 2011/01/12 - 8:01am

@Sivaprasadreddy "But in this post i took the client-centric javascript frameworks and prepared the criteria. And obviously for server-centric ajax frameworks comparision the criteria will be totally different."

Different? Really?

Take a look.

 

Sivaprasadreddy... replied on Wed, 2011/01/12 - 11:54pm in response to: Jose Maria Arranz

Hi Jose Maria,

I just had a look at ItsNat. My first impression is by using ItsNat whatever we are writing in javascript we will write it in Java.

some random code snippets of ItsNat:


HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
Element noteElem = doc.createElement("p");
noteElem.appendChild(doc.createTextNode("Clicked " + ((Element)currTarget).getAttribute("id")));
doc.getBody().appendChild(noteElem);



elem.setAttribute("style","color:red;");
Text text = (Text)elem.getFirstChild();
text.setData("Click Me!");
((EventTarget)elem).addEventListener("click",this,false);

But I agree with your point that if we use ItsNat the evaluation criteria wont change as it looks like Java version of JavaScript :-)

Ankur Gupta replied on Thu, 2011/01/13 - 1:01am

In my opinion certain requirements from a server side Javascript Frameworks would still remain the same like

1. Availability of widgets library

2. Being able to customize CSS for client presentation of the widget.

3. Data Exchange formats

4. Validations support, etc

 Although few key requirements of a server side framework, I would like are

1. Interfaces availability to generate / code custom widgets as needed.

2. Ease to write test cases to allow robust re-use of these widgets.

3. Extension support for customizing existing support for validations, new attributes (making them optional or mandatory), etc

Jose Maria Arranz replied on Thu, 2011/01/13 - 2:26am

@Sivaprasadreddy "But I agree with your point that if we use ItsNat the evaluation criteria wont change as it looks like Java version of JavaScript :-)"

You are right.

For instance, in this example just copied the JavaScript DOM code, converted to Java W3C DOM code (just adding types, gets and sets), removed browser sniffing (ItsNat does it for you behind the scenes, just W3C DOM) and all is done!

The line between client and server is becoming more and more blur.

One important difference is as visual management and data are together there is no need of client/server bridges to transport data, just inject your data into the DOM nodes in server and the client is updated automatically.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.