Activate your free membership today | Log-in

Tuesday, February 17th, 2009

Prefilling forms with Microformats and YQL

Category: Microformat, Yahoo!

Ever since YQL started supporting microformats scanning (the outcome of having a coffee with the team last time I visited the main office) I tried to find good examples of how you can use this. Microformats rock, we all know that but so far I am still waiting for the killer application or implementation for it. The wiki examples of microformats are getting stale indeed and in general I start to wonder what it needs to make the main market understand the benefits and implement them.

One nice example of the power of Microformats and YQL is George Ornbo’s jQuery script that allows you to pre-fill forms with data retrieved from hcards:

Prefilling forms with microformats and YQL

I’ve written similar tests before but soon gave up on trying to parse microformats by hand. With YQL doing that job for us the practical application of microformatted data became a lot easier, so let’s go wild.

Posted by Chris Heilmann at 1:24 am
1 Comment

+++--
3.3 rating from 11 votes

Wednesday, November 26th, 2008

Getting Semantic With Microformats Series by Emily Lewis

Category: Microformat

One of the best aspects of living in the Bay Area is bumping into all sorts of interesting computer folks. Today I’m working from a coffee shop and bumped into Tantek Çelik, CSS and Microformats man. He pointed me to a fabulous blog series introducing Microformats and all the major formats for a more lay-person audience, created by Emily Lewis:

Lots of great information and tutorials in that blog series.

Tantek also pointed me to an interesting wiki page laying out how browsers and web pages can integrate Microformats more deeply into their user-interfaces:

Recently there have been many really good user interface ideas and suggestions for working with microformats. This page serves to collect and document them so that we may be inspired by and iterate on each others’ works.

The Operator plugin for Firefox, which natively supports deep UI integration for Microformats and discussed on the wiki page as well:

Posted by Brad Neuberg at 7:00 am
1 Comment

++++-
4.2 rating from 11 votes

Tuesday, March 11th, 2008

Sitepoint releases HTML reference as a beta

Category: Announcements, Browsers, Microformat

While this is not strictly Ajax or JavaScript related, it is noteworthy to point out that Sitepoint just released a HTML reference that is quite handy to have around if you wonder if what you are building is really HTML or just tagsoup.

Good HTML references are really hard to come by, either they are just listings, like W3schools.com or terribly outdated. Sitepoint have done quite a good job in listing all the HTML elements and categorizing them into different use cases. There is also a list of deprecated elements and attributes to avoid (which could be considered dangerous to still bring up as some of them are too handy to simply add to solve an issue) and a Microformats primer.

We know for a fact that other portals/article sites are working on similar projects and consider it a really good way of flushing old and outdated tutorials on things as simple but important as markup out of the search engine result pages.

The reference also gives a legend of browser support, something that so so far was only available on the German SelfHTML reference.

Posted by Chris Heilmann at 4:33 pm
5 Comments

+++--
3.7 rating from 21 votes

Thursday, December 13th, 2007

Unobtrusively Mapping Microformats with jQuery

Category: Articles, Mapping, Microformat, jQuery

Simon Willison just doesn't stop. This time he has added a way that details the technique of unobtrusively mapping microformats with jQuery.

Simon puts together jQuery, microformats, and the Google Maps API to grok hCard and show maps of any hCard data that is found, ending up with:

JAVASCRIPT:
  1.  
  2. jQuery(function() {
  3.         // First create a div to host the map
  4.         var themap = jQuery('<div id="themap"></div>').css({
  5.                 'width': '90%',
  6.                 'height': '400px'
  7.         }).insertBefore('ul.restaurants');
  8.  
  9.         // Now initialise the map
  10.         var mapstraction = new Mapstraction('themap','google');
  11.         mapstraction.addControls({
  12.                 zoom: 'large',
  13.                 map_type: true
  14.         });
  15.  
  16.         // Show map centred on Brighton
  17.         mapstraction.setCenterAndZoom(
  18.                 new LatLonPoint(50.82423734980143, -0.14007568359375),
  19.                 15 // Zoom level appropriate for Brighton city centre
  20.         );
  21.  
  22.         // Geocode each hcard and add a marker
  23.         jQuery('.vcard').each(function() {
  24.                 var hcard = jQuery(this);
  25.        
  26.                 var streetaddress = hcard.find('.street-address').text();
  27.                 var postcode = hcard.find('.postal-code').text();
  28.        
  29.                 var geocoder = new MapstractionGeocoder(function(result) {
  30.                         var marker = new Marker(result.point);
  31.                         marker.setInfoBubble(
  32.                                 '<div class="bubble">' + hcard.html() + '</div>'
  33.                         );
  34.                         mapstraction.addMarker(marker);
  35.                 }, 'google');   
  36.                 geocoder.geocode({'address': streetaddress + ', ' + postcode});
  37.         });
  38. });
  39.  

You see the finished code at work.

Posted by Dion Almaer at 7:01 am
2 Comments

+++--
3.7 rating from 26 votes

Tuesday, October 24th, 2006

Microformats

Category: Microformat, Presentation, The Ajax Experience

Kevin Lawver (or is it here?) discussed Microformats this morning at The Ajax Experience.

Microformats define ways to make your markup more descriptive, allowing a reader (be it machine or human) to very easily grok the just what you're getting at. Basically, you know what you're doing: why don't you just tell us instead of making us guess?

A simple example: Your link to ajaxian from your blog (you do have one, right?) could indicate that the page you're linking to should have the tag "ajax". By adding that tag it's obvious what you're linking to and why you're linking to it.

<a href="http://www.ajaxian.com" rel="tag">ajax</a>

On my blog I may link to ajaxian a bit differently, but due to the tagging someone would be able to quickly determine that my motivation is a bit different.

<a href="http://www.ajaxian.com" rel="tag">web 2.0</a>

The most obvious implication is making SEO-type tasks a bit simpler. A spider crawling your site can be told quite specifically what topics you are truly covering. At the moment you may not see a profound effect from properly applying these tags, but as microformat becomes more and more prolific (and consistent), they will likely be leveraged more and more for this purpose.

Try it out yourself: Make it easier for people to add you to their address books with an hCard on your blog (you can cheat a little and use this).

photo
David Hasselhoff

Baywatch
123 Fake St
Hollywood, CA, 90027 USA

This hCard created with the hCard creator.

As with any writeup, there was much in the presentation that isn't represented here - checkout the slides for some more great info.

Posted by Jim Halberg at 10:35 am
9 Comments

+++--
3.4 rating from 22 votes