Microformats and jQuery
June 20, 2008
I’ve been reading a book on Microformats, written by John Allsop. I’m not very far into the book yet, but so far it sounds very interesting.
I’ve read a fair bit about Microformats in many blog posts, and the microformats website itself is very informative. While I understand and appreciate that microformats are important for the greater good of the internet infrastructure, as a business owner and manager of the development team, I’ve been struggling to find a business proposition as to why we should start using them in our website development.
I assumed they would make coding more complex and perhaps increase client budgets (through development time) for no real gain for the client. I’m still tossing around the idea in my head, of how can the client really benefit from the use of microformats on their website.So I decided to play with a few microformats and dreamed up a hCard and jQuery combination (or mashup?).
Using jQuery it was really easy to dig into the body of the page and pull out address information, which is exactly what microformats are all about, creating markup that firstly humans can read and second computers can read.
Once you have the data using jQuery, your imagination is the limit really. I came up with a few trivial examples. The first example demostrates mining for the address and simply linking it to maps.google.com.au. The second example mines for the addresses and then as you click on them, plots them on a Google Map. I was amazed at how quickly and easy it was to program these examples using jQuery.
With this expirmentation I’ve found the business proposition and argument as to why we should start programming using microformats where possible; they make development easier and faster all the while increasing the infrastructure of the web!
You can download the source for the microformat and jQuery examples.
Tree Inspector, Version 0.3
June 4, 2008
I’m at it again! We had another tree problem the other day which I was involved in fixing. However, this wasn’t a standard sized tree, it was huge!
I whipped out the tree inspector and starting working away on the tree. Everything was going smoothly, but with such a large tree and so many levels deep, it became really confusing, really fast!
I’ve updated the tree inspector with +, - and | placed strategically so it looks a little more like the trees as displayed in Explorer (on Windows). I will update this to use images at some point, but I didn’t want to make the distribution of the tree inspector hard (at the moment it is one file, and nice and easy to install). I’ll look into embedding images into the HTML using base64 encoding.
I’ve also encountered a seemingly common problem with the basic HTTP authentication that I added in the last version. On a couple of windows based servers the basic http controlled authentication (using the WWW-Authenticate header) wasn’t working properly (better described here).
If you’re working with a shared host, this is not always so easy to fix. In this instance, it was easier to comment the authentication code out of the script, upload, use it and then delete the file. I decided to make it easier to disable the authentication, and now you can turn it on or off by changing the bUseAuthentication variable at the top of the script.
Happy tree fixing.
