Five AJAX Frameworks Reviewed 187
prostoalex writes "Dr. Dobb's Journal reviews 5 AJAX frameworks: Dojo 0.3.1, Prototype and Scriptaculous 1.4, Direct Web Reporting 1.0, Yahoo! User Interface Library 0.11.1 and Google Web Toolkit 1.0. Each framework was tested in two basic scenarios — writing a 'hub' (titled collapsible link list frequently seen on sidebars of many Web sites) and a 'tab panel' (horizontal tabbed navigation bar). During the process, Dr. Dobb's Journal reviewers noted that 'Dojo provides more features and HTML widgets than YUI and Prototype' but eventually 'settled on the Yahoo! User Interface Library.'"
Security not a consideration? (Score:5, Interesting)
I'm a bit disappointed.
As a .NET developer (Score:3, Interesting)
MS's toolkit has been great - FF & Safari support is a breeze in most instances, allowing us to develop our applications really quickly
Having downloaded and hacking a few quick demos with the silverlight BETA API, I am looking forward to integrating the CLR in our future releases
Just don't choose them all! (Score:2, Interesting)
The site would download quickly enough, but then the page would just sit blank and churn for about 30 seconds before displaying anything.
It was hideous, and it was never getting closer to completion, so we replaced their 108 man-months worth of Ajax coding with 2 man-months worth of Flash development and everyone was much much happier. (It loads in less than 1 second and the management thinks it's cool.)
Re:Frameworks (Score:1, Interesting)
Anyway, there's tons of crap you'll never need in it -- so rip out what you do! It also has the ability to do basic animation, opacity toggling and dissolving, etc. Of course it adds to the bloat, but it's intended for you to pluck out what you need and can the rest...
To do the toggling you speak of (even when styles are defined in a style sheet / style tag / whatever):
function iwfShow(id, reserveSpace, displayMode){
var el = iwfGetById(id);
if (!el) { return false; }
if (reserveSpace){
var disp = 'visible';
if (iwfExists(displayMode) && displayMode != null){
disp = displayMode;
}
iwfStyle(el, 'visibility', disp);
} else {
var disp = 'block';
if (iwfExists(displayMode) && displayMode != null){
disp = displayMode;
}
iwfStyle(el, 'display', disp);
}
}
function iwfHide(id, reserveSpace){
var el = iwfGetById(id);
if (reserveSpace){
iwfStyle(el, 'visibility', 'hidden');
} else {
iwfStyle(el, 'display', 'none');
}
}
function iwfStyle(id, styleName, newVal){
var el = iwfGetById(id);
if (!el) { return false; }
var ret = '';
if (el.currentStyle) {
ret = el.currentStyle[styleName];
} else {
try {
ret = document.defaultView.getComputedStyle(el,null).get PropertyValue(styleName);
} catch(e) {
}
}
if (iwfExists(newVal)){
if (el.runtimeStyle){
el.runtimeStyle[styleName] = newVal;
ret = newVal;
} else {
ret = el.style[styleName] = newVal;
}
}
return ret;
}
function iwfExists(){
for(var i=0;iarguments.length;i++){
if(typeof(arguments[i])=='undefined') { return false; }
}
Use frameworks only when really need them (Score:3, Interesting)
As the article (I RTFAd) states there are many cons and pros using these various frameworks. The main cons were:
1. Not supporting the development model chosen for the project.
2. Not providing enough documentation with the framework.
3. Not providing enough widgets (many widgets still have to be custom made even with the frameworks.)
4. The framework is too large and impacts performance.
5. The resulting code is difficult to maintain.
The pros were:
1. Not having to write the AJAX code by hand.
2. Not having to write some widgets by hand.
I would say there for those cases when it is absolutely decided to go with a framework, do mix and matching. Use the simplest AJAX framework and mix and match it with widget libraries, but not entire libraries, extract what is absolutely necessary, in all cases custom code will have to be created by hand.
Comment removed (Score:5, Interesting)
Re:Frameworks (Score:3, Interesting)