RDFa for begyndere

notizBlog har gravet en god begyndervideo frem vedr. RDFa. RDFa benyttes i XHML til at tilføje mere semantisk beskrivelser ved hjælp af triples mm. Ikke så meget teknisk snak, videoen forklarer det hele meget bedre. Se den 9 min. introduktionsvideo og blev klogere på konceptet.

[youtube]http://www.youtube.com/watch?v=ldl0m-5zLz4[/youtube]

Exclusive interview with Brian Suda

I am very happy and proud to present an exclusive interview with Brian Suda. Brian is one of the veterans and still going strong member of the microformats community. Brian is co-author of the hCard specification. Brian is also the developer the X2V and GEO Microformats to XML tool. Some handy and cool tools you can use a lot for your microformats projects.

[1] Søren: Welcome Brian. The microformats community quite often use this phrase “Designed for humans first and machines second”. How would you explain this concept for web developers and ordinary web users,who never have heard about microformats?

Brian: I like to talk about microformats as “semantic sugar”. Everyone can understand that adding a little bit of sugar to your food you make it taste better. Adding microformats into your HTML makes it “taste” a little better too!

The “Designed for humans first and machines second” is attempting to point out that microformats always take into consideration the publisher first. This means that things should be as easy as possible for the person writing the HTML. There will be factors of 10 more people publishing than writing parsers, so why make it easy to parse at the expense of the publishers? The other big thing this stresses is that data should be for humans, it should be in plain view – you should see it every day through the window of your web browser. Data that is only for machines tends not to be visible to humans in a meaningful way, so we forget about it, we never update it and next thing you know it is completely wrong!

[2]Søren: You are one of the co-authors of hCard, where did the genius idea came from regarding reusing the old vCard specification for hCard?

Brian: I already knew that my target was going to be vCard, so for me i was simply creating a vCard in HTML rather than XML or plain-text. Basically, a good programmer is lazy. It is always a good idea never to re-invent the wheel when ever possible. Using vCard properties for class values was a logical choice, with applications already supporting it, you instantly get inter-operability.

[3] Søren: First time I did a hCard and then pointed the URN for that web page with my hCard to your “GEO Microformats to XML” tool and a KML file started up my Google Earth, I was very impressed and felt that this were one of the more practical things to do with microformats. Later on, I have discovered that when showing new people microformats in action (on a FireFox browser with Operator) – Examples with hCard and maps (Google Maps, Yahoo Maps, Google Earth etc.) is the first thing they think is smart and usefully for them self. Do you have the same experience when you are talking at conferences, that examples with maps draws peoples attentions to microformats?

Brian: Certainly maps are something everyone can relate too. In my presentations I try to show at least one practical and one “far out” demonstration of microformats. Usually, i demo how to take an HTML page, upcoming.org or any other with an hCalendar, then convert that to an iCalendar file.

With the newest versions of Outlook and Apple’s iCal, you can “subscribe” to events. This means that as the HTML pages are updated, your calendar application gets those updates too. This tends to really impress an audience, because we have all probably missed a rescheduled meeting or event due to a rescheduling. HCalendar really scratches an itch that people have every day.

I also like to demo some crazy far out stuff too, just to get people’s minds thinking. Twitter, for example, marks up all your messages as hAtom entries. Each of these entries has a publication date, so there is no reason why it isn’t possible to extract the data and convert it to XML or JSON and have it loads into a timeline or other software. Now we can begin to see twitter posts in relation to each others time distance rather than just as a list.

Timeline from  a twitter feed

[4] Søren: Speaking about the upcoming FireFox 3.0 (not talking about the version out now for testers) and the build in microformats detection feature – will this be the breaking point and the big step ahead for microformats? – so we maybe see a success for microformats like the one RSS/Atom have gone through?

Brian: I think having a microformats detection native to the browser will be a big benefit to adoption and awareness. RSS/Atom has exploded for lots of different reasons, but it has taken many, many years! Where I personally see microformats in the browser excelling, is on mobile devices. Imagine if the browser in your phone was microformats aware. Instead of trying to re-type an event using T9, it could be one-click, save to calendar, one-click, call this person, one-click, get directions to this place from where i am standing right now based on my lat/lon of my phone’s built in GPS unit.

If all things were equal between two websites, but one used microformats and the other didn’t, when on my phone i bet you know the one i’d pick!

For better or worse, the end-user doesn’t really care about microformats. If you look at the current Operator toolbar, it doesn’t mention the word “microformats” at all. It is all “action” based. Which i think is good. My parents don’t need to know what microformats are to be able to “save to address book”. The better a technology is, the less of it you see. To most people, FireFox 3 knowing that there are 3 events in a page will just be magic. To any good web developer,they will want to know “how do i get my pages to have those options appear” and will learn more about microformats.

My dream would be that microformats become so ubiquitous that you don´t need to announce that they are in your page, it is just expected. Much like making valid HTML, you shouldn’t be proud and announce to the world “My HTML validates”, because that should be a baseline. It is like telling the world “I brushed my teeth this morning”, so what – i hope you did. If we evangelize enough, microformats will just become part of the HTML you produce on a daily basis.

[5]Søren: I maintain a list over danish web sites which is using microformats (The list does not incl. “rel-tag” web sites). The list is very short. For me it seems like microformats is very unknown in Denmark at the moment. Do you think that microformats can have a some language barrier? I am thinking about ‘classes’ for example are all in english [ like class="street-address" i hCard etc.] So a danish, swedish or finish web developer might thinking what kind of benefits will I get from using english ‘class’ names in my markup? So will we end up with microformats in small countries/languages is only something a few hard core techies is doing?

Brian: Microformats are small re-usable pieces of information, so I´d hope there isn´t much to remember and the barrier to entry is low. HTML is already (for better or worse) in English, so you need to understand what a <p> and <strong> mean relative to Danish. This learning comes from information in your own language, but what you write in is ultimate English. This is why it is important for sites like microformats.dk, microform.at, microformats.biz and others to be localized so more people can learn about what class="street-address" means in their own language and culture, just like you needed to learn what <em> meant.

I don’t think this is a huge drawback for the interoperability. Everything is a trade-off so a unified language for describing things makes it easier to adopt globally so we all know we are talking about the same things. The people I feel sorry for are the British English speakers, it is their native language, but to them all the spelling is wrong!

[6] Søren: You have been an invited expert for the GRDDL working group at W3C. How does the folks at W3C looking at microformats in the picture of creating a more Semantic Web? I have seen that Tim Berners-Lee is quite positive about microformats – (like this twitter message from Tantek Çelik “Tim Berners-Lee just called the microformats wiki “a special holy place :) ”)

Brian: The W3C is a big organization, but all the people that i have met like microformats – both as an idea and a technology. Their main concern is that microformats can not solve everything, they only cover popular aspects such as People, Places, Events, Reviews and a few others. Whereas with W3C technologies, such as RDF a you can just about describe anything you want, but as with anything there are trade-offs.

Up until a few years ago, there were only two options, HTML and RDF. Two pretty far ends of the spectrum. HTML was for the browser and human eyes, whereas RDF was for machines (and can hurt human eyes if you look at it!).

In recent years we are filling in that spectrum between HTML and RDF. We have the more complex, but can describe anything markup in RDFa or eRDF, and the more lightweight microformats that are easier to implement but have limitations. Then there is POSH and GRDDL to also add and extract semantics. We now have more choices and can select the best tool for the best job on any given project.

I think, from the people i have talked too, that everyone agrees anything which gives more meaning to the web is a good thing. If it has enough structure, then it can be converted to other formats, RDF, RSS, Atom, etc. so that existing tools that people are familiar with can use, understand and act on the data. Microformats do this extraordinary well for very little costs, so it is very much a positive thing for the Semantic Web.

[7] Søren: At the moment you are quite interested in OpenID working together with microformats. Can you tell a little about what the idea is behind all this?

Brian: sure, OpenID is away to authenticate yourself and prove you are who you say you are. Microformats can work with this to further describe more about yourself. For instance, i have a profile page at claimid.com/briansuda with an hCard and i can say that is me, but you just have to take my word for it. ClaimID is also my OpenID provider, so i can also prove that page is me by passing an OpenID challenge response system (username and password). I should be the only one who can answer that username/password so you can trust that i control that page which i am claiming is me. It is a verified way to trust the microformatted data.

I also like using OpenID for lots of other stuff too. Friends of mine have blogs, but don´t want to list a full hCard to the general public. So for the world, you can get their hCard with only an FN and country-name, but for friends to authenticate themselves with OpenID they can see a full hCard with email, tel, adr, etc. So OpenID is a way to white-list friends to sensitive data.

OpenID is a really interesting open technology which compliments microformats well.

I thank Brian Suda for taking his time to answer some questions here at microformats.dk. I really liked the word “semantic sugar” Brian used above and will used from now on (in danish translation). If some danish readers out there are interested in microformats, we maybe could start a danish barcamp etc. Please feel free to contact me regarding microformats.

Some reading stuff from Brian Suda