Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [10]

By Root 674 0
closed technologies such as Facebook Markup Language (FBML) and Facebook JavaScript (FBJS). The Facebook Legions would argue that Platform is really just extending the same open tech, that learning those extensions is almost trivial (as you’ll soon see), and that their carefully developed and controlled environment means developers and users get more control, greater security, and easier interoperability. This is a theme that runs much deeper than the social network space, and anyone who has been in the industry for more than a few years has seen the same battle play out in any number of fields, from operating systems (Windows versus Linux) to browsers (Internet Explorer versus Firefox), and from content delivery formats (Flash versus HTML) to user interface markup languages (XAML versus XUL). The world of digital music is going through this as well in their classic, Hamlet-like struggle (To DRM or not to DRM: that is the question), and the mobile application space is about to have a similar shakeup with the release of Google Android and its push to open the previously walled gardens.

Who’s Going to Win?


It's still very early days in this battle and it's very hard to predict the outcome. As of the time this book was written, there are over 20 sites with OpenSocial sandboxes or application containers enabled, including Orkut, hi5, Ning, and Plaxo, giving some of their users the ability to try OpenSocial apps in the context of their sites. Anecdotal evidence from leading app developers like Slide, RockYou, and iLike says that porting apps from Facebook Platform to OpenSocial is relatively trivial, and suggests that you can easily start with one and move to the other. Historical precedent suggests that some open platforms have a lot of success (Firefox has stolen a big share of the market away from Internet Explorer), while a number of closed systems have done even better (Apple's complete domination of the MP3 market is based largely on iTunes and iPods being completely closed).

Ultimately, the announcement of OpenSocial is a win for developers just like you, because it signifies a maturing marketplace backed by serious investment from major industry players. Marc Andreessen, founder of Netscape and now of OpenSocial partner Ning, agrees: “As an app developer, there’s no real reason to choose between Facebook and OpenSocial. It’s easy to do both. You’ve already put in most of the effort—creating a new set of frontend HTML and JavaScript pages is almost trivial, and that’s all you need to do to have your app ‘port’ to OpenSocial....”[4] Mark’s proposed strategy (which is a very solid one) is to maintain a single backend with four sets of frontend pages, each optimized for different platforms:

A set in normal HTML/JavaScript for consumption in regular browsers

A set in FBML and FBJS for use in Facebook

A set in normal HTML and using JavaScript to connect to the OpenSocial API for use in OpenSocial

A possible fourth set adapted for use on mobile devices, such as Apple’s iPhone

What Should I Do?


Calling Facebook Platform “mature” seems odd given how young it is, but it will always be nine months older than OpenSocial. Since the number of people who can access OpenSocial containers is currently smaller than the number of Facebook users, as of September 2008, and since Facebook’s social graph will make it easier for your application to pick up a larger user base in less time, you should start by building a Facebook version—but make sure to architect your backend services so that they are loosely joined to the frontend and can be used easily by an OpenSocial version later (we’ll cover this in detail in Chapter 4).

* * *

[4] http://blog.pmarca.com/2007/10/open-social-a-n.html

Saddle Up!


You’re about to embark on a big adventure! Just keep thinking of the gold in them thar hills while you ride across the wilderness of FBML. Don’t forget to circle the wagons when you hear the hosting fees howling in the distance, and remember that the cavalry is just around the corner. It’s not going to be an

Return Main Page Previous Page Next Page

®Online Book Reader