Sunday, November 9, 2008

Open social applications.. how to make the most out of them?

Thanks to opensocial people. Now one can get their applications and products to whole world in just one click. But the whole point now is since they are open to you, they are open to million others :). How to survive the opensocial burst.

I am not expert but this is how I am going to dive in. The first and foremost thing before thinking of the information architecture of your open social application is for which social framework the application is targeted. So, the linkedin app may not be suitable to add on orkut or the other way. The guiding principle for deciding the architecture and plan is to list down all the problems you are solving in your services. Categorize them according to social applications. Then decide the architecture for solving the same problems while publicizing yourself in the social framework. Now the application can be a single feature among the infinite ones you giving at your website. But it should be useful to people and should survive in sense that a person who has added your application should not remove it as thing are not happening. Make it lively. Refer social design best practices.

e.g., if I have a picture album feature among infinite others where people upload their pic and other people add stories to the particular picture and an album is linked with say a particular location on the map making sense. Then @ orkut I may be posting the pics as they are loaded and @ twitter I may be adding user stories for the album and on linked in I may be adding the location info showing where the man had been.

Good luck with your application. :)

Saturday, November 8, 2008

Haversine implementation in PHP. (Calculate distance in google maps)

This is how haversine formulae can be used to calculate distance between two places represented by latitude and longitude in degrees

$radius = 6378100; // radius of earth in meters
$latDist = $lat - $lat2;
$lngDist = $lng - $lng2;
$latDistRad = deg2rad($latDist);
$lngDistRad = deg2rad($lngDist);
$sinLatD = sin($latDistRad);
$sinLngD = sin($lngDistRad);
$cosLat1 = cos(deg2rad($lat));
$cosLat2 = cos(deg2rad($lat2));
$a = $sinLatD*$sinLatD + $cosLat1*$cosLat2*$sinLngD*$sinLngD*$sinLngD;
if($a<0) $a = -1*$a;
$c = 2*atan2(sqrt($a), sqrt(1-$a));
$distance = $radius*$c;


The variable $distance is the distance between the two points in meters

Friday, November 7, 2008

Facebook Connect

Tried facebook connect today. It really makes you connect to the facebook. So what?

As a third party website one would never want to just connect without fetching any user info. But what facebook has done will really help you solving problems and seriously saying, building business would be whole lot difficult.

Still facebook connect can be used in an intelligent way by sending users updates in your applications