Being eager to jump all over any new buzzword that comes along, I decided to look into AJAX web programming. AJAX allows web pages to load data from the server without having to refreshing the page. This sounds unexciting, but it opens the door to creating dynamic web applications, without the necessity of additional plugins. One example you’ve probably used is Google Maps.
My first thought was to create an auto-suggest dictionary that gives suggestions as you type, but I found it had already been done.
I thought maybe a spell check for text input boxes that mark errors as you type, similar to a word processor. It would be something any web site could incorporate to replace their boring old-fashioned input boxes, but I found it too had already been done.
I settled on a song lyrics page that would suggest songs or artists as you type. So, for example, if you were looking for “Stairway to Heaven”, you could just type “sta”, then pick “Stairway to Heaven” from the drop-down list.
I found an FTP site that had about 45,000 old song lyrics. The lyrics were at least 8 years old. It would have been cool to have newer songs, but it’s just a programming exercise.
Since I didn’t want to spend a lot of time on design, I downloaded an open source web page template.
Oh yeah, I also had to learn AJAX. For that I used IBM’s wonderful 5 part series on AJAX programming. After reading the tutorial, it just seemed so easy. I felt like Doctor McCoy when he’s wearing “The Teacher”.
So I created the page.
As an afterthought I added a tree type browse function. Instead of re-inventing the wheel on that, I used Zapatec’s Freebie Javascript tree library, then added the AJAX components.
I also added a search engine, so you can search through the actual lyrics, rather than just the Titles and Artists.
To serve the page, I downloaded the world’s smallest web server - only 53k! I’m hosting it on my cable line, so I don’t know how it’s going to hold up.
Here’s the page. Tell me what you think.
Note, I pretty much gave up on supporting any other browsers other than IE and Firefox.
