Facebook Cookbook - Jay Goldman [10]
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