MarkKawakami.com

“A casual relationship with reality”

Ajax: The web's Next Big Thing

I'm about to get technical on your ass. If you found my political posts boring, you ain't seen nothing yet.

Ajax refers to "Asynchronous Javascript + XML", which is an evolving new way for dynamic web pages to process information and provide a richer and less intrusive experience to users. The name might be too-clever, but the technology isn't.

Now, I just about never Merrill Edge refer to things as "the next big thing" because for the most part, most things aren't, they're just hype and moments away from fizzling out. That's what I thought about "Push Technology", VRML, social networking sites, B2B, etc., and I've usually been right.

Of course, I've also been pretty wrong too. Peer-to-Peer filesharing and, ironically, blogging are both things that I dismissively said "yeah, right" to and look at it now. At any rate, when I say "the next big thing", I'm not kidding.

But none of that tells you what Ajax is. Simply put, it's a way for a web page to use Javascript to send and receive complex olymptrade review information without users leaving the page that they're on. This might not sound like a big or impressive innovation, but really it is. Up until very recently, the only way for a web browser to communicate required loading a new page. For instance, you type something into a search box, click a button, and a new web page comes back with your search results. Then you click on a link to get details about one of the search results and that takes you to another page. Because of the nature of the web's architecture, this request-response loop was pretty much required to interact with data hosted on the web. Ajax changes all that.

You want to see it in action before I get into how it works? Here are some examples:

  1. Zip Codes: A simple example. Enter a zipcode in the zipcode box. The page will automagically retrieve the city and state for that zip (a feature I wish every order form everywhere had right now).
  2. Google Suggest: Start typing in a search term, and Google will make suggestions about what you're typing. For instance, just try typing "Abra" as if you were going to search for "Abraham Lincoln".*
  3. A9.com: Amazon.com's new search engine. After you do a search, notice the buttons to the right of the page. They bring up results for different types of searches, like images, books, movies, etc. This happens without the page reloading. It's really very cool.

Like I said, Ajax uses Javascript to send read more and receive information. That's a requirement for any of this to work. But generally it will also use XML as the medium for receiving information. This allows the web browser to be able to easily parse and use the information it retrieves. It can do all this because of the XMLHTTPRequest object, which is a Javascript object that can send and retrieve information. The XMLHTTPRequest object is a few years old, but only in the last year has the amount of browsers that support it reached the critical mass necessary for it to work on a large scale. As of this writing, Internet Explorer 6, Firefox and other Mozilla based browsers, Safari and Opera all support the object, though in keeping with Microsoft's hostility to open standards, IE implements it in a proprietary manner. But IE's method is similar enough that it's trivial to write cross-browser code. The decline of earlier versions of IE and the rise of Firefox and Safari are the reasons that the browser landscape has changed enough.

Another piece of the puzzle is an embrace of web standards. In order to be able to display new information, the web browser has to be able to modify the underlying structure of the webpage itself. In earlier days when table-based markup, font tags and spacer gifs dominated the land, the complexity of altering a web page dynamically was itself a barrier to the sort of things Ajax can do. But now that good, structured, semantically meaningful markup is becoming the norm for forward thinking programmers, radical changes to a web page can be made with very little effort. Clean code allows the programmer to easily manipulate the DOM, and modern methods for doing that manipulation are much more direct and efficient than older ways that employed such ghetto tactics as "document.write()".

It's really very, very cool technology, and the sort of thing that frustrated web developers like me have been waiting for. The two biggest barriers to the widespread adoption of any new web technology have always been browser support and user acceptance. CSS, for instance, was held back years because of the vastly different and often very buggy implementations of it in the major browsers. Flash, on the other hand, is implemented more or less the same across browsers, but it took years for it to be commonplace because it required the user to download and install a plug-in. And Flash is one of very few plug-in technologies that survived the test of user apathy (literally hundreds of others have fallen by the wayside). But serendipitously, Ajax has managed to sidestep both of these issues. It requires virtually no action on the part of the user except for the use of a modern web browser. And across the span of web browsers, it's implemented in a consistent enough fashion to be actually usable. All of this came about because the browsers that people use have quietly but dramatically changed over the last two years, despite the browser wars being "over".

So, over the next 12 months, I expect to see really neat magic tricks happening with this technology. Most users won't even know it's being employed, they'll simply notice that web pages just seem to "work" better. Surfing the web will be a little more like using a desktop application, doing complex things will be faster and easier, and they'll spend less time waiting for pages to load. But for the people who actually have to program this stuff, it's a breath of fresh air.

* Yes... Google again. Actually Google is quite an innovator here. Google Maps, Gmail and other new Google products are using Ajax to one degree or another. In the case of Maps and Gmail, they're basing the entire application on it, and the ways they are able to use it are simply jaw-dropping. And that's what I mean when I say Google is a leader. If it weren't for Google showing showing the rest of us that this stuff is ready for prime-time, most web developers, myself included, wouldn't trust this technology. I said it before, as Google goes, so goes the internet.

A Slave to Television

Regular readers probably have the idea that I might watch too much television. You're right. It's actually kind of pathetic how I spend my week looking forward to "The O.C.", even when they don't have lesbian plotlines. Or that I spent quite a bit of thought trying to decide which two of three Monday night shows, "Las Vegas", "24" and "Everwood", I would watch ("Everwood" lost). Or how relieved I was that Luke and Lorelai got back together on "Gilmore Girls".

Don't judge me. Just be relieved I've got the good sense to stay away from "Wife Swap", "Extreme Makeover: Home Edition" and never fell under the spell of "Law & Order".

Ah, but March is rolling around, and that means it's time for cable to restart some shows in the post-sweeps haze, two of which I'm really looking forward to. That begins this Sunday with the second season premiere of HBO's "Deadwood", which is a hell of a good show. "Deadwood" got seriously Emmy-screwed when Ian McShane didn't get a nomination for his amazing performance as the profane and brutal Al Swearengen, although, Brad Dourif did get nominated as Doc Cochran.

The latest "Entertainment Weekly" has an interesting article on "Deadwood". The most interesting I learned is that the showrunner and head-writer for "Deadwood", David Milch, regularly writes the day before shooting, and that he doesn't make long-range character or story arcs up ahead of time. I'm amazed that on a show that complex, with such richly drawn characters and such involved plotlines is made up almost on-the-spot. I'm even more amazed that he can single-handedly write Alma Garret's erudite,restrained, nuanced dialogue and Swearengen's tough, funny, blunt dialogue without spending hours pouring over each line.

Ah, but does he? According to the TVTome.com Deadwood page, Milch is credited as writer on only one episode. Now, generally the way the writing process on television works is that the core team of writers all collaborate on each episode, pitching ideas and breaking down the storylines, and various writers will take various parts and write them themselves. Presumably the credited writer is the one who takes the overall rein for making sure that it works as a cohesive whole and probably writes at least the A storyline. Of course a lot of that is the showrunner's job as well. At any rate, even though a lot of the "EW" article is probably more hype than journalism, it's still surprising to whatever degree it's true.

The other returning show I'm really excited about is FX's "The Shield", which will return for its fourth season on March 15th (the same day "The Incredibles" comes out on DVD). Here's another show that got rogered when the Emmy noms were announced. I just got the third season on DVD, and amongst the special features is a little documentary on the "breaking" of the season finale ("breaking" as in breaking down the story). It's a really fascinating look into the process of writing an episode. Most "Making of" docs focus on the actual production of the show or movie and don't look at the writing process, but, especially on television, the collaborative and pressure-filled schedule is actually very interesting. And the DVDs also made me notice something about the titling of season three's episodes. Many of the episodes are poker terms. These include (in order) "Playing Tight", "Streaks and Tips", "All In" and "On Tilt". Cool. Anyhow, I've really enjoyed all three seasons of "The Shield" and I've been pretty impatient for the fourth to roll around, so I'm really happy that it's almost here.

Incidentally, I posted about the return of both of these shows about six weeks ago. So, yes, I'm kind of repeating myself here. But this is the better post anyway, even if it does sort of ramble and run out of steam at the end. Brevity was never my strong suit.

The "Million Dollar Baby" that almost was

"Million Dollar Baby" wins best picture. Sweet. But I did lose the office Oscar pool, and lost it by one point. Man, so close, but at least a really great movie won. However, reading an article in the L.A. Times the day after the Oscars, it turns out that "Million Dollar Baby" was almost not so good. The script for "Baby" was kicked around the Hollywood system for years and years, as often happens. Before Hillary Swank was brought on, one of the actresses considered for her role was, believe it or not, Sandra Bullock.

Wow, that would have made it a different movie entirely. Even if you like Sandra Bullock, there's no way in a million years she would ever have been right for the role. But that's not even the worst idea they had for casting this movie. That honor would have to go the idea of giving Clint Eastwood's role to... wait for it... Arnold Schwarzeneggar.

The Governator.

Kindergarten Cop.

I can't get the image out of my head of the trainwreck this Schwarzeneggar/Bullock fiasco this movie almost was. Just horrifying. It probably a lot more unintentionally funny though. Thank you, Clint, for rescuing a good script from people that really shouldn't be trusted with good scripts.

Congrats, Clint

So, not only did Clint Eastwood win the Oscar for Best Director, "Million Dollar Baby" won best picture. Being a big fan of the movie, I'm really happy for him. I never did get around to seeing "The Aviator", but the number of nominations made it the favorite, so this is kind of a surprising win.

But wouldn't you know it, there is a selfish downside for me for this win. I had "The Aviator" for Best Picture in the office Oscar pool. And I figured this one was a lock. Whatev. Getting one wrong wouldn't kill me except that I blindly followed Entertainment Weekly's advice for a lot of the smaller awards, and for a lot of them, they weren't even close. I mean, not even their second place picks won. How hard is it to correctly call the sound categories? Way off on both of them, and one of them only had three choices. And they totally called Best Song wrong, not even close on Documentary Short Subject... Come on, guys, I have money riding on this. Five bucks, but money nonetheless. Also, I completely miscalled Editing, because I really, really liked "Collateral".

Anyhow I'm 16 for 24, not too bad, but I don't think I'm gonna break my streak of never winning this thing.

Also, my secret theory that reclusive screenwriter Charlie Kauffman is actually the alter ego of Spike Jonze is pretty much totally blown now that he's won and accepted in person. Which is a shame, because that's totally something Spike Jonze would do.

[update: I almost forgot, "Ryan", which won for Best Animated Short, is available to available to view online from the Canadian Film Board. It's an excellent and somewhat disturbing piece of animation, you should definitely check it out.]

movie: is so cool

What the hell, another Google related post?

Well, yeah, but it's not my fault that Google keeps releasing such cool stuff. And besides, it's Oscar Day, practically an officially holiday in Southern California, so this post is appropriate.

Anyhow, Google has just released a new way to search for movie reviews and showtimes, and it couldn't be simpler to use. Just type "movie: " before a search term, and Google will perform a movie-based search. For instance, typing "movie: 91505" into Google gets a listing of all the theaters near the 91505 zipcode, with listings of the movies they're showing, the showtimes for today, and a star-based average of the reviews for that movie. Super-cool.

But, wait, it gets better. If you type "movie: million dollar baby burbank, ca" you get the listings for "Million Dollar Baby" in Burbank.

But wait, it gets better still. Try typing "movie: clint eastwood boxing" and you get a list of movies fitting that, with "Million Dollar Baby" at the top of the list. That's right, you don't even have to know the name of the movie. You can type just the stars of the movie ("movie: clint eastwood hillary swank") or a description of the movie ("movie: computer animated superhero") or even an idea of a movie you're in the mood for ("movie: tasteless comedy").

And I mentioned it briefly, but Google averages out the reviews it has indexed into a star-based review. You can click on the movie to get a list of reviews, you can sort the reviews by date, rating, relevance. Google is essentially doing the same thing Metacritic and RottenTomatoes.com do, but much faster and easier (and with a wider selection of reviews). Yes, it still doesn't validate, they've got room to improve, but as a useful tool, it's really great technology they've got. And not that I ever would, but it's a great way to cheat at the Six Degrees game.

Damn Popups

One of the great things about moving from Internet Explorer to newer browsers (Safari, in my case, Firefox also) is that pop-up blockers are built in. Finally, I could visit popup heavy sites (like LATimes.com) in peace. But dammnit, the popup advertisers, probably as a result of the growth of Firefox and Microsoft's latest updates to IE, have created new popup ads that circumvent the blocking. I haven't done too much investigating into how they're doing this, although the main technique seems to be executing javascript as the page loads rather than during the onload event.

At any rate, it's really irritating. We finally had popup ads under control, and it was sooooo nice not to have to deal with that crap. But they're coming back, more and more. This seems to be new, I've only started seeing it in the last couple of months, but I'm seeing it more often with each day, and pretty soon we'll be back to the days of not being able to surf without ads popping up.

What bothers me the most about them is I can't imagine for the life of me that popup advertising is more effective than other forms of internet advertising. When I get one I automatically close it without even reading it. Banner ads and Google's ads are far more likely to get my attention, and when they fit something I'm interested in, I do follow them. But popups are just a nuisance, like a fly that won't leave your apartment.

So hopefully the browser makers will make more effective popup blocking. I think the rule has to be that the only way to open a new window is through javascript that executes in response to an "onclick" event or clicking on a link that executes javascript. Anything that happens during an "onload" event or executed during the runtime execution of javascript while the page is loading, or responding to mousemove events should not be allowed to open new windows. This should solve all methods of popup advertising, while still preserving the power of javascript-opened windows in response to conscious actions on the part of the user.

My prediction is that Firefox and other Mozilla based browsers will be first out of the gate with improved popup blocking, Safari and Opera next, IE last (if at all). Hopefully we'll see updates soon.

Sorry for the misunderstanding

OK, so tonight I was out playing pool with Jason, Dylan and Dylan's very nice girldfriend Rosa. And a couple of tables over was this girl with this guy, and I swear to God she looked very familiar. But not the familiar where I think I actually know her (although it very well could be, I have a horrible memory for faces) but rather the sort of familiar like I've seen her on TV. So all night I'm mildly obsessed with where have I seen here before. I pretty much convinced myself that she was on some WB sitcom I don't watch or something along those lines.

So, as we're settling up the bill, I ask our waitress "see that girl over there? She looks so familiar, have I seen her before?"

And she says, "she's from Sacramento, she's my sister-in-law. That guy is my brother."

Oh, great. Boy do I feel like an asshole. Look, I wasn't trying to hit on your brother's wife. She genuinely looked familiar to me. Trust me, it wasn't an attraction thing, I'm not trying to break up a little happy marriage or anything. If anything, the girl I was interested in is Sarah, the hot waitress whose section we weren't in tonight (and that's quite the bummer). So, sorry for the confusion, I'm not trying to be Mark the homewrecker or anything. It was a genuinely innocent question.

On the upside, my pool skills, which should really be improving by now, were actually pretty good for a twenty minute period. But two Newcastle's later and I'm back to my old normal self.

Save "Arrested Development"

You just can't trust Fox with a good TV show.

They cancelled "Firefly" after 11 episodes, leaving four unaired.

They cancelled "Wonderfalls" after just four episodes, leaving nine unaired.

"Arrested Development" now seems to be in danger, too. "Arrested Development" has been sort of the miracle baby of Fox. Thanks to incredible critical support (plus a very devoted fan base), it got renewed for a second season despite not the highest ratings. In any just world, this show would be number one. It's, by far, the funniest show on network television.

This fall, they were rewarded with five Emmy wins, and just recently a Golden Globe for Jason Bateman. See? Everyone knows this show is fantastic. It's the most original network comedy since "Seinfeld"

However, Fox has decided to reduce their order for this second season from 22 to 18 episodes, which is never, ever a good sign. An order reduction is the first step to cancellation. This also sucks because it means "AD" has to sit out May sweeps. At least they won't make us wait a month for the season finale like they did last year, but that's hardly a consolation if the result is less "Arrested Development".

And for some reason, Fox has decided to replace it with "American Dad", whose pilot aired after the Superbowl last week. And the pilot was really nothing to write home about. I don't even understand the thinking here. "American Dad" is a less-good offshoot of "Family Guy", another show Fox cancelled early despite having a very loyal following (I wasn't the fan others were, but still it made me laugh a lot). Why would you replace one show with the lesser ghost of another show you cancelled? Is this what they teach people in Hollywood Executive school?

Anyhow, there's a petition in place to save "Arrested Development". Please sign it. I know this is the second petition I've asked you to sign in like three days, but hey, as Buster Keaton once said, "Comedy is a serious business". And, of course, if you're not already, start watching it (Sundays at 8:30pm). It's important because there is no justice in this world when the network that aired "The Littlest Groom" and "Who's Your Daddy?" cancels something like "Arrested Development".

Help me help Google help us

So, since I don't think anyone at Google is actually going to read my open letter to them because I don't get anywhere near the traffic to be on anyone's radar that doesn't already know me. So, that's why I started an online petition asking Google to recode their homepage for validation. I'm going to see if I can get some of the bigger sites in the web standards community to mention this also, but if you'd please take the time to read (and hopefully sign) the petition, I'd really appreciate it.

I know most of the readers of this blog don't particularly care one way or the other about web standards, and you shouldn't have to. But believe me, this stuff matters in the long run and the more big-name sites that are authored properly, the better it is for the internet as a whole.

Anyhow, please feel free to read the petition here, and pass it on if you know anyone you think might care.

Giving Mapquest the Finger

OK, yeah, I bagged on Google about not validating, and I will again in just a moment. But let's remember that Google continues to kick some serious ass. And right now, they're kicking the ass of Mapquest.

Yesterday, Google released Google Maps, and it's jaw-droppingly good. Unfortunately, at the moment you need either Internet Explorer for Windows or a Mozilla based browser like Firefox, Netscape 7.1+, Mozilla, etc. This leaves out Apple's Safari, but support for that should be added before too long I imagine (a similar thing happend with Gmail*).

So what makes Google Maps so cool? Well, first of all, it's very pretty. The maps just plain look better than they do at Mapquest, and they resize to fit your browser window, which means not having to deal with Mapquests tiny little maps.But behind the beauty is an amazing interface. The maps scroll so you can drag them around. By clicking on the "Local Search" link, you can search for "sushi" in "Burbank, CA" and a map will appear with a bunch of sushi places marked. First thing to notice, the marks are very pretty, with drop shadows (very cool). Click on one of the marks and a little balloon pops up with the name of the business, the address, and links to get directions to and from there.

And getting directions to and from is very nice as well. The map has the route clearly marked out, and you can click on each of the steps and a balloon with a close-up of that part appears.

Really, words don't do justice to just how great this is, you have to play with it to see it. Everyone who I've shown it to has had to pick their jaws up off the floor. It's an amazing piece of programming and a lot of it had me scratching my head wondering "how did they do that?".

There is a little disappointment with the directions though. They don't really always give you the best directions to a given destination. For instance, from my house to my work, they recommend getting on the 101. In actual practice, this is the lamest way to get there. I'm not worried about this. Gmail has made a lot of improvements to its service since Google originally launched it, and I think the same will occur here. What I'd really like to see, and so far as I know, no online map service offers, would be for them to ask two additional questions when getting directions. The first would be what time you wanted to leave or arrive, and the second would be whether you'd be carpooling. With these two questions, they could determine that a route that may be longer would actually be faster because of being able to use the carpool lane or stay off the freeways in rush hour.

At any rate, it's still really incredibly sweet. Definitely check it out.

* Incidentally, I have like 50 gmail invitations if anyone wants them. Gmail offers 1GB of storage and the ability to google your email, which is pretty handy. And it's free.

Blog Roll