Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming The Internet IT Technology

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.'"
This discussion has been archived. No new comments can be posted.

Five AJAX Frameworks Reviewed

Comments Filter:
  • by Lux ( 49200 ) on Wednesday May 02, 2007 @05:12PM (#18963191)
    Curious. With javascript hijacking attacks just discovered a few weeks ago, security was not a consideration in the evaluation at all.

    I'm a bit disappointed.
  • As a .NET developer (Score:3, Interesting)

    by leather_helmet ( 887398 ) on Wednesday May 02, 2007 @05:21PM (#18963319)
    ASP.AJAX [asp.net]

    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

  • by ObligatoryUserName ( 126027 ) on Wednesday May 02, 2007 @05:28PM (#18963473) Journal
    Earlier this year I got pulled into a project that had been done by a team from everyone's favorite subcontinent. They had used both Yahoo and Scriptaculous /Prototype at the same time!

    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)

    by Anonymous Coward on Wednesday May 02, 2007 @05:39PM (#18963651)
    I created a fix for that gotcha in prototype, and the details are...involved. The framework is on sourceforge and it's called IWF (Interactive Website Framework) http://www.sourceforge.net/projects/iwf/ [sourceforge.net]

    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; }
    }
  • by roman_mir ( 125474 ) on Wednesday May 02, 2007 @05:45PM (#18963781) Homepage Journal
    You have to understand what you are using, as was discussed earlier [slashdot.org] often frameworks are not needed, simple custom script should be sufficient for most cases. However people do tend to wrap even simplest of things into large complex frameworks, supposedely for introducing commonalities, providing familiar interfaces, whatever. AJAX is just so simple that in most cases any of those would be overkill.

    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)

    by account_deleted ( 4530225 ) on Wednesday May 02, 2007 @06:30PM (#18964403)
    Comment removed based on user account deletion
  • Re:Frameworks (Score:3, Interesting)

    by mongus ( 131392 ) <aaron@mongus.com> on Thursday May 03, 2007 @12:36AM (#18967991)
    Well, I tried to get it down to 10K but my compressor [scriptingmagic.com] only got it down to 15K. Feel free to use it. For best results, feed the compressor the uncompressed version.

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...