Application Architecture in Java

Creator QR in Java Application Architecture
Application Architecture
QR Code Printer In Java
Using Barcode encoder for Java Control to generate, create QR Code ISO/IEC18004 image in Java applications.
Figure 31 and Figure 32 show the workflows for how Facebook interacts with an application s canvas pageThey also show how an application can send content for Facebook to display in the user s profile box 7 discusses canvas pages
Creating Bar Code In Java
Using Barcode generation for Java Control to generate, create bar code image in Java applications.
Browser
Barcode Reader In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
Application Canvas Page
QR Code Creator In Visual C#.NET
Using Barcode creation for .NET framework Control to generate, create QR Code JIS X 0510 image in .NET applications.
1 Browser loads Canvas URL
Make QR Code ISO/IEC18004 In Visual Studio .NET
Using Barcode generation for ASP.NET Control to generate, create Quick Response Code image in ASP.NET applications.
5 Facebook renders FBML to HTML and updates the page
Paint QR-Code In .NET Framework
Using Barcode printer for .NET framework Control to generate, create QR Code ISO/IEC18004 image in VS .NET applications.
Facebook Web Server
QR Code Encoder In Visual Basic .NET
Using Barcode generator for .NET framework Control to generate, create Quick Response Code image in Visual Studio .NET applications.
2 Facebook calls Callback URL
Print UCC - 12 In Java
Using Barcode creation for Java Control to generate, create Universal Product Code version A image in Java applications.
4 Application returns HTML or FBML
Bar Code Printer In Java
Using Barcode drawer for Java Control to generate, create barcode image in Java applications.
Developer Server
Generate Code 128 Code Set B In Java
Using Barcode drawer for Java Control to generate, create Code 128A image in Java applications.
Facebook REST Server
Encode Barcode In Java
Using Barcode encoder for Java Control to generate, create barcode image in Java applications.
3 Application calls FB REST server for more data about user, or to create the user s Profile Box
Drawing EAN / UCC - 13 In Java
Using Barcode generation for Java Control to generate, create EAN 13 image in Java applications.
Workflow for displaying an FBML application canvas page
Paint Code 93 Extended In Java
Using Barcode generator for Java Control to generate, create ANSI/AIM Code 93 image in Java applications.
Browser
Code 39 Generator In Visual Basic .NET
Using Barcode drawer for .NET framework Control to generate, create Code 39 image in .NET framework applications.
Application Canvas Page IFRAME
Data Matrix 2d Barcode Creator In Visual Basic .NET
Using Barcode creator for VS .NET Control to generate, create DataMatrix image in .NET framework applications.
1 Browser loads Canvas URL
Creating Data Matrix ECC200 In VS .NET
Using Barcode generation for ASP.NET Control to generate, create Data Matrix image in ASP.NET applications.
Facebook Web Server
Barcode Generation In Visual C#.NET
Using Barcode maker for .NET Control to generate, create bar code image in Visual Studio .NET applications.
4 Application outputs HTML directly to IFRAME
Making Data Matrix ECC200 In Visual C#.NET
Using Barcode creation for VS .NET Control to generate, create DataMatrix image in .NET framework applications.
2 Facebook calls Callback URL
Code 128 Code Set C Creator In C#.NET
Using Barcode creator for .NET Control to generate, create Code128 image in .NET applications.
Developer Server
Print Data Matrix 2d Barcode In .NET Framework
Using Barcode generator for .NET Control to generate, create Data Matrix ECC200 image in VS .NET applications.
Facebook REST Server
3 Application calls FB REST server for more data about user, or to create the user s Profile Box
Workflow for displaying an IFrame application canvas page
3 Platform Architecture Overview
Profile Box Workflow
To speed up profile load times, Facebook caches application profile box contentThis content is set by the application ahead of time and can be updated either by sending new content using the profilesetFBML() API method or by asking Facebook to update portions of its cache <fb:ref> functionality 8 covers profile boxes in depth Figure 33 shows the workflow for how Facebook interacts with an application profile box page
Browser
Application Profile Box
1 Browser loads user Profile
2 Facebook renders cached FBML for Application s Profile Box
Facebook Web Server
3 Some later time, the Application tells Facebook to update some or all of its cache
Developer Server
Workflow for displaying the application profile box
Summary
This chapter described how the Facebook Platform works, from its underlying technologies to how it communicates with applications Here are some key points:
Facebook uses open source technologies to allow the Facebook Platform to handle the large user base Developers can use the same technologies for their own applications and benefit from the contributions that Facebook has given to the community Using REST allows services to benefit from the strengths of the web, and this is what the Facebook API uses Although you can manually create a call to the REST server, it is much easier to use one of the many available Facebook API client libraries The Facebook JavaScript Client Library is the way that external websites can use the API to integrate Facebook functionality into their sites Facebook Connect builds on this, adding capabilities, such as allowing users to log into external sites using their Facebook credentials
Application Architecture
Facebook provides mobile integration via SMS processing, mobile Facebook website integration, and a special Facebook Connect for the iPhone libraryThese allow application developers to embrace the gigantic mobile user base Applications have two unique URLs: the Canvas Page URL that users go to and the Canvas Callback URL with which the Facebook Platform communicatesApplications and Facebook use key pairs to verify that the communication is valid
This page intentionally left blank
Platform Developer Tools
variety of developer tools are useful for Facebook development and application debuggingThis chapter shows you how to use some of the most common ones Some of these tools are provided by Facebook, whereas others are freely available browser add-ons or external tools
Facebook Provided Tools
Facebook provides some free online developer tools (at http://developersfacebookcom/tools php) for testing calls and responses from the Facebook REST application programming interface (API), rendering sample Facebook Markup Language (FBML) in different contexts (for example, on the profile or the Boxes tab), and managing Feed templates for specific applications Facebook also provides a setting in its PHP client library, which can help diagnose common problems Finally, Facebook allows developers to create special test accounts to exercise multiuser functionality of applications
API Test Console
The API Test Console is an indispensable tool that allows developers to test calls to and responses from many of the most used Facebook API methods in the context of any of their applicationsYou can pass in various parameters, change the response format to different types, validate callbacks if the method supports them, and see what the API will produce without having to write code for all the testing infrastructure Figure 41 shows a sample API test for the friendsareFriends() API method As you can see in Figure 41, the API Test Console offers a number of fields that developers can use to modify the data sent to Facebook for each call Each of these fields and their use is described in the following section Many fields are added dynamically, depending on the API method selected in the Method field For example, the default API method that s selected when you open the tool is friendsget() Facebook provides a field for its single parameter flid below the method drop-down field If you switch the API to friendsareFriends(), you notice that two completely different fields appear for entering the two parameters that this API expects