TTIW Development Blog

I finally did my hCard App. You can see it here...
Source code can be accessed here, though it's totally alpha.

Anyhow, I'm not reading the microformats list anymore, I'm on complete leave from the net. But since I have given some thought to the whole thing, here are some recomendations:

  1. I understand that microformats are supposed to be loose. But a little structure is needed when parsing. Remember that parsing can be done in 2 ways. DOM like or SAX like. DOM like requires a full representation in memory of the data structure (which is the reason why it is not generally used in server side processing, since it's resource intensive, even though it is what is used on the client). SAX like is done node by node and triggering actions on events (which is what is generally done on the server) (XSLT is probably something in the middle.. I have experience with it but I don´t know the internals). What may work on DOM may not work on SAX. Having some experience with both of them, this is what I would recommend:
    • Have multi value properties, be either explicitly marked up:
      <span class="multi-value property">value</span>
      <span class="multi-value property">another value</span>
      

      or be the children of an explicitly marked up HTML list:

      
      <ul class="multi-value property">
      <li>You are number 2</li>
      <li>I'm number 3.898.876</li>
      <li>Blessed are the meek.</li>
      </ul>

      This will avoid problems with multi value properties and besides is proper use of HTML.

    • Have subproperties be always nested in their father property. And don't allow nested subproperties where they don't belong. The benefit of this will become clear with time.
  2. Do a Country Design Pattern. I was really happy you know, I thought I had found a solution to a real problem ( you see, there is no mapquest Argentina or Zambia or geocoder Peru or Romania.. at least not one openly accesable..).. "Postal Codes plus ISO Country ID.. this should work anywhere..".. then Ryan said check out the vcard spec and I go there and there I saw.. bla, bla, bla CA, blabla.. I felt totally embarrased.. yep there it is CA, ISO for Canada.. dumb me, should have gone through the specs before getting all excited.. so in Argentinian tradition I made a stupid joke.. "that's exactly why we need more experienced people here".. in Argentina it would have been read as "I'm dumb all right, I accept it.. I'm sorry".. In Japan I would have probably bowed my head a couple of times or something like that.. different cultures have different ways to say "I'm stupid".. but then I went through the specs further and I found that the CA there is for region California, not Country Canada. And you know, there are countries out there with 5 or 6 languages and at least 10 ways in each to name the country. And they would probably like a technology they could use. Something like this would probably work:
    <abbr class="country" title="pe">Peru</abbr>
  3. Do a Price Design Pattern. It's common practice in probably 3/4s of the world to quote prices above a certain value in some "strong" (yeah right) currency like EUR or USD. It's also fairly common in expat and inmigrant communities. A Swedish girl living in Barcelona on Erasmus may quote a room sharing deal in a university forum in sweden in EURs and SKEs. A dominican living in NY may quote the price of a Tour to Santo Domingo in USD and DOP in a local inmigrants newspaper. Something like this would work:
    <abbr class="price" title="EGP 254.5">£ 254,5</abbr>
  4. Check out this discussion when thinking about URLS and syntax: Check the comments .. and think about the fact that it is not nice to see this: www.example.com/espa%ublabla%ublablaol/ instead of www.example.com/español/
  5. Don't do the map fn to n given-name, n family-name. It's etnocentric. There are lots of cultures where family names are written first ( like in hungary for example: Sebastyen Marta ).. plus not to mention the cultures where 2 last names are very common.. Mc. Cartney, Von Braun, Perez Esquivel, Ali Khorasani .. but this one is not that important, to be honest.

Microformats are a great concept, they can be accesed on the client by JS, on the server by HTML or XML parsing technologies and they can be embedded onto HTML or RSS or whatever comes next. In 5 years they are gonna be everywhere and the web will be 400% more intelligent for that. But some basic rules should be stated now, if not there is a risk they will end up being missused like HTML was.

That's pretty much all I will say about that.

HTML Edited version. Hope you got the XML ping one.

Permalink 2005-10-14 22:01:22 English (US)

Send feedback Permalink

Comments:

No Comments for this post yet...

Comments are closed for this post.