- init tasks
- Facebook input processing
- Response processing
Item 2 is stock F8 code, with some commercial-grade checking and error handling.
Item 3 is a big switch statement, keyed on the HTTP request input. The main cases correspond to pages: home, search, news, video, etc. Why they chose this over a true MVC framework is probably to simplify their life, since this is a relatively small app. Something like Cake or Symfony I am guessing would have been overkill. I like it; it's simple and clear and easy to understand, even if a bit hardcoded. Sometimes hardcoded is good. That's what they don't teach everyone ;)
What I really wanted to see was the fbml tags they were using, and how, and how they were formatting stuff. The tags they use are:
- tabs
- tab-item
- message
- notif-subject
- iframe
- req-choice
- swf
- friend-selector
- share-button
- userlink
- wide
- if-can-see
- profile-pic
- name
- header
- buildNav - navigation dashboard div
- buildStyles - adding CSS defs
- buildSWF - for their video feeds
- getNews/buildStoryLink - uses their templater class to build out the data from the DB...essentially this would be the heart of your service...getFoo()
- getYourFriends - Got Viral? This is where you win big on the community angle - see what my friends are doing with this app
- buildStory - Viral++ a bit of a misnomer, this builds the sharing link for the content...a must have for social capitalists
- buildCommentThread - let yoru voice be heard, and those of others
- getCloudList/fetchCloudStories - their concept of categories/groups
- getClips/fetchClips/buildVideoLink - video clips
- recordAction - keep a record of what the user is doing, a F8-ish concept as well as useful for mining
- updateProfileBox/buildProfileBox/buildActionList/listActions - builds the fbml for the F8 profile widget; I would assume a necessary F8 component
- getFriendsNews - related to the profile list, virulent strain
- fetchSearchResults - search box
- getWhatsHot - or not
- friendsUsingApp/friendsNotUsingApp (and getInviteList/addToInviteList/updateLastInvite) - a.k.a. VP-Marketing-killer...why hire an MBA when the user can market your wares for you?
- lookupFacebookUser - for invites
- setInstalled/isAppInstalled - fql to see if we are installed
- mapUser - they tie their users to F8 users; hmm OpenID anyone??
- fetchAd - Aaah, need to pay the bills, eh?
- buildGettingStarted/buildLeftIntro - the F8 add app call to action
- setupTemplates - calls into the NC library of goodies and uses DB+minimal templates
- Parse out the info sent back by Facebook
- template the responses
- separate logic from presentation code (MVC)
- follow key Facebook styles and concepts - dashboard, profile, friend list, etc.
In addition the the F8 logic, some controller code is required. NewsCloud puts this into a process.php file.
Now, to understand more about how to MARKET a F8 app once you've created it....that's for next time!