Tuesday, March 09, 2010

Behind Orkut & Facebook - OpenSocial Applications









Orkutting was an addiction during my early college days. Then it was all open under the sky. There was no restriction, no privacy settings.. everyone under the earth could read everyone else's scrapbook.. it was a real fun.. Google made its privacy settings strict in 2008 or so.. and we started missing all the fun.. because everyone started to set settings in such a way that only friends could view his/her scrapbook.. Anyways, the positive outcome was that: it became much more safer. Then recently, new orkut came into scene where it has become more or less like facebook. 
                  As soon as the comparison between new orkut and facebook started taking place, I started to gather knowledge about GWT (Google Web Toolkit) which was the magic behind upgradation of orkut. You can download GWT (SDK, Speed Tracer, Plugin for Eclipse) from: GoogleCode>Webtoolkit These all will work provided you have Java SDK already installed in your machine. Facebook has entirely different development approach. Check this weblink if you are interested in facebook development issues: FacebookToolkit>Codeplex And these all will work if you have .NET framework already existing in your machine. And that's the main difference. Orkut works on JavaScript API, but Facebook is on .NET APIs. Other basic differences include: facebook uses its own tagged languages like FQL (facebook query language), FBML (facebook mark-up language) etc. Orkut being a google product lacks this kind of monopoly. MakeBeta has already started providing facebook PHP tutorial here, just take a look here in case if you're interested: MakeBeta Facebook-PHP Tutorial
             I guess, by now all are aware of Google Code (Click here), it's a wonderful exposure to various sorts of APIs and other resources. While looking for some applications, I found an useful information about building an application by your own. Go through this link and register for sandbox there, then develop your own application. It's exciting! You don't even have to download any XML editor either. It provides an in-built GGE (Google Gadget Editor). Later I searched a lot for developing applications in other social websites too, apart from orkut.. and found : Open Social Application Development (Site Link). It provides a common set of APIs for building social applications that run across multiple websites.
            Though opensocial works for MySpace, Linkedin, BigAdda and other big social networks, but it's only Google-owned Orkut who took an initiative to launch opensocial applications first on their site. Personally I searched a lot for some examples to gain some hands-on experience for developing any application by opensocial, if any.. and came across Wikidot. Wikidot.com provides opensocial service provider interface that includes:
  • Adding / removing friends
  • Storing activities (eg: page-change, new-post, new-thread etc.)
  • Adding / removing apps.
  • Retrieving activity streams for self & for friends
All are written in JavaScript using common OpenSocial API that has used data from Wikidot.com (here in this particular case). Now if we sum up what is to implement exactly, these are :
  1. OpenSocial widget loader module- PHP/JavaScript module that will load a given widget.
  2. PHP iframe- displays the widget.
  3. Wikidot.opensocial and opensocial.wikidotContainer implementation- mainly JavaScript modules & some PHP proxy to fetch contents from some other websites.
  4. Server-side of the OpenSocial data fetch/set methods- PHP modules & actions.
  5. Database structure
There are two actors in Opensocial. The OWNER refers to the person that has installed the app on their profile. The VIEWER refers to the person visiting the profile.

Viewers can have three different relationships with the owner: either they are FRIENDS, they are FOF (friends-of-friends) or they are UNRELATED (referred to as everyone in Orkut). The viewer has two relationships with the app - either they have installed the app or they haven't. Users will likely be confused with 6 viewer states as they navigate across the network. So, it's recommended to assume just 2 states for viewers:
Friends with App (FA)
Guest - everyone else

The launch of OpenSocial on Orkut means that developers can potentially reach tens of millions of Orkut users from around the world and hundreds of millions of new users through other OpenSocial container sites.. (that's what the Google executive said)! Previously, orkut was more popular in India & Brazil.. after adding all these applications, it'd cause a hike in users in western countries too.


Ps: you might face problem installing apps or might even landup seeing some errors on the application you have installed but don’t worry our Google and the App developer team is working behind the scene.







1 comment:

  1. I am developing a SNS(social networking site) with servlet as server side language. I have created a page which will display users u've searched for adding them as your friend. Can you suggest a way to go to the clicked user page from search page by maintaining user's session id and also way to carry searched user id to that page to display his/her detail. Remember i clicking a hyperlink not a button.

    ReplyDelete