Beautiful Architecture

(avery) #1
Browser

FB Logic FB Display

FBML
Interpreter
Receiver

FB API

FB Service

FB Data

Privacy

FQL

App Logic App Display

App Service

(obj)

(obj)

$_REQUEST

App Data

SQL Objects

$_GET, S_POST
App Infrastructure
FB Infrastructure
HTML, JS,
CSS

FBML

FIGURE 6-5. Applications as FBML services


In this flow, a request to http://apps.facebook.com is again transformed to an application
request, and again, the application’s stack consumes the Facebook data services. However,
rather than returning HTML, the developer rewrites the application to return FBML, which
incorporates many HTML elements but adds special Facebook-defined tags. When this request
has returned its contents, Facebook’s FBML interpreter transforms this markup into instances
of its own data, execution, and display while rendering the application page. The user then
receives a page composed of the usual web elements of Facebook pages, but infused with the
data, logic, and feel of the application. No matter the FBML returned, FBML enables Facebook
to enforce its notions of privacy and elements of good user experience technologically.


FBML is a specific instantiation of XML with many familiar tags from HTML, augmented with
platform-specific tags for display on Facebook. FBML shares the high-level pattern of FQL:
modifying a known standard (HTML, or in FQL’s case, SQL) to defer execution and decisions
to the Facebook Platform server. As shown in Figure 6-5, the FBML interpreter allows the
developer himself to control the logic and display executed on the Facebook server through


DATA GROWS UP: THE ARCHITECTURE OF THE FACEBOOK PLATFORM 137
Free download pdf