If you are already a web developer and adversed in some sort of server side language such as PHP or even Ruby, porting your skills to Facebook couldn’t be easier. Facebook uses their own HTML (called FBML) and Javascript (FBJS). It also includes its own MySQL like syntax to query for user information (FQL).
FBML is so close to HTML that you may not even notice the difference. One of the major differences between the two are the way POSTs are handled. FBML carries over common information about the Facebook user under every post. This could be tricky when utilizing more efficient methods of form handling such as inflection.
FBML also does not allow linking in JavaScript or other external files. An easy way around this is utilizing a template engine such as Smarty (for PHP). With Smarty you can use the {include file=”"} functionality to dynamically include external files such as JavaScript or CSS. This way you can keep your code separation, and still keep Facebook happy!
All pages displayed through your Facebook application are pre-parsed by Facebook. This may cause a problem with database intensive applications. If the page cannot be downloaded and parsed within 3 seconds, Facebook kindly shows a big 404! Keep speed in mind while developing. It is not as easy to get by with minimal resources in production applications.
FBJS is a little more restrictive, and for good reason. With the restrictiveness comes more security, which is an even trade off in my opinion. But one of the great things about FBJS is that it provides many shortcuts for commonly used features that more seamlessly integrate with the look and feel of the Facebook site in general.
FQL mimics the standard SQL style syntax. Anyone familiar with MySQL should be able to easily pick up this query language to harness the full potential of available information. Be warned, some trial and error will be expected even for the most experienced developers, but nothing too major.
The Facebook documentation is not all that bad. I’m sure it will evolve over time, but for now it is more geared to the core technical aspects of the system. What it lacks in user friendliness, it makes up for in.. well.. nothing.. But I wouldn’t hold that against them yet this early in the game. For advanced developers, it is a perfect tool to become more knowledgeable about the inner workings of the API. Don’t be discouraged if you’re not a Code Ninja - There is plenty of help on their forums.
In short, if you can develop a website in PHP or Ruby you can develop in Facebook.
Give it a try!
Tags: Application Development, Facebook
Recent Comments