Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Five AJAX Frameworks Reviewed

ScuttleMonkey posted more than 6 years ago | from the buzzwordtaculous dept.

Programming 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.'"

cancel ×

187 comments

Sorry! There are no comments related to the filter you selected.

Frameworks (4, Insightful)

AKAImBatman (238306) | more than 6 years ago | (#18963067)

Am I the only one who usually finds frameworks to be pointless for serious web development? It's not that they're necessarily bad, but that they pack in dozens of features that you don't necessarily need (potentially bloating the size of your page download by tens to hundreds of K) or even want. In many cases, the frameworks have a ton of little "gotchas". For example, Prototype has a set of functions that are supposed to make it easy to show and hide elements. The only problem is that if you define the "display" element in the style sheet (say, to make an element invisible by default) you can't change the element's state. This is because the Prototype library works in a stateless fashion, assuming that the default value for "display" is the way to make an item visible. Which may not be not be true.

Other libraries have some cool GUI widgets, but often those are actually too much for a project. In some cases they even require you to build the entire project out of their widgets! That's nice if you're writing the next Outlook on the Web, but not so nice if you're trying to add interactive elements to an existing webpage. Especially if you like the more open HTML design rather than the cluttered pseudo-GUI design.

In general, I've found that these libraries may be kind of nice if you're not too familiar with DOM/CSS and want to perform some neat effects. (Scriptaculous in particular does some nice effects without a whole lot of difficulty. Just watch the download size!) But if you're doing a complex website, you'll probably be better off with a custom library for now. At least until some standard practices emerge among professional sites.

Now if you want to talk about libraries that patch minor browser issues like no DOM 2 Events, lack of Object.toSource, unified XMLHttpRequest instantiation, etc., then I'd have to jump in and add glowing support for such pieces of code. The key is, though, that they're very passive libraries. You include them, and they make sure that your code works the same everywhere. Which is a bit different than being forced to structure your project around a framework. If there's one thing I love about Javascript, it's that everything is virtual. ;)

Re:Frameworks (2, Insightful)

teknopurge (199509) | more than 6 years ago | (#18963201)

Am I the only one who usually finds frameworks to be pointless for serious web development?
Yes.

Frameworks are what professionals use - the enforce well-formed code and design patterns. Find me a J2EE project that doesn't use Struts/Shale/WebWork/etc. and I will show you inefficiencies.

Re:Frameworks (5, Insightful)

profplump (309017) | more than 6 years ago | (#18963307)

And I could show you inefficiencies and poorly-formed code and design patterns in projects that do use Struts/Shale/WebWork.

That's not to say that frameworks aren't useful for some purposes, but "enforcing well-formed code and design patterns" is not one of those reasons, nor is failing to use frameworks evidence of bad design.

Re:Frameworks (0)

Anonymous Coward | more than 7 years ago | (#18966585)

Like you I code my Web Apps in C++. Awesomely efficient.

Who needs a framework? Losers.

Re:Frameworks (5, Insightful)

AKAImBatman (238306) | more than 6 years ago | (#18963489)

Frameworks are what professionals use - the enforce well-formed code and design patterns.

Funny thing, though. We "professionals" (I like the insinuation there, BTW) use the right tool for the right job. Sometimes the right tool is NOT someone else's framework. Sometimes, you're actually creating inefficiencies by adding layers unnecessary to the project at hand. Only an amateur selects a server-side framework before knowing the requirements of the project. The "professionals" will use off the shelf if it makes sense or build their own if better results can be achieved.

In the case of Javascripting, you've got a lot of factors working against you. The first is size. You can't afford waste, because you're trying to ensure that the page renders as fast as possible. Dumping 100K+ from the scriptalicious framework just to fade out a single box isn't very effective to your budget. Especially since the same effect can be achieved in a few hundred bytes by using a custom framework.

The second factor working against you is reusability. Javascript is not very well designed to handle this area. Object Oriented concepts we take for granted in Java (interfaces, abstract classes, private methods, final assignments, etc.) are not enforceable in vanilla Javascript. So you have to either be really clever (sounds like trouble), or work through standardized practices.

The third factor working against you is maturity. These frameworks are of varying levels of maturity because such web technologies are anything but old-hat yet. There are plenty of situations they are untested in, potentially leaving you debugging someone else's code rather than moving your project forward. Thus a framework may actually increase your project time if you're not careful.

And with that, there's one last note I'd like to point out. Frameworks are far too often chosen as a crutch rather than a time-saving component. Make sure that when you chose a framework, it's because you know it will do the job you need it to. Not because you heard it's the latest craze (bad), or because you have no idea how to implement the functionality it provides (even worse).

Re:Frameworks (0, Flamebait)

jeks (68) | more than 6 years ago | (#18964137)

Size, size, size...

I do not know why GWT was dismissed from the above test (claiming a new "Java API" had to be learnt, as if the other frameworks do not require some domain specific API knowledge). What I know is that GWT makes use of modern compiler optimisation theories to remove dead code (AVAIL and LVA comes to mind), to make the best decisions when it comes to code elimination. Go ahead, write your custom "l33t haxxor javascript" to keep on beating an already dead horse (bad) or reinvent the wheel (even worse).

You are probably the kind of person who think you can manually improve the register allocation by handwritten code over de facto graph colouring register allocation techniques, also implemented by compilers. Either that, or you are completely unaware of all the behind the scene computations made possible by a high level language such as JavaScript, in which case you have no idea how much "control" you are giving up. In that case, I suggest going back to asm.exe and load up a couple of networking libraries for TCP/IP, a scheduler library for multi-threading the GUI/network code, some screen drawing libs, maybe even a widget library, a nice HTML library, then some JavaScript sugar on top. Oh, wait!!! That is a lot of bloat, better make a custom library that implements only the necessities... See you at the asylum!

Re:Frameworks (1)

AKAImBatman (238306) | more than 6 years ago | (#18964287)

Either that, or you are completely unaware of all the behind the scene computations made possible by a high level language such as JavaScript, in which case you have no idea how much "control" you are giving up.

Funny thing, though. "Control" was never a term I used. I never even insinuated that it was a problem.

Let me learns you something here, my young friend. There is a time for everything. A time to laugh, a time to cry, a time to make war, and a time to make peace. There is also a time for frameworks that meet your project specifications, and there is a time to eschew such frameworks as not being a good choice for what you need to do.

Now hear me out for a moment here. How many publicly available Google projects use GWT? When you come up with the correct answer (a lot of folks have the wrong answer to that question) you may find yourself with something to ponder.

Re:Frameworks (0, Flamebait)

jeks (68) | more than 6 years ago | (#18964545)

"Young friend", I take that as a compliment. Yet you are the one with an ID a couple of hundred thousand greater than mine. Do not despair, I shall assume you are quite old (since I am) and evidently slow (do not falter, I shall be too, soon enough).

You do make a good point regarding in-house production uses of GWT (it is 0, as we both know) but that does not set it very much apart from the other frameworks tested. There is GPokr [gpokr.com] though, which you may find yourself enjoying while pondering over your next irrelevant proverb to verbatim.

Re:Frameworks (0, Offtopic)

putaro (235078) | more than 7 years ago | (#18966675)

Us old guys were busy working back when /. started so we didn't find it right away and get low number ID's.

Re:Frameworks (4, Insightful)

drix (4602) | more than 6 years ago | (#18964405)

In fact your very own logic argues for the use of a JS framework. Anything you write that relies on Prototype is going to be far more mature and reusable than something you cobbled together on your own. When I say "mature", I mean it in the holistic sense. It's very, very unlikely that you are you going find some trivial error in the core Prototype library. It's virtually certain that you would do so if you write your own. Maybe you will get them worked out by deployment time, maybe not. Second, Prototype has a rich and consistent API, and anyone who has experience writing applications on top of it could easily pick up your code and reuse it. Finally, you make no mention of cross-browser compatibility, which makes me wonder how much experience developing these sorts of applications you really have. Words cannot describe how much time you save when your starting point is something that works out of the box in IE, Firefox, Safari and Opera. You could sink literally hundreds of hours into testing your application on various platforms. Fortunately, you don't have to, because someone already did. Why reinvent the wheel?

Re:Frameworks (1)

chromatic (9471) | more than 6 years ago | (#18965153)

Object Oriented concepts we take for granted in Java (interfaces, abstract classes, private methods, final assignments, etc.) are not enforceable in vanilla Javascript.

I won't defend the difficulty of relying on other packages in JavaScript, but Java's idea of OO is by no means the only way. Arguably, it's not the best way either--structural subtyping is a curious decision, at best.

Re:Frameworks (0, Insightful)

Anonymous Coward | more than 7 years ago | (#18965519)

Professionals recognize Web 2.0 applications are just the latest faddish crap. Yet another excuse to reinvent the wheel. I'll pass thanks.

Re:Frameworks (1)

Paradise Pete (33184) | more than 7 years ago | (#18965709)

The "professionals" will use off the shelf if it makes sense or build their own if better results can be achieved.

How many projects have you deployed using a framework?

Re:Frameworks (2, Insightful)

rickla (641376) | more than 7 years ago | (#18965729)

No he's not the only one. Frameworks and design patterns are some of the most abused "tools" ever. Maybe you do a prototype, but when you hit a limitation you can spend a lot of time on learning how to customize and extend the framework. The other problem I've had is revisions. Spring particularly was painful. Developer A needed a fix. The version with the fix changed something fundamental (not compiler detectable, something like calling order), and things break. Tough to manage. Give me a good collection of isolated parts. Hibernate, xdoclet, things like that. Far more leverage there I think.

Re:Frameworks (1)

Fujisawa Sensei (207127) | more than 7 years ago | (#18966685)

Struts

Struts is great, if you want to handcuff good OO Design, and just use the Struts features. As far as I'm concerned the only thing that make Struts even remotely useful is the Validation framework. The rest is crap for junior web developers who don't know how to use a web.xml and Model-2 MCV; it cripples the rest of us.

Re:Frameworks (2, Informative)

Rasit (967850) | more than 6 years ago | (#18963231)

Am I the only one who usually finds frameworks to be pointless for serious web development? It's not that they're necessarily bad, but that they pack in dozens of features that you don't necessarily need (potentially bloating the size of your page download by tens to hundreds of K)[...]

So write a script to remove all the unused functions. At least thats how we do it were I work.

Re:Frameworks (1)

LiquidCoooled (634315) | more than 6 years ago | (#18963329)

Father: "Here son, a 3 foot marble cube you wanted, and look your Grandma bought you a chisel"

vs

Father: "Heres a box of lego, it will go nicely with the big duplo bricks you got last year"

Frameworks versus Libraries (4, Informative)

dmeranda (120061) | more than 6 years ago | (#18963349)

This sounds like the classic Framework versus Library debate. Some good reading:

The Dojo mailing list thread "dojo: framework vs library"
http://dojotoolkit.org/pipermail/dojo-interest/200 5-May/000231.html [dojotoolkit.org]

Joel Spolsky's "Why I Hate Frameworks"
http://discuss.joelonsoftware.com/default.asp?joel .3.219431.12 [joelonsoftware.com]

Arnon Rotem-Gal-Oz's "Frameworks vs. Libraries"
http://www.ddj.com/blog/architectblog/archives/200 6/07/frameworks_vs_l.html [ddj.com]

That being said, there are plenty of features in Prototype which are more library-like than framework-like, so it is easy to use parts of it without buying into a whole framework methodology. I don't know much about the other evaluated tools.

Re:Frameworks (1)

suv4x4 (956391) | more than 6 years ago | (#18963361)

Am I the only one who usually finds frameworks to be pointless for serious web development?

You and your soul-buddies who don't understand that by the time they "have it just right", what you just wrote is already outdated and no one cares about it.

The most crucial two things to succeed today, are:

1. having something to offer that people need, and they don't get;

2. do it FAST, since there are 1000 other geniuses like you who thought of the same thing, and will fill the niche before you manage to write and offer your solution.

Frameworks offer you the second, you need to think of the first yourself. Once you have customers/visitors and then the framework you used starts showing weaknesses (mind you, a "weakness" isn't opening your View Source and being overly anal about how the code *looks*), you'll have the time and resources to improve your service/site/solution/product/whatever.

Re:Frameworks (3, Insightful)

AKAImBatman (238306) | more than 6 years ago | (#18963701)

Funny thing, though. I've seen more than enough situations where the framework is obsolete by the time it's done. Take Portlets for example. Seems like a beautiful idea. Web pages are composed of sections, therefore they should be built in sections, right? Right. 5-7 years ago, that is. When I built custom frameworks to good effect that did the same thing.

Today, you often need to go back to looking at the entire page. Why? Because the cutting edge developments require that the page be looked at as a complete memory model. If you try to take the HTML Component approach, programmer 1 may stomp all over programmer 2's Javascript or document ids by accident. Thus it suddenly makes sense to unify those pieces into libraries akin to more traditional programming methods.

Right tool. Right job.

Re:Frameworks (0)

truthsearch (249536) | more than 6 years ago | (#18963955)

Why not just use frames?

(Kidding, kidding...)

Re:Frameworks (0)

AKAImBatman (238306) | more than 6 years ago | (#18964143)

You laugh now. But what if I told you that previous versions of EyeOS did exactly that? I wish I was joking.

I don't know about the current version, though. It seems to do some sort of weird page-refresh thing.

Re:Frameworks (1)

suv4x4 (956391) | more than 6 years ago | (#18964289)

Today, you often need to go back to looking at the entire page. Why? Because the cutting edge developments require that the page be looked at as a complete memory model. If you try to take the HTML Component approach, programmer 1 may stomp all over programmer 2's Javascript or document ids by accident. Thus it suddenly makes sense to unify those pieces into libraries akin to more traditional programming methods.

I'm not sure how this negates the framework model. It's exactly a framework that could provide you always with a unique id, or avoid the need of an id.

I'm not familiar with Portlets and couldn't understand your example.

Re:Frameworks (1)

Checkmait (1062974) | more than 6 years ago | (#18963541)

To be blunt, no you are not the only one. :-)

Re:Frameworks (1, Interesting)

Anonymous Coward | more than 6 years ago | (#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; }
        }
        return true;
}
function iwfGetById(id){
        var el = null;
        if (iwfIsString(id) || iwfIsNumber(id)) {
                el = document.getElementById(id);
        } else if (typeof(id) == 'object') {
                el = id;
        }
        return el;
}

function iwfIsString(s){
        return typeof(s) == 'string';
}

function iwfIsNumber(n){
        return typeof(n) == 'number';
}

Re:Frameworks (0)

Anonymous Coward | more than 6 years ago | (#18963775)

For server side code I've been playing around with the Eddy Framework [leftturnsolutions.com] . For client side YUI all the way, but any word on why such an older version of YUI as looked at?

Re:Frameworks (4, Insightful)

PietjeJantje (917584) | more than 6 years ago | (#18964359)

Am I the only one who usually finds frameworks to be pointless for serious web development? It's not that they're necessarily bad, but that they pack in dozens of features that you don't necessarily need

This was my problem in the open source project, partly Ajax driven, I'm involved in. Exactly for this reason it sported custom coded Javascript from the start. I don't want to load 50K+ javascripts, and I don't want one big script with crap I don't need. If you have some fairly basic stuff which doesn't change much, it's much more efficient to hand-code your own javascript. Also, when this problem arose, and it is still true, these libaries are relatively brand new, and I found it silly to commit a codebase to any of them. However, if you do all your own coding, there are problems such as cross-browser compatibility, and also there is a certain threshold of complexity when you find you're factoring out the same code and problems, and one should consider a switch. But it is a dangerous point which should be a warning sign by itself, because it could imply your stuff is getting too bloated.

It turned out jquery (jquery.com) was the best choice in our case, it addresses exactly my worries by sporting a size of just 20KB, all extras come in modules, and it's very powerful. I'd rather have a 10K version, but there you have it, you can't have it all. How it (or I) work, is to load the core when the page is loaded, and only insert additional scripts (mostly dynamic, i.e. when you click something) when needed. Similary, Yahoo! has a fine, modulized lib which is extremely well documented.

Last but not least it must be noted that all of these frameworks use MIT/BSD style licenses, and I'd like to thank them all for their great tools and generosity.

Re:Frameworks (5, Insightful)

moochfish (822730) | more than 6 years ago | (#18964641)

I disagree. If your goal is to write a website for mom, it is overkill to look at Prototype (maybe). However, anybody who is comparing frameworks is probably way beyond the simple stuff.

As for the bloat issue, this is where libraries like Scriptaculous are doing it right by keeping classes of components in separate libraries. Second, this is why browsers cache JS files. Third, if you want cool effects that are cross-browser compatible, you simply have to accept that such effects come with bloat. If bloat is a show stopper, then you probably shouldn't use fading transitions with scaling div boxes anyway.

And if the argument is that these add way too much *unused* bloat, this comes back to the "mom's website" argument I made above. If people want to use machine guns to hunt cockroaches, that's their call. Unlike with a machine gun, if Prototype is too much, you can always cut out the small pieces you need. That's right -- people seem to conveniently forget that if they only really need one small, tiny part of a much larger library, they're always free to simply cut and paste that component out (MIT license is a great thing, huh).

What? But you need the rest, just in case? Then don't complain about the bloat you are willfully accepting. But in all honesty, Prototype's foot print is tiny -- about the size of an extra image banner -- and it gets cached.

I have been using Prototype extensively lately, and I have found it as a major time saver. By using it, I don't have to remember the various undocumented "gotchas" across browers. I'd much rather deal with the well documented [prototypejs.org] show/hide issue than trying to figure out how to make transparent text in all of the browsers. On that note, did you know Prototype tries to prevent the very "gotchas" you talk of? For example, stopping event propogation is the same method no matter what browser you are using, and the Element.setStyle/getStyle methods correctly convert the 'opacity' property depending on the browser being used. So for whatever "gotchas" you are using to discredit Prototype, I think you are conveniently ignoring the hundreds of others that Prototype strives to fix, silently, without the developer ever knowing.

And lastly, about the notion of writing your own custom library -- that's hardly an option for most people. First of all, most web developers are not JavaScript experts. In fact, I've almost never seen someone use exception handling in JavaScript, short of in libraries like these. More importantly, even if you were some kind of JavaScript guru, are you going to test all of your methods in all of the browsers out there? Can you guarantee your AJAX calls work the same in all browsers? What happens if I trigger a second one during the first one? Is your implementation really more efficient than Prototype's? How long is it going to take to design this custom library? Is it extensible? Does it respect the global namespace? Does it play nice with other JS files I include? Does it work in strict/quirks mode? Like I said, writing such a library isn't an option for most people. Prototype is as close as it gets to a "patch" library, which is why so many other frameworks are built on it. That, and it has been extensively tested, which is a requirement for most companies rolling out technologies like it.

Re:Frameworks (0)

Anonymous Coward | more than 7 years ago | (#18967005)

Well, these are the essential questions to answer. But we need to answer this question for the frameworks too.

Re:Frameworks (1)

Watts Martin (3616) | more than 6 years ago | (#18965281)

Hmm. While I often find myself agreeing with you in Slashdot posts, I have to throw in a whole lot of "well, sometimes" flavored salt in with this one.

Yes, frameworks are always inefficient compared to something tailor-made for a specific case (or even just the set of cases that you customarily deal with across multiple projects). But execution efficiency has never been what (honest) frameworks promise you; what they're after is development efficiency, which is quite a different matter.

Just focusing on Prototype (not Scriptaculous), by using it I can screw around with Ajax in a clearly-defined, well-tested fashion that frees me from worrying about all the mysterious browser incompatibilities that it knows about and already accounts for. I get a lot of very useful extensions that aren't directly related to Ajax (enumerations, getElementsByClassName, just the $, $A, $F, etc. shorthands!). In development time, this can be a pretty big win: a homegrown library can certainly get to Just Where You Want It, but it's not going to start out that way. You're going to spend a much bigger chunk of your development time doing the debugging and tweaking and noodling of your library than the guy using Prototype will, and you're probably going to do more hammering on it to adapt to each new project, unless/until it gets to a point where it's effectively been generalized into, well, a framework.

Yeah, prototype.js is about a 65K hit, and effects.js from Scriptaculous would be another 33K if you loaded it, too; for our friends stuck with modems, that could be another 20 seconds, although for everyone else we're talking about, well, one or two seconds. And only the first time it gets hit during that session (before it's cached).

No, you don't want an unnecessarily porky client-side library piggybacking your HTML, but I'm not convinced the "bloat" they add is always unwelcome. I think the charge of forcing you to structure a project around them is also a little overstated -- Prototype has a few oddities, like the problem with the CSS 'display' attribute you mentioned, but it's hardly the equivalent of CakePHP or Rails in terms of "do it our way or we'll make life hell for you." (Which isn't really a knock against either of those frameworks, but you'd better know you're going to be doing it Their Way going in.)

Re:Frameworks (2, Insightful)

protohiro1 (590732) | more than 7 years ago | (#18965489)

You are not using YUI. YUI exactly what you are asking for. YUI is a libary, not a framework and it does exactly what you are asking for. (I also am kind of down on frameworks, good for RAD, not great for scaling full on apps) Look into YUI Dom, Event and Connection. Lightweight, cross browser libraries that solve problems for you. DOM addClass, removeClass and getElementsByClassName are key. Event has great add/remove listener that helps you centralize managing events. YUI connection is kick ass ajax, etc, etc. Hit up developer.yahoo.com and enjoy. We use these in production. On a site that gets ten million page views a day. Now, YUI widgets...not the best thing ever and kind of heavy...but the libaries rock.

Re:Frameworks (0)

Anonymous Coward | more than 7 years ago | (#18966277)

libaries


Boy, your face must be as red as a strawbrerry.

Re:Frameworks (1)

Heembo (916647) | more than 7 years ago | (#18965611)

Am I the only one who usually finds frameworks to be pointless for serious web development?
No, you are right on. I build code for fortune 10's and other very large entities. I am part of a small elite team of Java architects who work fast. Java, yea, we use a very bare-bonus MVC utility library. But overall, we have proof of concepts that the rest of us repeat to ensure that all of our code is consistent as if coming from one developer. Then we pier review our code. Then run it by security scanners. We then beat it all up (especially ajax stuff) in QA. Then release. It works.

For Ajax, especially when you want to win on the evil triad of Firefox, IE 7 & and Safari, custom coded CSS/Javascript using the simple AJFORM library seems to be the best way to work fast and win on the client.

Thats a small elite team; when you have a large project with a great number of average developers, this kind of development breaks down and then you need the crutch of a framework. But even then, a average developer can do some REALLY bad stuff within a framework. Any framework. Moral: small senior teams that use solid libraries beat out large average teams with frameworks any day.

Re:Frameworks (1)

HaMMeReD3 (891549) | more than 7 years ago | (#18965619)

Initally I wrote a whole document as to why dojo is actually good, but I'll try to sum it up in less words.

1. Platform Independance
2. Roadmap/plans on dojo really outline how they care about code quality and developing a flexible/extensible solution.
3. I only use about 20% of dojo, but it has probably saved about a year of development time, I used to have a "do it myself" attitude, but after extensively developing under dojo, that opinion has changed to "don't reinvent the wheel" which is especially true when there are people improving the wheel for you free of charge.
4. Allows a great separation between dojo code and my proprietary code. I have not yet had to even touch a single line of code within dojo, because I've been able to workaround any problems via inheritance or my own custom widgets stored in my own namespace away from the dojo code.
5. Things aside from widgets have been proven time and time again to be incredibly useful, e.g. formbind binds a a form to a ajax request, allowing you to directly turn that entire form into a ajax request (no page redirect) with just one line of code. dojo.event.connect allows me to wire up all my onclicks, hovers, etc very easily. dojo.lang.hitch allows me to force scope on a function which might otherwise be out of the scope I would expect it (e.g. xmlhttprequest callbacks, some event handlers, etc)
6. Great build tools that seriously optimize code/execution time at release time. I've dabbled in it and it's increased my load time (with a non-optimal build) from like 10 seconds to under 1 second (which is acceptable for the enormous scale of the application, which is contained in a single page).

I'll stop there, but dojo is priceless to my development, I would have spent countless time redeveloping all the tools I use from it, and half of them I wouldn't have even considered using, instead I'd be using some primitive half baked stuff I hand wrote that wouldn't come close to the quality of the work the dojo team puts into there code.

Re:Frameworks (1)

billcopc (196330) | more than 7 years ago | (#18965703)

You hit the main reason why I've avoided Ajax frameworks so far: bloat. The latest Prototype.js is 94kb... that's about three to four times the size of my current pages (with images). Most people only use a teeny fraction of Prototype's functionality. I'd be happy if they could make it modular, e.g. one include for Ajax features, one for rounded corners, etc. That way you can pick and choose just what you need, and even concatenate them into a custom bundle to cut down on HTTP requests. Having one monolithic JS library just means every single page load slows down to a crawl. The download size isn't the main issue, because that gets cached/compressed, but the user's browser has to parse and initialize the library for each request.

Re:Frameworks (1)

dstoflet (548018) | more than 7 years ago | (#18966085)

The route these libraries/frameworks are taking is allowing you to build and thus include only the js you need for your particular use case. For instance, the best JS lib IMO is Ext http://extjs.com/ [extjs.com] which has a dependency builder where you specify the framework you want to use (YUI, JQuery, or Prototype) and the capabilities you need (e.g just Core, DD, or choose from umpteen UI components).

At any rate the Dr Dobbs article was pretty poor, seriously outdated and lacking much in the way of details.
Dojo is nice, but I found it to be too slow and recently I think they realized they needed to re evaluate some design decision and set a clearer path on where they are taking dojo in the future. They have not released much in the last 6 months (a minor dot release to 4.1 I believe). It does have the great feature of graceful degradation cause it can take existing markup and convert to supa nice UI widgets, but this requires it to traverse the whole DOM and look for 'dojo' widgets. There are workarounds, e.g specifying the element ids for your widgets to be dojo-ized though. Still though, pages (really when using UI JS frameworks they are not pages anymore but applications) with a lot of dojo widgets can be very slow to render. In addition dojo has some rough edges such as poor docs, too many grids that make it feel like there is a lack of direction etc. I look forward to the next major release though, Dojo certainly has a ton of potential.

But the kick ass JS library right now is Ext http://extjs.com/ [extjs.com] . Its well documented, very polished, has just about any widget you need, a super nice data abstraction for the grid/editable grid/combo box, and simplifies DOM manipulation and XHR. All the while being written in very nice OO JS style (yes I said OO and JS, for those you are ignorant of JS capabilities take a look at http://www.litotes.demon.co.uk/js_info/private_sta tic.html [demon.co.uk] and http://phrogz.net/JS/Classes/OOPinJS.html [phrogz.net]

Re:Frameworks (0)

Anonymous Coward | more than 7 years ago | (#18966165)

You certainly could prune out what you don't need to get the file size down.

These libraries are nice though since they have a lot more testers than you have. If there is a bug in version X of browser Y on platform Z, they'll see it before you will. The library will code the workaround in it and you just use the visible function.

Secondly, you'll only load it once. That's the beauty of ajax. You load the page once and then only fetch the rest of the content/code as needed. You should rarely have to download the same data twice. Of course the client should cache between subsequent page loads, but you don't have to actually ever leave the first page you go to.

On an ajax application I wrote, I implemented a client side function and data cache. You send an initial block of code to prepopulate the cache with stuff you expect them to use and then load the rest on demand. Because you are loading the code and data via ajax, you can use gzip compression without worrying about the annoying gzipped javascript doesn't work bug on some browsers.

The only time you actually have to load a new page is if you do file uploads and you can use an iframes hack to get around that. Everything else can be done via ajax.

You can even get around the forward/back/bookmark problems by storing some state information in the "anchor" part of the url (the part after the #)

Re:Frameworks (1)

achillean (1031500) | more than 7 years ago | (#18966787)

It's not that they're necessarily bad, but that they pack in dozens of features that you don't necessarily need (potentially bloating the size of your page download by tens to hundreds of K) or even want.

I can't speak for all frameworks, but Dojo allows you to build your own custom dojo.js with whatever features you'll need. So it's really not a big problem if you don't want to have all their UI widgets, but like their event system. I wouldn't be surprised if most professional frameworks allow the developer to customize the features of the framework. Here's the link to a tool that builds the custom dojo.js for you:

http://build.dojotoolkit.org/0.4.2/web/buildscript s/webbuild/ [dojotoolkit.org]

Re:Frameworks (1)

yomahz (35486) | more than 7 years ago | (#18966921)

they pack in dozens of features that you don't necessarily need (potentially bloating the size of your page download by tens to hundreds of K) or even want


Imagine for a moment that the year is 3801. Our top computer scientists have invented this super algorithm that would find repetitive patterns in text and replace them with a token, thus decreasing data size. Then imagine that the very same algorithm could be implemented in popular web clients and servers. Now that would be quite a time to live in!

If only... If only...

Re:Frameworks (1)

AKAImBatman (238306) | more than 7 years ago | (#18966987)

You have no idea how much server-side GZipping futzes up AJAX and Flash apps in IE. Absolutely no idea. [sourcelabs.com]

MooTools (2, Informative)

teknopurge (199509) | more than 6 years ago | (#18963113)

what about mootools? [mootools.net]

Say NO to MOOTOOLS, not as efficient as PERVERSIUS (-1, Offtopic)

Anonymous Coward | more than 6 years ago | (#18963585)

Find Perversius here [hideffreeporno.com] , "under the belt" edition.

Re:MooTools (1)

ooglek (98453) | more than 6 years ago | (#18963967)

I LOVE mootools. I've tried others, and mootools is the best.

Re:MooTools (0)

Anonymous Coward | more than 6 years ago | (#18964533)

For real. MooTools rules.

Nothing to see here...... (0)

Anonymous Coward | more than 6 years ago | (#18963119)

More Web 2.0 fad crap.

QooXDoo (1)

ClarkEvans (102211) | more than 6 years ago | (#18963187)

I've had solid luck with http://qooxdoo.org/ [qooxdoo.org]

Security not a consideration? (4, Interesting)

Lux (49200) | more than 6 years ago | (#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.

Re:Security not a consideration? (1)

hansamurai (907719) | more than 6 years ago | (#18963441)

I also found it odd that the author uses Dojo Toolkit v 0.3.1 as I believe 0.4.1 has been available for months and 0.4.2 is the current release. Though I don't know the differences between the releases so maybe it's no big deal.

Re:Security not a consideration? (1)

FLEB (312391) | more than 6 years ago | (#18963487)

I do agree that security should have been a consideration. That said (and I'm honestly asking here), are there vulnerabilities (particularily XSS) that can be created purely by adding AJAX components? I suppose that in the case of a package with server-side parts there could be XSS vulnerabilities on the server side, but given that AJAX, like all JavaScript, is restricted to same-domain-only, any leaking or insertion of data would have to come from the same old back-end "didn't sanitize the input" problems.

Re:Security not a consideration? (2, Informative)

foxyLady (451810) | more than 6 years ago | (#18964121)

Well, Fortify Software Security Research Group (which I am part of) has recently released a report ( http://it.slashdot.org/article.pl?sid=07/04/02/111 3242 [slashdot.org] ), where we discuss the new type of vulnerability we named JavaScript Hijacking.

We believe that JavaScript Hijacking is the only type of vulnerability found so far applicable only to Ajax applications. We've also analyzed 12 most widely used Ajax frameworks (DWR, GWT, Microsoft "Atlas", xajax, Prototype, Script.aculo.us, Dojo, Moo.fx, jQuery, Yahoo! UI, Rico, and MochiKit) and determined that all the frameworks that use JSON and/or JavaScript for transferring data (except for DWR 2.0 which was not released at the time) are vulnerable to JavaScript Hijacking.

To summarize, the vulnerability allows an unauthorized party to read confidential data contained in JavaScript messages. The attack works by using a tag to circumvent the Same Origin Policy enforced by Web browsers. Traditional Web applications are not vulnerable because they do not use JavaScript as a data transport mechanism.

Complete report is available here: http://www.fortifysoftware.com/servlet/downloads/p ublic/JavaScript_Hijacking.pdf [fortifysoftware.com] .

As a side note, DWR 2.0 ( http://getahead.org/dwr/ [getahead.org] ) and Prototype 1.5.1 ( http://prototypejs.org/2007/5/1/prototype-1-5-1-re leased [prototypejs.org] ) have been recently released, and do contain fixes that prevent JavaScript Hijacking.

AJAX is the antithesis of security. (1, Funny)

Anonymous Coward | more than 6 years ago | (#18965121)

We're getting to the point now with AJAX that there are just too many levels for a good degree of security to be maintained. Let's keep in mind all of the layers that need to be secured when developing and deploying a web applications:
Level 0) Hardware: we have to make sure our computer systems themselves are secure.
Level 1) Network: we have to make sure that the physical network between our computer systems are secure.
Level 2) Operating System: the OS running on the Level 0 hardware needs to be secure.
Level 3) Operating System Userland Libraries: the userland libraries interfacing with the Level 2 OS kernel need to be secured.
Level 3) Web Server: the HTTP daemon running on top of the Level 2 OS and making use of the Level 3 libraries needs to be secure.
Level 4) Database System: the database system being accessed by the web app needs to be secured.
Level 5) Web App Back-end: the back-end web application handling the AJAX requests, and possibly interacting with the Level 4 DB system, must be secure.
Level 6) Client->Server Network: the network between the client and the web server must be secured (eg. SSL, TLS).
Level 7) Web Browser: the web browser making the AJAX requests requires security, especially in the face of JavaScripts from different sites being run concurrently.
Level 8) Web App Front-end: the JavaScript code making up the front-end of the AJAX application, and running in the client's web browser, must also be secured.

So we've got at least NINE different layers that need to be secured. Now, these layers are provided by different groups, individuals, companies, you name it. The coordination between these groups is limited. Furthermore, what constitutes a security flaw from the perspective of one layer is a normal operation from the perspective of another layer.

All in all, when we start deploying AJAX applications (or web apps in general), we end up with a massively complex layering effect that seriously impacts the security of the entire stack. It becomes very difficult for even a team of administrators, developers and security analysts to properly ensure that such a deployment is sufficiently secure.

There's only one solution: reduce the layering. Yes, that means ditching AJAX, web browser and web servers. If an application must be executed remotely, it's best to use X11, RDP, VNC, SSH or similar technology. That runs the client on the same system as the server, thus eliminating some of the layers. At least then the problem becomes more manageable, if not yet ideal.

Script# ? (1)

JoelMartinez (916445) | more than 6 years ago | (#18963293)

too bad they didn't look at Script# [nikhilk.net] ... good stuff :-)

Re:Script# ? (2, Informative)

vdboor (827057) | more than 6 years ago | (#18964103)

Something I also missed was xajax [xajaxproject.org] . They use AJAX as RPC layer, calling a server-side method from JavaScript, and in reverse call methods on the clients back. This is easy to implement in existing pages, and leaves much room for implementation.

Instead of parsing data structures in the client, xajax allows you to send HTML chunks, JavaScript method calls and DOM operations back (making it two-way RPC). The most interesting part is you can reuse all server-side code created in the "web 1.0" days, like HTML template engines. :-)

As a .NET developer (3, Interesting)

leather_helmet (887398) | more than 6 years ago | (#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

Re:As a .NET developer (1)

ozphx (1061292) | more than 7 years ago | (#18965359)

Seconded. You can take an existing page, wrap a few regions in UpdatePanels and the whole thing just works without code changes.

And it works in firefox. Whee.

This is how an ajax framework should be done.

My experience with Dojo (3, Insightful)

hansamurai (907719) | more than 6 years ago | (#18963355)

I have had an experience very close to the author's. My group at work maintains an internal app served with Websphere, just like the author. We have a tree of nodes that recently ballooned in size to 40,000 nodes and this was causing our CSS/javascript tree to choke as it loaded everything once and used the CSS to handle opening and closing of nodes. It would take about 5-10 seconds to load the tree once, but after that it would perform nicely. We wanted a near instant load at start and then whenever you expanded a node it would grab its children from the database and display them then. My coworker and I didn't have any AJAX experience when we started working on this problem so we turned to frameworks.

First think I looked at was the Google Web Toolkit, and dismissed it as quickly as the author. I suppose if we ever rewrite our app from scratch we'll maybe consider it, but not right now. Then I found dojo, and we started using that to implement a dynamic loading tree. I got it working and plugged into our database fairly quickly, but found out it wouldn't help us much. Clicking on a parent to display its children can take anywhere from 1 to 15 seconds depending on the how many children it has, and also basically freeze your browser while it's doing that. It also either had a memory leak or just managed memory inefficiently because the browser's memory footprint would balloon in size as you clicked more and more nodes.

My coworker eventually took it into his own hands and started hacking the dynamic loading himself. I've been busy with other projects so I don't know how he did it exactly, but it's a combination of our old CSS tree and some dynamic loading to speed up the initial load. Clicking on a massive parent can still cause some slow loading, but it was better than dojo. I think dojo is a great toolkit, but when you just want to pull one specific piece out of it, it can be cumbersome and bloated. Also, the documentation sucks and if I needed help, I mostly just read over old bug fixes and such. I forwarded my coworker this article so maybe we'll look into YUI.

Thanks for the session id (1)

Gyppo (982168) | more than 6 years ago | (#18963417)

Generally not a good idea to not post URLs with your jsession ID in it. I love when people forward their Evite invite URLs thinking they're sharing the event invite but they're enabling people to reply on their behalf.

Where's MyBic? (1)

AssProphet (757870) | more than 6 years ago | (#18963435)

A Review comparison of MyBic to these frameworks would be nice. Anyone out there that would like to volunteer?

Just don't choose them all! (1, Interesting)

ObligatoryUserName (126027) | more than 6 years ago | (#18963473)

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:Just don't choose them all! (3, Funny)

maxume (22995) | more than 6 years ago | (#18963697)

Was it digg?

Re:Just don't choose them all! (0)

Anonymous Coward | more than 6 years ago | (#18965011)

Top reasons I hate Flash or why I choose Javascript over Flash:
1. Navigating through a site and I hit back .. leaving the site. Oops, I've been trained from HTML pages to navigate that way. This angers me to no end.
2. As a programmer, until recently, it was extremely time consuming to do anything that I could do in Ajax quickly. Huge learning curve trying to learn how to use flash.
3. Complex Flash Applications generally use much more CPU and are extremely sluggish compared to Ajax apps (in your case the Ajax programmers didn't know how to code well, 30sec to load .. wow, pathetic)
4. You are more likely to be compatible with javascript/Ajax than flash, since most sites use javascript in the first place to detect if flash plugin is installed.
5. Forget about getting any real Search Engine traffic from an 'all flash' site. (unless it's an internal corporate thing)

Flash will probably always be the best choice for eye-candy animations and video streaming. For management trying to impress someone, that's usually important I guess.

Re:Just don't choose them all! (1)

ObligatoryUserName (126027) | more than 7 years ago | (#18966149)

I know nothing I can say can remove the pain of bad past experiences, but let me clear up your misconceptions.

1. Navigating through a site and I hit back .. leaving the site. Oops, I've been trained from HTML pages to navigate that way. This angers me to no end.

This is really a problem with any single page site, which is what Ajax is - a single page that loads in the different components. The same methods to make the back button work with Ajax can be used for Flash. It's just that not everyone uses these methods with Flash or Ajax.

2. As a programmer, until recently, it was extremely time consuming to do anything that I could do in Ajax quickly. Huge learning curve trying to learn how to use flash.

As someone who has done a lot of Flash and Javascript, I would say that the learning curve is feature-for-feature worse for Javascript because you need to learn about the different browsers, but may be greater overall for Flash because it offers more features. That's a trade off I've been happy to make.

3. Complex Flash Applications generally use much more CPU and are extremely sluggish compared to Ajax apps (in your case the Ajax programmers didn't know how to code well, 30sec to load .. wow, pathetic)

Computation for computation, Flash has better performance than Javascript. At least, I think that's why Mozilla accepted Adobe's donation [adobe.com] of the EMCAScript execution engine from Flash. After that's incorporated I would believe that Javascript alone would run faster, but right now that's not true. (Or if it is true, someone better stop Mozilla.)

4. You are more likely to be compatible with javascript/Ajax than flash, since most sites use javascript in the first place to detect if flash plugin is installed.

This is another issue of every site being different, but the fallback for not having Javascript enabled can easily be to show the Flash content. The only reason everyone uses Javascript to embed the files now is because of Microsoft's attempt to screw plug-ins.

5. Forget about getting any real Search Engine traffic from an 'all flash' site. (unless it's an internal corporate thing)

This isn't an issue for me since I usually use Flash for corporate apps that you wouldn't want indexed, but again this isn't something that's inherent to Flash. The issue is that Flash sites often pull in dynamic content. That's what the search engines can't index, and again it's something that's going to be a problem for any Ajax site that does the same. (Google has been indexing Flash for years and Adobe offers a free SDK for developers of search engines. Also, Flash-dependent sites like YouTube are definitely not starving for traffic.

As long as we're talking about pet peeves here are two essential things Javascript/Ajax needs to address that Flash already has.

1) Built in security against cross-domain scripting.
2) Accessibility for the disabled.

"[F]or management trying to impress someone, that's usually important I guess" -- if that someone you're trying to impress is either your boss or your client then there's no guessing about it.

A YEAR old? (1)

DEFFENDER (469046) | more than 6 years ago | (#18963613)

the current release of Dojo is 0.4.2

Why is this article reviewing a release of Dojo that is over a year old? And you might notice that Dojo gets the short end of the stick too.

Re:A YEAR old? (1)

ValuJet (587148) | more than 6 years ago | (#18963801)

Everything seems old. the google web toolkit is 1.0, and they now are on 1.3 and it has matured greatly.

This seems like the equivlent of comparing Oracle 8.0 with SQL server 6.5 and informix 7.1 or whatever. It just isn't a relevant comparison anymore.

Adobe Spry Framework... (1)

creimer (824291) | more than 6 years ago | (#18963687)

I'm more intrested in finding out how the Adobe Spry framework [adobe.com] compares. I just got a copy of Adobe Creative Suite 3 (academic pricing is so sweet!) where this framework is part of Dreamweaver. With CS3 being so new, doorstoppers ($50+ USD books) are not yet available to explain how to implement this framework.

jQuery, too! (4, Informative)

sbma44 (694130) | more than 6 years ago | (#18963735)

It takes the magical $() selectors of prototype, expands on them, and somehow delivers it all in 19k.

Why dojo 0.3.1? (1)

Fireflymantis (670938) | more than 6 years ago | (#18963737)

Dojo 0.4.2 has been out for a while now, and is vastly superior to any of the 0.3.x releases. Why did they pick such an old revision of the toolkit?

Re:Why dojo 0.3.1? (1)

MidKnight (19766) | more than 6 years ago | (#18964241)

Plus, even 0.4.2 is quickly aging. Dojo 0.9.0 is readying for an alpha release sometime soon, and will be a great step forward for the library. For my money (or rather, the time it takes to learn & leverage a new technology), Dojo is the best thing going in terms of JS libraries, regardless of their AJAX-y leanings.

The learning curve is higher than the others, but the upside is also much, much greater. With a formal 1.0 release scheduled for later this year, and a ton of momentum (both within the community and corporate backing), Dojo is here to stay. And that's a good thing!

Re:Why dojo 0.3.1? (0)

Anonymous Coward | more than 6 years ago | (#18964279)

I don't know when Dojo 0.4.2 came out but the article begins "In 2006" and later says "The new AJAX-based retirement-plan website was deployed to production in mid-December 2006", so they were doing this a while ago.

Use frameworks only when really need them (2, Interesting)

roman_mir (125474) | more than 6 years ago | (#18963781)

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.

Another good option (5, Informative)

cabinetsoft (923481) | more than 6 years ago | (#18963793)

is jQuery [jquery.com] and it's plugins [jquery.com] .

Re:Another good option (1)

Octopus (19153) | more than 7 years ago | (#18965465)

Yeah, pretty lightweight, I've been using it off and on over the last year. Surprised it wasn't mentioned until now.

Old News? (5, Informative)

russcoon (34224) | more than 6 years ago | (#18963817)

I'm Alex Russell, Project Lead for Dojo,

We're obviously flattered that our little project got covered in DDJ, couldn't they have reviewed newer versions of the tools they covered? [dojotoolkit.org]

Re:Old News? (1)

Line_Fault (247536) | more than 6 years ago | (#18964581)

I agree!! Most, if not all, of the tested frameworks were not current versions.

I'm currently doing development using Prototype. The new version works quite well.
I found the documentation here! [prototypejs.org]

They must have been sitting on their results for the last 5 months or so!

Most of the projects mentioned are in a rapid state of development, so old news just won't cut it!!

Re:Old News? (1)

bahwi (43111) | more than 6 years ago | (#18965053)

That's not how print magazines work, articles go in, and when they fill a gap or void or a theme is when they go to print, which can be years later, even for software/tech magazines. Again, only in print. Since they all had older versions reviewed you can kind of figure out when they did the review. Of course, it can also take place over the course of a few months.

Re:Old News? (1)

Paradise Pete (33184) | more than 7 years ago | (#18965615)

couldn't they have reviewed newer versions of the tools they covered?

It does say that they did their comparisons in 2006.

Re:Old News? (1)

Matt Perry (793115) | more than 7 years ago | (#18965633)

couldn't they have reviewed newer versions of the tools they covered?
Regarding your blog post, you almost sound like you're complaining that they are using stalwart versions of the software that they reviewed. I fail to see what the problem is with that. Would you rather that they have reviewed software that was buggy and barely functional? The rest of your blog posting gives me this impression leading me to believe that you think stalwart means old. It doesn't.

Re:Old News? (1)

russcoon (34224) | more than 7 years ago | (#18966181)

Matt,

We (and all of the other toolkits they reviewed) fixed hundreds and hundreds of bugs in the 11 months since the release of Dojo 0.3.1. Like all of the other (well written) toolkits they reviewed, we take stability and quality seriously. Sure it takes them a while to review stuff, and I understand that they have constraints of publishing on a dead-tree schedule. It's even valuable for them to outline the decision process, but the world (and the toolkits) have moved on since.

Regards

JQuery (1)

minuszero (922125) | more than 6 years ago | (#18963851)

...I find is quite nice :)

http://jquery.com/ [jquery.com]

fail2Ors (-1, Troll)

Anonymous Coward | more than 6 years ago | (#18963877)

and has 1nstead

They all come up short (1)

Wabbit Wabbit (828630) | more than 6 years ago | (#18964095)

I've used them all, including moo (http://moofx.mad4milk.net/) and the toolman library (http://tool-man.org/examples/) and each one has a little something missing or fails to work well for some browser/OS combinations.

I've had to tweak or extend the code in each case, and in the end I settled on my own ajax class because none of the frameworks had a decent timeout/cancellation mechanism. For "desktop" apps I agree that YUI is the best of the lot, although I've had to roll my own extended modal message box classes because of some deficiencies in the YUI versions (some fixed in the latest rev, some not).

For "fun" GUI effects I've found prototype and its derivatives overrated. YUI works better IMHO.

However, no one beats toolman for list manipulation and editing-in-place, and for quick-and-dirty manipulation of divs as "windows" I rely on a modified version of code from that original venerable bullwark of DHTML coding, the O'Reilly JavaScript and DHTML Cookbook.

The moral of the story?

It's still the wild west out there (here?) No single library is perfect, all have some puzzling and maddening flaws, and if you're good at what you do, it's often better than not to roll your own. It's the only way you'll discover such oddities as the (just-fixed) non-standard behavior of the escape key in the Camino browser, and the lack of click input in Safari for radio button labels or Opera's handling of resized divs containing tables. Yes, these are browser problems, but a major selling point of the monolithic frameworks is that they've been tested, and that these quirks are supposed to be normalized and accounted for.

Lastly, I know the title of the post was AJAX frameworks, but ajax is actually only the smallest part of these systems. Most focus on the visual effects and "window" management features, with the ajax part kind of thrown in. To me, that's also part of the problem. These frameworks are trying to become desktop replacement libraries, only part of which involves ajax, and they're still struggling through growing pains and an identity crisis.

In a way it's all quite fun, like coding C++ was (commercially at least) back in '91, when we were still trying to figure a lot of it out. Hmmm...we're still trying to figure a lot of it out. What was my point again? ;-)

Jquery (2, Informative)

VGfort (963346) | more than 6 years ago | (#18964149)

Dojo is nice if you want widgets (month selector/accordian/...) but the documentation is rather weak. Personally I like JQuery, good docs and everything in 1 rather small file.

Umm... hello? jQuery? (3, Informative)

YourMotherCalled (888364) | more than 6 years ago | (#18964183)

"jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript." - jQuery homepage [jquery.com]

jQuery is great because it's really small and really easy to use. I know very little about js and have absolutely no interest in learning all the gotchas related to cross-browser js development so I leave it to jQuery to do that for me. jQuery allows me to use js in a powerful way, easily and quickly.

It's disappointing to not see jQuery in that list as if to say it's any less well made than the others.

No jquery? (4, Interesting)

tentac1e (62936) | more than 6 years ago | (#18964403)

It's disappointing they omitted jquery [jquery.com] . I've been using prototype + scriptaculous for a year and a half, but after a friend's recommendation, I took a look at jquery. I decided to try it for a day as I start the rewrite of mogopop [mogopop.com] 's authoring tool, and now I'm now comitted to using it for the entire rewrite and all future projects.

jquery's killer features are its selector syntax and Chainability [jquery.com] . From the tutorial, I can say "to all 'a' tags, add the 'test' class and show them" with $("a").addClass("test").show(). Or just the 'a' with id 'bar' with $('a#bar'), or just 'a' with class 'baz' with $('a.baz'). It's simple and concise, and perfect for most of today's ajax uses.

With its Ruby like syntax and solid plugin architecture, it's sad it follows the Rails philosophy more than the Rails spinoff Prototype.

Re:No jquery? (1)

xutopia (469129) | more than 7 years ago | (#18966481)

For reference here is how to do it with Prototype: $$('a').each(function(a){ a.className = 'test'; a.show() }); Indeed Jquery does look more concise.

Prototype Screencast (1)

muchawi (124898) | more than 6 years ago | (#18964427)

I recently released a paid screencast on Prototype together with one of the core developers. The screencast and a short preview can be seen here:

http://peepcode.com/products/javascript-with-proto typejs [peepcode.com]

Redundant and silly (0)

Anonymous Coward | more than 6 years ago | (#18964609)

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).


Um, so tell me again why neither of these cannot be done in plain html output? You can't. Javascript is not necessary for either of these features. It serves only to complicate that which should be simple. There is nothing worse than javascript for javascript's sake.

Why just AJAX? (1)

PhotoGuy (189467) | more than 6 years ago | (#18964785)

I've been looking into web frameworks lately, a lot of different ones (Java, Perl, Python, Ruby based ones). I finally decided upon going the Ruby-on-Rails, and probably the Ruby ActiveScaffold [activescaffold.com] plugin.

One of the things that turns me off about frameworks in general, is the almost maniacal focusing upon AJAX. AJAX can do a lot of things nicely (Google Earth as the classic example), but for most web sites, all it does is add a slight bit more interactivity to forms. And many of the frameworks I looked at, handled forms nicely, but if JavaScript was turned off or unavaialble (like on some PDA's, Phones, and other environments), they were unusable.

I became very intruiged by Hobo [hobocentral.net] as a Ruby on Rails plugin. Unfortunately, all the (scant) examples are so AJAX-centric, and do not degrade gracefully at all without JavaScript, I have no idea if it can be used effectively in a non AJAX environment. (I could spend a week exploring this, but I'm just going to move on with a framework I know will work.) A damn shame, because Hobo has a lot to offer.

I believe I am finally settling on ActiveScaffold, because it seems to degrade very nicely in the absence of JavaScript, and doesn't seem so heavily dependant upon it. Seems to have a good community around it, and isn't too heavyweight.

(BTW: Many of the Ruby plugins actually use prototype [and scriptalicious, I believe]; in fact, Prototype libraries come as part of Ruby on Rails.)

Re:Why just AJAX? (0)

Anonymous Coward | more than 7 years ago | (#18965997)

The 'what if they have javascript turned off' argument is just silly. Quite obviously if they have javascript turned off only css selector style dynamicness can be done clientside.

Gracefully degrading might be nice, but it just isn't realistic for any site that used whatever they were using much at all. You'd be better off coding a parallel site that doesn't use anything clientside. You'll have a really hard time making a drag and drop UI degrade into anything usable without writing an alternative UI.

What about Microsoft? (1)

MobyDisk (75490) | more than 6 years ago | (#18964839)

Why isn't Microsoft's AJAX.NET [asp.net] reviewed? I figured they would be a major player in this, right?

This is not a review (2, Insightful)

jd142 (129673) | more than 6 years ago | (#18964905)

I think people are getting confused by the /. blurb. This article is not a review, it is a case study. This company is describing the process that it went through months ago in determining which software to use. That's why some of the versions are out of date. That's why they quickly discounted software packages that didn't work with their existing infrastructure. If you read the very first paragraph it tells you that they had very specific design constraints and that's why some packages weren't evaluated fully. You simply don't have that in a review.

A case study is supposed to give an overview of the decision making process and the implementation phases of the project. And that's exactly what this does. They goal was never to produce a document that gave an objective evaluation of the products, it was to show the decision making process they went through in their evaluation. No where does the Dr. Dobb's site call this a review.

Re:This is not a review (0)

Anonymous Coward | more than 7 years ago | (#18965699)

Totally agree, they discount the 2 most innovative, GWT and DWR. This people are clueless

DWR (2, Informative)

kevin_conaway (585204) | more than 6 years ago | (#18965129)

The name of the software is Direct Web Remoting [getahead.org]

How can we take this seriously if they don't know the name of the software they are evaluating?

Re:DWR (1)

coug_ (63333) | more than 7 years ago | (#18965905)

I've actually had the opportunity to use DWR recently, and if you're developing a Java servlet-based application, it's mind-numbingly easy to set up and use. Basically, you tell it which Java objects you want to call methods on, which ones you want to be able to marshal back and forth, and it basically gives you a Javascript interface to all of your code, and it even generates a web page where you can pass in values to the functions and it will do its best at displaying the results of the method call. I thought the fact that they dismissed it because "it didn't fit into our architecture" was pretty lame.

DWR = Direct Web REMOTING (2, Informative)

spanielrage (250784) | more than 6 years ago | (#18965283)

WTF - this article might as well have been written last summer. DWR version 2.0 is now out and has been in beta for a while.

The 'R' in DWR does not stand for for Reporting, but rather "Remoting". Both TFA and the ./ post are incorrect.

Not really out-of-date... (1)

dustymugs (666422) | more than 7 years ago | (#18965901)

If you check the first page of the article, you'll notice it says that the project started in 2006 (who knows as to exactly when) and went production mid-December of the same year. So, there wouldn't be anything new (released 2007) in the first place.

Lets get hypothetical for a moment, and look at when the frameworks' versions noted in the article were released (these are estimates based upon announcements, datetime stamps, etc)...

Dojo 0.3.1 released ~06/12/2006
Prototype/Scriptaculous 1.4 - probably Prototype version, I'd say Scriptaculous is either 1.5 or 1.6 release ~3/2006 - 4/2006
DWR 1.0 released ~8/29/2005
YUI 0.11.1 released ~07/17/2006
GWT 1.0 released ~05/25/2006

If we take the most recent release date (07/17/2006) as the start date of their project and they took about a month (~8/17/2006) to evaluate the frameworks, the versions available by 8/17/2006 are...

Dojo 0.3.1 released ~06/12/2006
Scriptaculous 1.6.2 release ~8/15/2006
DWR 1.1.3 released ~7/11/2006
YUI 0.11.2 released ~07/24/2006
GWT 1.1 RC1 released ~08/9/2006

Comparing what would have been available based upon the "guessed" start date of the project, there really isn't anything new or overtly glaring. Except maybe for DWR.

So people, when reading this article don't think of it as a review of what is available now but rather a case study/retrospective/white paper of what they did.

Anything but Yahoo UI! (1)

Sparr0 (451780) | more than 7 years ago | (#18966537)

I have had to butt heads with YUI on more than one occasion while working on Gallery2 (a php photo gallery system). It is evil in the worst ways. Often I will give up after chasing functionality through a dozen function calls and still be nowhere near the code that I need to find to decipher the undesirable behavior in question. I admit, opening a popup element with open_popup(x,y,source) might be a bit too much to ask, but when I get literally *TWELVE* levels deep in the function call list and still haven't found a single bit of code that actually DOES anything to the page, there is something wrong.

Goodie. (0)

Anonymous Coward | more than 7 years ago | (#18966653)

This will create more sites that are either nearly blank or completely nonfunctioning in my browser because I have javascript off by default. Unless the site looks like it'd *really* be worth it (it usually isn't), I quickly navigate away.

Please stop making the web something it wasn't meant to be with a bunch of hacks upon hacks. If it can't be done with XHTML+CSS (plus whatever server-side stuff you want, of course), forget it.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>