Language Soup
I’ve been boning up on AJAX. Until a couple days ago it was really just a vague concept for me. Now it’s a slightly less vague concept.
For those of you who don’t know what AJAX is, it’s a term for a combination of things like XHTML, Javascript, XML, style sheets, etc. And it often involves back-end databases. It’s pretty complex, at least for me. The big downside is that when something goes wrong it can be a bitch to track down the culprit.
If you’ve used gmail, then you’ve used an AJAX app.
Basically, I’m working on a rating system for Flapping Crane. I want a rating system like NetFlix or digg. I don’t want messy reloading pages and crap like that. So that a person can watch a skit and vote for it while they’re watching it, without interrupting the movie or opening a new window. And they could change their vote at any time. Probably on a 5-star scale or something.
I’ve got the basic parts in place. I’ve got a page where you can vote for a hypothetical skit. You get immediate feedback (an average of all votes), without reloading the page. It just stores numbers in a database, really. It doesn’t do anything like check if the person has voted before or anything.
I’ve also put together a neat little page that lets you load up and watch skits without reloading the page.
Keep in mind I’m not using some fancy robust libraries or anything. We’re talking 50 lines or so of javascript and about 35 lines of PHP. Nothing fancy. That will probably balloon as I add authentication (of sorts) and functionality. And I’m not the world’s best coder, so it will probably be a little buggy for a while.
Or maybe I will just use one of those libraries (from google or yahoo or something). But I haven’t come across one that’s all that well-documented yet, and I get irritated quickly with huge undocumented libraries. Besides, it’s sometimes better to start from scratch, if just to get an idea of how the hell things work.
Sorry to those of you who don’t like when I write about this stuff. I’m sure Scooter understands this shit way more than I do. I’m so rusty with javascript and the DOM that I’ve practically had to relearn it all. Luckily, I’m relatively competent in PHP, CSS, XHTML and SQL. Otherwise I wouldn’t have a freakin clue.
February 16th, 2006 at 12:17 pm
I don’t actually use AJAX much at the moment because my code base is so old, so we can only put it on new features. But my name is on a patent that uses AJAX’s granddaddy. Mostly I’ve been waiting out MS because they’ll have an AJAX helper library later that will shoehorn nicely with .NET 2.0. I realize that sounds horrible to anyone who loves open source, but we like it.