FBML, YML, OSML oh my! HTML, meet Social

This morning Yahoo! launched the first fourteen OpenSocial applications for users of My Yahoo!, though as TechCrunch pointed out they did a bit of forking OpenSocial for their HTML-ish markup. It’s not all that surprising considering that OpenSocial’s support for this sort of markup (OSML) is relatively new, Yahoo! has been working on their application platform for quite awhile and OSML is just a bit strange.

For instance, the “small view” (i.e. the widgets which actually appear on the MyYahoo page) must be developed using “Yahoo! Markup Language” (YML), which is an extension of HTML with more bells and whistles. Yahoo is trying to bring together YML and the OpenSocial Markup Language (OSML), but right now they are forked. But turning an OpenSocial app into one that works inside Yahoo is getting easier.

Beware, the next few paragraphs get a bit geeky. YML (more info) is a lot like FBML and OSML (more info) in that they are all social markup languages. OSML is a bit different though, unlike YML which only works inside of Yahoo! and FBML in Facebook, OSML is part of the OpenSocial project and is designed to work inside of many different social network containers. If I wanted to display a user’s name inside of my application, here’s what it would look like:

  • FBML: <fb:name uid=”4″ />
  • YML: <yml:name uid=”QPR12345″ />
  • OSML: <os:Name person=”${User}”/>

In this simple example, FBML and YML are nearly identical; you pass in a userid. OSML is a bit different, they’ve created a rich templating language and you’re passing in a user object instead of just a userid.

XFBML is the evolution of FBML but designed for use via Facebook Connect. Given that XFBML is designed to work for sites outside of Facebook.com, I’m much more interested in the ideas behind it and how they will ultimately be useful across social networks. Today XFBML is powered by JavaScript, though in the future I can imagine having actual HTML tags for this sort of social content. One of the large benefits of this approach is that a user’s privacy settings can be maintained easily across sites (see Thoughts on dynamic privacy, though note that Chris’ closing is no longer accurate).

Today XFBML works in such a way that I include Facebook’s JavaScript loader in my page, the JavaScript walks the page’s DOM looking for tags like <fb:profile-pic uid=”4″ />, uses your browser (and thus your current cookied session) to request the user’s photo, and then based on the user’s privacy settings and your relationship to the user fills in their photo (or doesn’t). This provides two main benefits: 1) if you only share your photo with your friends, a non-friend browsing this page would not see the photo and 2) if you change your photo on Facebook it will change on this page as well.

Given how quickly the Social Web is coming together, I believe that HTML will need to support social elements someday soon. It’s great to see this type of innovation by Facebook running in the wild, but the web itself ultimately evolves best when multiple competing approaches come together. Just as OAuth brought together the best practices from AOL, Flickr, Google, Yahoo! and others, there is a similar opportunity to bring together FBML, YML and OSML along with the client-side benefits of XFBML.

tags: ,