Sponsored by Best Buy
Best Buy Employees Turn Carolers For A Day view!
www.youtube.com/bestbuy - Go behind the scenes to see real employees croon their way to star in Best Buy's holiday campaign.
35 Comments
- positron, on 10/12/2007, -0/+26May work as an introduction to the uninitiated, but PLEASE do not copy this guys methods. Obtrusive javascript, bad exception handling, frames, browser checking, etc. This guy is encouraging bad coding habits. Marked inaccurate.
- JeremyBanks, on 10/12/2007, -1/+13The page's title is "So how do you code an AJAX Web Page?". It's using non-contextual tags, and it's using them in a location where they don't make any sense. That killed any credibility this article had for me. Marked as lame.
EDIT: Digg stips the HTML tags. It should be "So how [i]do[/i] you code an AJAX web page?", except with point-brackets instead. - leanweb, on 10/12/2007, -0/+9while offtopic (please do bury too deep, in case its helpful to someone), what i'd recommend is this.
firstly, start by learning the prototype.js library. there are other choices out there, but this particular library will get you up to speed on javascript (it is really a very elegant and robust language, you'll like it!).
prototype home: http://prototype.conio.net/
reference: http://www.sergiopereira.com/articles/prototype.js.html
a great lib for playing with learning your way around ajax is scriptaculous, available here: http://script.aculo.us/
another noteworthy library is "mochikit": http://www.mochikit.com/
see some very nice screencasts on their site.
hope this helps. - tkambler, on 10/12/2007, -0/+7For those that are interested, I have created a very simple PHP function that automatically builds the JavaScript necessary to build simple AJAX-enabled forms:
http://www.simplejax.com
I will make a free download available for Digg users for the next few hours:
http://www.mediajolt.com/files/sjdigg.zip - positron, on 10/12/2007, -0/+4I don't think jumping into using bloated libraries is a smart way to start your javascript career. It's better to get a grasp on how to do the things a library does using your own code before you go looking for shortcuts. Then again, I'm the unofficial president of the framework haters club.
- chesterjosiah, on 10/12/2007, -0/+2I do.
- radiofrequency, on 10/12/2007, -0/+2Nicely done!
- dasil003, on 10/12/2007, -1/+3To say nothing of the 5th-grade level prose. This is an excerpt from a published book? Where was the editor?
- aura, on 10/12/2007, -0/+2I saw italic tags in the title and I just stopped reading. (Plus I buried this story)
- thal3s, on 10/12/2007, -0/+2Worst. Code. Formatting. Ever.
- JMJimmy, on 10/12/2007, -0/+2Worst code formatting, the code doesn't support Firefox, HE'S USING FRAMES!
699 people digg a horrid example of coding.... sad sad sad.
All I have to say... prototype.js - kingyubba, on 10/12/2007, -0/+2awesome! what kind of license is this under? can we use simplejax commercially?
- tkambler, on 10/12/2007, -0/+2Feel free to use it in whatever way you see fit... However, if you do use it commercially, I'd really appreciate it if you'd purchase a copy. It's only $12.95. :)
- leanweb, on 10/12/2007, -1/+2i have to agree w/ positron, way too long. use of xslt is unwarranted (or at least debatable) javascript code is second rate. there was no need to dip into details of XML, which is neither required nor recommended for real-life ajax. i'm no linguist, but language and clarity of message are just sub-par.
point being, there's a lot of significantly better intro articles on ajax worthier of first page on digg.
no digg. - yahoofrom, on 10/12/2007, -0/+1I learned that I should never code like that.
- jasonsbytes, on 10/12/2007, -0/+1There's an online course for ajax that just started:
http://forums.theajaxworkshop.com
http://theajaxworkshop.com - JMJimmy, on 10/12/2007, -0/+1Ajax was a Greek warrior known for his speed - fitting. Though the other part of his storey, he killed himself because he didn't get some armour, is more disturbing. Lets hope AJAX doesn't need secuirty "armour" ;)
- JMJimmy, on 10/12/2007, -0/+1I'm with you on hating framworks but prototype.js is the one I make the exception for - personally I create my own code* but prototype.js helped me learn soooo much that you can get from the average seat of your pants coding. It's increadibly eligant, clean, easy to understand, just wonderful. I love that they seperate out each section of the code as well so you can learn what classes are used in what areas as not to overwhelm you with bloat.
*unique style of mysql grid layout created on the fly, filled in via ajax with self contained modules that load their resources through a mysql key structure - I'm quite proud of it - bpapa, on 10/12/2007, -3/+4agreed on the loss of credibility based on the poor title markup. i look for stuff like this to avoid having to waste my time reading a (probably) crappy article.
- JRBlack10, on 10/12/2007, -0/+0Or you could use M$'s Atlas framework and let Atlas handle all the Ajax the java-script client code. Quite sweet when used with Visual Studio .NET.
Just my 2 Cents, which will probably get pumped down for mentioning something other then PHP or Rails. - gameguy43, on 10/12/2007, -2/+2ok, we get it, the article sucks. i got excited by the title though, i am a skilled web programmer (php and xhtml, not a lot of jscript) and i want a good article on how to start getting into ajax. can anyone recommend?
- ojk007, on 10/12/2007, -2/+2@spammersux
sure spammers suck but what your doin is just as low as them. think about it, you push up hosting cost somewhere they'll eventually get higher and higher - leanweb, on 10/12/2007, -0/+0@positron:
use libraries or write your own, either can be argued under circumstances, but for learning new stuff reading good code is tough to beat. learning by example is programmer's way of street smarts. which beats book smarts any day with eyes closed. - Nick22, on 10/12/2007, -3/+2Well, he is a good writer, il give him that. And I was wondering about the tags in the title...And I was sceptical when i saw internet explorer stuff in the code
I stopped reading as soon as I saw "new ActiveXObject" - Yorn, on 10/12/2007, -3/+2ZK is going to negate the need for directly coding AJAX anymore anyway:
http://sourceforge.net/projects/zk1/
Why bother with compatability and coding the horrendous JS when you don't have to? essentially we're going to end up with just two web programming languages, ZK for the interface/look, and either php/python/ruby for the backend and database related stuff.
My money is on perl6 ending up usurping them all since it will basically be able to run any current code (with a translation file) written in php/python/ruby anyway. - SteveyDevey, on 10/12/2007, -1/+0Ajax (not AJAX) is not an acronym.
"Garrett: I thought of Ajax as a convenient [term]. It was never intended as an acronym. "
http://www.gcn.com/blogs/tech/41547.html - fatdog789, on 10/12/2007, -3/+2I must say this:
DUPE, if only because this same article appeared on the frontpage yesterday.
Plus, the tutorials here are god awful. - moshisushi, on 10/12/2007, -3/+2I use the zXml "library" for all the Ajax init stuff. It's cross platform/browser and has worked quite well so far (except in Safari, but who gives a...). Grab it here:
http://www.nczonline.net/downloads/zXml.zip - gspeed, on 10/12/2007, -3/+1php ... blah.
- DankLogic, on 10/12/2007, -3/+1How do you code an AJAX web page?
Learn Ruby on Rails. - carguy84, on 10/12/2007, -3/+1me neither, I'm not a big fan of the extra processing required.
- i440, on 10/12/2007, -7/+2So who here actually uses XML in their AJAX?
Not mee. :D - inactive, on 10/12/2007, -12/+5It says AJAX in the title! Must digg...
- swisstone, on 10/12/2007, -8/+1Not really a programmer then are you...
- inactive, on 10/12/2007, -32/+1but if you hate AJAX, click this - http://www.mybidlist.com/167
What is Digg?