Coding with Jesse

What about application/xhtml+xml?

It turns out I wasn't done last week when I switched the site over to XHTML 1.1. It turns out that according to the W3C, text/html is not an allowed type for XHTML 1.1. And the type application/xhtml+xml brings with it a number of concerns. The biggest concern is that Internet Explorer doesn't support this type.

I found this great guide which suggested giving Internet Explorer XHTML 1.0 Strict while browsers that support application/xhtml+xml can be server XHTML 1.1. I went ahead and did this. I had to do the following:

  1. I inspect the HTTP_ACCEPT variable, if available, to see if application/xhtml+xml is accepted.
  2. The <?xml version="1.0"?> tag is added for 1.1
  3. The appropriate <!DOCTYPE> is displayed.
  4. The <html> tag has a lang attribute for 1.0
  5. Style sheets are served using <link> for 1.0, <?xml-stylesheet?> for 1.1.
  6. Style sheet needed to be modified to give the html element a background colour.

That's all I needed to do. There are other things that may need to be done, for example changes to DOM Scripting. I feel better knowing that I can support the cutting edge, while still supporting older browsers that are behind the times.

Published on April 25th, 2005. © Jesse Skinner

This site is valid XHTML 1.1

That's right, I've updated this site so it is now valid XHTML 1.1. It was previously XHTML 1.0 Strict. So what did I have to change?

  1. I changed the DOCTYPE tag to:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. I had to remove the "lang" attribute from the <html> tag. Now, only the xml:lang attribute is allowed.

That's it! Not too bad at all. I was also looking at what's coming in XHTML 2.0. I really like what I see. The downside is that XHTML 2.0 will not be backwards-compatible. The upside is, from what I can tell, it won't be very difficult to port an XHTML 1.x page to XHTML 2.0.

It looks like most web pages will only need to worry about a few things like the elimination of the <img> tag (this won't matter to those using CSS to add images), and the replacement of h1-h6 tags with a single <h> tag. However, it seems that pages with lots of JavaScript forms will need to have a major rework: HTML forms are replaced with XForms, JavaScript Events with XML Events. I guess we'll need to wait and see what the final specification has to say.

Published on April 21st, 2005. © Jesse Skinner

XAMPP Review

I installed XAMPP Version 1.4.13 on Windows XP. The first thing that impressed me about XAMPP was that the installation didn't require a reboot. Every other lazy program seems to need a reboot after installation, but this one doesn't. And it's server software!

XAMPP is started in a console window. This way it's not running when you don't need it. When you first view localhost in the browser, there is an interface to let you test your installation and view demo applications. There are also links to phpMyAdmin, so it's easy to go in and start setting up your database. I'm also impressed at the performance. My laptop didn't seem to mind running the server.

If you're doing PHP and MySQL development, try this out. It's only 25 megs, it takes no time to get up and running, and its easy to uninstall -- just delete the folder. You have nothing to lose.

Published on April 20th, 2005. © Jesse Skinner

XAMPP

Though it came out a few years ago, I just heard about XAMPP, a free package combining PHP, Perl, MySQL and Apache. It comes with PHPMyAdmin, FileZilla FTP Server, Webalizer and lots more.

The best part is, it's designed to be run on development computers. It installs into a single directory, and makes no changes to the registry or anything. It's perfect. I'm really impressed that this exists. I've always avoided working locally on my desktop, but now I'm going to give it a try.

Published on April 20th, 2005. © Jesse Skinner

What is Ajax really?

There has been quite a bit of buzz surrounding Ajax lately, even some coverage in the Wall Street Journal. So what is Ajax? A software package? A programming language? A dutch soccer team?

Ajax stands for Asynchronous JavaScript And XML. It's a buzzword to refer to using DOM Scripting and JavaScript Remote Scripting to build interactive web applications. Until now, the concept behind writing web applications was to let the server code produce HTML and send it to the browser. Now, for some reason, everyone is starting to realise that a lot can be done with JavaScript, HTML and CSS.

A web page sitting in a browser can act much like any program on your computer, and often even better. Look at Google Maps. Accessing a large database over the internet is a great idea. Keyhole does this on the desktop too, but Google Maps might be even easier to use than Keyhole itself.

I think there's a lot more that can happen here beyond the benefits of retrieving data. Forms can be submitted to a hidden IFrame, allowing the web page to add records to the database. Or with Google Suggest, even the interaction with form elements can be enriched.

If we start thinking about web applications as full-blown applications, we can see other areas that aren't being utilized. For example, a web browser is capable of handling all the events a desktop application uses such as the dragging Google Maps uses, or the keyboard interaction CSS Zen Garden uses. Also, Flash can be used for some complex interactive pieces (such as a Calendar) and talk back and forth with the web page and the server using JavaScript.

It's time to take a look at the web applications we have around now and figure out how Ajax can be used to improve them. This'll be a major turn in what the Internet has to offer. It turns out standard web technologies achieve what Flash and Java have done, but with much smaller file sizes. I really think this is the color-television revolution of the internet.

Published on April 10th, 2005. © Jesse Skinner

First Post

Hello there. We are living in a very exciting time. For the first time in human history, the entire earth is connected. We have the ability to share anything with anyone at anytime, easily and inexpensively. We face enormous potential with this technology, and we haven't begun to realise the full implications.

There are some amazing applications of the Internet that are just starting to emerge, some that have become very widespread. In the first days of the Internet, web pages seemed to be the ultimate purpose. Next came peer-to-peer file sharing. Now, we are starting to see a new generation of web applications, more powerful than today's desktop applications. What comes next is anybody's guess.

Published on April 5th, 2005. © Jesse Skinner