Reply LinkBack Thread Tools Search this Thread
Old 17-01-2007, 09:51   #1 (permalink)
dtrenz
blam blam
 
dtrenz's Avatar
 
Join Date: Aug 2006
Location: ann arbor, mi usa
Posts: 527
AJAX developers (of any experience level)

I notice that a lot of developers out there seem to use AJAX javascript frameworks, like prototype, or google.

does anyone just use plain javascript with a XMLHttpRequest object anymore?

or does everyone build on top of a framework these days?
  Reply With Quote
Old 17-01-2007, 10:05   #2 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,512
use http://jquery.com/, it's just so painless.

Example: Save some data to the server and notify the user once its complete.

Code:
$.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } });
__________________
  Reply With Quote
Old 17-01-2007, 10:21   #3 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
Aye, jquery is the nuts
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 17-01-2007, 10:22   #4 (permalink)
dtrenz
blam blam
 
dtrenz's Avatar
 
Join Date: Aug 2006
Location: ann arbor, mi usa
Posts: 527
yeah, but i could write the ajax back-end for that class in about 5 minutes. so i'd rather do it myself.

it's nice to have a wrapper for the XMLHttp call, but is it neccessary to uild on top of an entire framework?

i'm just wondering if there is something i'm missing.

it just gets a bit messy... if you want to use script.aculo.us you need to download that js, and it requires that you have protoype installed...

i just don't like building on top of tons of code i did not write. could make for a debug nightmare.
  Reply With Quote
Old 17-01-2007, 10:31   #5 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,512
we can all write the code ourselves. the point is you use a standardised (and tested) framework to take the pain out of not only Ajax, but lots of other commonly-used javascript.
__________________
  Reply With Quote
Old 17-01-2007, 10:36   #6 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
I think it's far better to start using a framework after you've learned how to write javascript anyway. That way you appreciate how much easier it makes things.

And in jQuery, the fact you have so much less code, actually makes maintenance much easier. I've been back to old projects and it's taken a fair while to get my head round what I've done. I just don't get that with jQuery.
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 17-01-2007, 14:08   #7 (permalink)
dtrenz
blam blam
 
dtrenz's Avatar
 
Join Date: Aug 2006
Location: ann arbor, mi usa
Posts: 527
but most of the time you end up with more custom classes and functions than you'll ever need. also, jQuery is inventing syntax all of it's on, isn't it? could be misleading, since it's not really javascript.

i just wrote a super simple ajax wrapper class that works just like jQuery, but without custom syntax. if anybody wants to see/use it, i'd be happy to post it. then you can all call me a moron.
  Reply With Quote
Old 18-01-2007, 03:39   #8 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
I'd like to see that (and call you a moron)
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 19-01-2007, 23:59   #9 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
I'd love to also, even if I don't know what a moron is.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 24-01-2007, 16:43   #10 (permalink)
combat sheep
Trained to Kill.
 
combat sheep's Avatar
 
Join Date: Oct 2006
Location: Southport, UK
Posts: 307
Send a message via MSN to combat sheep
jquery is cool like school
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8