7. i18n Internationalization function t($string) <div id="invite-friends-header-prompt"> <?= t(‘Where have your friends been?’) ?> <span><?= t(‘Invite your friends. ’) ?></span> </div> Our ‘t’ function wraps its output in <fb:int> tags for fbml
8. i18n Each Page Request Does this string NOT exist in the strings table in our db add it to the strings table in our db If user wants English, output string Else md5 (string and language code) to make a key if the cache holds a string with this key output from cache else does our database hold a string with this key put string in cache output from database else default: //no translation yet output original string function t($string) <div id="invite-friends-header-prompt"> <?= t(‘Where have your friends been?’) ?> <span><?= t(‘Invite your friends. ’) ?></span> </div>
9. i18n Daily Cron function t($string) <div id="invite-friends-header-prompt"> <?= t(‘Where have your friends been?’) ?> <span><?= t(‘Invite your friends. ’) ?></span> </div> For all strings not pushed to Facebook yet Use FQL to add strings to Facebook db Get all strings from Facebook via FQL, for each string we get from Facebook md5 (english string and language code) to make a key write the translation and key to our translations db
10.
11. dynimg.whereivebeen.comFacebook Facebook EC2 Machine running pound and MySql WIB API Network Abstraction Layer img1 img2 img3 img4 img5 API (oAuth) WIB Auth Layer S3 Image store Over 1MM Bin Cache 2 hours WIB Platform
12. Discover Where I’ve Been Fresh New Design Modular site structure Local search options Scalable Platform Built from the ground up 728 x 90
Notes de l'éditeur
Building a network and a business around and ontop of multiple other platforms presents an interesting architecture challenge. Where I’ve Been is essentially a set of API’s and Abstraction layers mixed with a templating system that we call stencils.
Wrapping the Platform tier we have an authentication layer, this is the layer that users of our .com authenticate against directly. Most functionality on the .com website is preformed via AJAX, so we have a JavaScript client library for that. For each social network we release our application onto we create a client library (which is normally a wrapper of their own official library that normalizes the methods we use in our network). Finally we have a oAuth REST API which (currently in ALPHA with only one partner) which allows partners to access our technology (with the API you could potentially recreate the entire site somewhere else) We also use AMF for our flash products such as the maps.
We write these networks as plug-ins and once added, the functionality from that network is made available immediately. You can add multiple networks to an account and authenticatie to your account from multiple sources. When we utilize communication channels such as feed items, we just create Where I’ve Been feed items and the API will use the best available network for that user, convert to the required format and send it out. There are many advantages to this approach, but one main one is being able to adapt very quickly when things change all the time, not pointing any fingers of course (facebook)
Any good framework should have all the layout and content separated from the business logic, for this we created a system we call stencils. Every visible feature you see on the site has a mixture of CSS, JS, HTML, FBML, and TXT files. We can render then inside each other, they can be sent through the various communication channels, they can all be AB tested and they have standardized tracking and a real time viral coefficient