I want to get my feet wet with some Ajax programming. Should I start by using XMLHttpRequest directly? Or, which framework should I use, Prototype, jQuery, GWT, or something else? Wikipedia has a comparison of frameworks, but I thought I'd ask here first.
cnoocy: green a-e ligature (Default)

From: [personal profile] cnoocy


Start with XMLHttpRequest directly. Then switch to a framework once you have an app under your belt.

From: [identity profile] temvald.livejournal.com


I agree with the idea, but I'd say to start by using the basic methods in Prototype. They're really not all that far from using XMLHttpRequest itself (compared to something like GWT), and it means that you don't have to mess with the browser-specific implementations as much.

From: [identity profile] prog.livejournal.com


I agree with this. I started out in AJAX via Prototype, and it didn't make me stoopider.
cnoocy: green a-e ligature (Default)

From: [personal profile] cnoocy


How would you know? [ominous music]
More seriously, that seems fair to me. It's probably still worth glancing at the XMLHttpRequest techniques so you know what's actually going on inside Prototype.

From: [identity profile] prog.livejournal.com


I agree with this too. But I strongly recommend picking up Prototype when you're actually ready to lay down some code. Its ability to let you easily weave around cross-browser issues is alone worth the price of admission.

From: [identity profile] daerr.livejournal.com


I also agree that starting with Prototype is good and I started with XMLHttpRequest.

From: [identity profile] mattsnaps.livejournal.com


The comparison chart on Wikipedia seems pretty useless, unless you need a specific feature and want to learn quickly which frameworks support it. There's no row for "doesn't suck to program," for example.

I don't really have a comment on whether starting in prototype/whatever is better than starting out with raw XMLHttpRequest. I started out with this hunk of crap called xajax, and then switched my codebase over to prototype. I ended up debugging down to the level where the framework talked to the request object in both cases.

I do not know if I would have "learned faster" or whatever starting out at the lower level. Compared to 680x0 assembly it's all pretty high level, so I feel like I win anyway.

It is inexpensive to perform easy experiments with a few different frameworks.

From: [identity profile] ghudson.livejournal.com


Some UI-oriented developers at MIT did some comparisons and experiments with various toolkits and settled on jQuery. (It's worth noting that these people have no interest in Rails; Prototype tends to be more attractive to Rails developers.)

From: [identity profile] matthew.gray.org (from livejournal.com)


Depends on what you mean by "get my feet wet". If you really mean, just "see how it works" or "make a purely toy app", then use XMLHttpRequest to learn the underlying gunk. If you mean "write a simple but useful/real app", use Prototype or jQuery (I'd pick jQuery). If you mean "write a complex/real app that I will want to evolve and maintain going forward", use jQuery or GWT. But, GWT is really a whole different ball-o-wax and has some major advantages, but it's also got some issues. Script.aculo.us is also worth a look.

From: [identity profile] dougo.livejournal.com


It's a simple but useful/real app. No fancy UI stuff, just asynchronous POSTs and some dynamic rearrangement of content. What do you like about jQuery over Prototype?
.

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags