What is the best AJAX library or toolkit? Can you compare SmartGWT to GWT, YUI, JQuery, MooTools, etc.
Also, how would you compare these technologies to JavaFX, and what is your future belief of JavaFX vs. AJAX vs. Flash or Flex?
1. JQuery
2. Prototype
3. Scriptalicious
4. Moo Tools
5. Highslide
6. Backbase
7. Wavemaker
8. GWT
9. YUI
10. AJAXRain
11. SmartGWT
12. DojoCampus
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$6 Answers
http://extjs.com/
Here's an framework comparison: http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
but I will go in detail about some of the basic differences of the most popular ones.
They are usually called javascript frameworks, and since they are all "interfaces" for javascript, the best one is the most easy to work with. They basically expand the functionality of the DOM by providing functions that find and manipulate the elements easier.
http://www.prototypejs.org/
Prototype was one of the first to change document.getElementById with the $ sign.
var variable = document.getElementById("mahalo");
becomes
var variable = $("mahalo");
If you want to get elements by class in prototype, you use getElementsByClassName.
var articles = document.getElementsByClassName("article");
It has additional functions for class manipulation, like .hasClassName, .addClassName, .removeClassName.
Prototype is OK, but it's not the best framework, it just expands the way in which you deal with javascript.
http://dojotoolkit.org/
Dojo has it's own shortcuts, but doesn't expand upon the DOM's native functionality.
For an id, you would have to write:
var variable = Dojo.byId("mahalo");
For a class, you would use:
var articles = dojo.html.getElementsByClass("article");
Again, just like Prototype, it's just another way of working with javascript, but doesn't radically change the way in which you write your code.
http://jquery.com/
jQuery has a different approach, it allows you to find groups of elements using CSS selectors and xpath.
In jQuery, you still use the $ sign, but it is much more powerful.
If you want to get an element by ID, you have to type:
var mahalobox = $("#mahalobox");
The # sign is css's way to indicate an ID, and it's the equivalent of typing .getElementById.
To get a group of elements by tag name, you would just write:
var dividers = $("div");
Normally, you would use .getElementsByTagName for that.
In comparison to prototype, if you want to get a group of elements by class, you would use:
var articles = $(".article");
You can basically use all CSS selectors as "javascript selectors", descending selectors, parent > child relationships and all of that.
The best thing is that you can even use unsupported CSS selectors, like those from CSS1, CSS2, and even CSS3 and xpath.
jQuery is the undisputed winner by far, being used by google, dell, digg, nbc, cbs, netflix, technorati, mozilla, wordpress, drupal... and even by Mahalo Answers if you check it out.
http://i40.tinypic.com/1zegu48.jpg
You can begin your journey by watching the “jQuery for Absolute Beginners” Video Series.
http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$What do you want from it?
-A core library
-Widgets/ Plug and Play
-Effects
-Size
-Speed
-How it effects the Object Model
-Ease of Use
-***Documentation - some libraries flat out suck
-Books/Resources available
-Free vs Pay [pay is not always better]
What style of coding do you like to do?
Some mimic other languages while others do not. Do you know JavaScript? Do you want some other language to generate the code.
There is going to be basically no one that will be able to tell you about every library out there. There are a lot of others out there that you do not even include.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$I think that AJAX will continue to be a popular choice in the future for many web applications. For some kinds of applications Flash AS3 or Flex might be a better choice than AJAX because Flash AS3 can perform better than Javascript (although many will point to significant improvements in JavaScript performance) and Flash 10 has 3D and P2P abilities, and Flex has a lot of traditional desktop business software-style functionality.
You will run into a lot of web developers that hate Flash/Flex for various reasons including stability and performance problems on Linux (although this is much less of an issue now in reality with new releases).
Also, as far as AJAX toolkits, although bugsy mentioned it already, take a look at ExtJS along with JQuery and the rest. I actually wrote a couple of web apps that use ExtJS _and_ jquery just because there happened to be something in jquery that I was familiar with and wanted to use for AJAX or something, and because jquery doesn't have anything like the GUI widgets and glossy windows that ExtJS has. Also, a disclaimer -- ExtJS can be a relatively heavy download the first time and has a particular appearance so its not necessarily going to be applicable to every type of web app.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$Another reason to avoid ExtJS: if you want people with screen readers to use your application, pick something else. Listen to the grid control in a screen reader, it will make your ears bleed. :) They said they are working on accessibility, but from a glance at the next version, it is not any better. YUI is making good strides with accessibility and their controls.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$The great thing about GWT is it's ability to create great web applications - I mean real web applications, because you're using Java to make them. On conversion the javascript looks *very* much like what you coded in Java, which is an accomplishment.
The only downside is that not all functions that are available in Java are available GWT(obviously), but this is hardly something to deter you from trying it out. My advice would be to try it using the new Google App Engine so you can build a nice working application without having to pay for hosting or anything.
Note: I've also used JQuery a lot, and I'd much, much, rather go with GWT if you're comfortable in Java. In fact, I'd probably rather write my own javascript than rely too much on JQuery.
Personal Experience (written some *huge* GWT applications, some for organizations)
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$AJAX is a small subset of the functionality of the aforementioned libraries. Many of these libraries started out as a concise/standard way to manipulate the DOM, and apply animations on a web page. All of these libraries support AJAX, which is the ability to send a post/get request to a web server without having to reload the page.
I've worked with jQuery, YUI!, Prototype, Scriptaculous, Moo Tools, and GWT. These are JavaScript libraries, they have about the same features, but they have slightly different focus.
jQuery is very concise, has a large number of plugins, and is one of the most popular JavaScript frameworks. jQuery has a fast and easy to use DOM selector. jQuery has a UI extension used to build dialogs, tags, and accordions.
YUI! has a large collection of web UI widgets which includes dialogs, tabs, calendars, and much more. What I liked about YUI! was that it had a easy to use HTML layout controls.
What I remember about Prototype, Scriptaculous, and Moo Tools is that they had a large number of animations, such as fade in/fade out, and toggle.
What is interesting about GWT is that you write in Java, and it compiles down to JavaScript. Writing your web application in GWT allows you to get static type checking because it is written in Java and the compiler will minimize and optimize the corresponding JavaScript code.
Ultimately, to answer your question, there is no one framework that is the best! It really depends what you are trying to achieve and the limitation on your project.
If you want to learn a JavaScript framework to animate HTML elemects on an AJAX event, I would recommend jQuery. jQuery is easy to get started, it has a ton of plugins, and it one of the most most commonly used frameworks.
If you want a rich library of widgets, such as tabs, accordions, calendars, dialogs, etc. I would recommend jQuery UI or YUI!
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$
How about SmartGWT, GWT, YUI, no mention on these? Any thoughts on JavaFX?
These are basically more complex (and more complicated) ways to achieve the same thing and even more limited (to AJAX), by compiling java code to serve javascript code for different browsers. In jQuery is very simple, you use .load() to load a page using AJAX and you use $.get() and $.post() to get and post data using AJAX. My guess is that it's counterproductive and you're shooting yourself in the foot when you could get away with something much simpler.
http://docs.jquery.com/Ajax