SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Facebook Development using Zend Framework Brett Harris
Make it work. Make it right. Make it fast. Make it fast. Make it fast.
Challenges ,[object Object],[object Object],[object Object]
Development Environment  & Deployment & Deployment ,[object Object],[object Object],[object Object]
3-Tier Architecture
5-Tier Architecture
Development Environment ,[object Object],[object Object],[object Object]
Proxy Pattern http://en.wikipedia.org/wiki/Proxy_pattern
Dev Environment Proxy
FBML Parser <html> ... <h1> <fb:profile-pic uid=&quot;12345&quot; size=&quot;thumb&quot; /> <fb:name uid=&quot;12345&quot; /> </h1> <hr/> <p> <fb:user-status uid=&quot;12345&quot; linked=&quot;false&quot;/> </p> ... </html>
FBML Parser Parsed by Facebook Not parsed Brett Harris is presenting at ZendCon
FBML Parser Proxy function  smarty_function_fb_name( $params , & $smarty ) { if  (Framework_Config::get( 'MODE')  ==  'local' ) { return   'Grant Raphael' ; } $fbml =  '<fb:name ' ; foreach  ( $params   as   $key  =>  $value ) { $fbml .=  $key  .  '=&quot;'  . addslashes( $value ) .  '&quot;' ; } $fbml .=  ' />' ; return   $fbml ; } http://smarty.net/manual/en/plugins.php
FBML Parsing Mock <html> ... <h1> {fb_profile_pic uid=&quot;12345&quot; size=&quot;thumb&quot; } {fb_name uid=&quot;12345&quot; } </h1> <hr/> <p> {fb_user_status uid=&quot;12345&quot; linked=&quot;false&quot; } </p> ... </html>
FBML Parsing Mock Grant Raphael is updating their status Parsed by Facebook Not parsed Brett Harris is speaking at ZendCon
Configuration ,[object Object],[object Object],[environments] dev_foo_com  = DEV www_foo_com  = LIVE [DEV] APP_NAME  = sample_application BASE_DIR  = /var/www/html/sample ETC_DIR  = /var/www/html/sample/FBFramework/application/etc MODEL_DIR  = /var/www/html/sample/FBFramework/application/model CONTROLLER_DIR  = /var/www/html/sample/FBFramework/application/controller VIEW_DIR  = /var/www/html/sample/FBFramework/application/public/view COMPILE_DIR  = /tmp/templates_c SESSION_DIR  = /tmp/sessions FRAMEWORK_DIR  = /var/www/html/sample/FBFramework/Framework UI_DIR  = /var/www/html/sample/FBFramework/Framework/UI DEFAULT_CONTROLLER  = index DEFAULT_ACTION  = index VIEW_EXTENSION  = tpl BASE_URL  =  http://dev.foo.com/sample EXTERNAL_URL  =  http://dev.foo.com/sample MODE  = local [facebook] FB_USER_ID  = 1 FB_FRIENDS  = 1,2,3,4,5 API_KEY  = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SECRET_KEY  = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SESSION_KEY  = XXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXX
Differences from “Normal” Web ,[object Object],[object Object]
POST ,[object Object],[object Object]
POST ,[object Object],< html > ... <!--  http://dev.foo.com/sample/item/save  --> < form  method = &quot;post&quot;  action = &quot;{$EXTERNAL_URL}/item/save&quot; >  ... </ form > ... </ html > ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[environments] dev_foo_com  = DEV [DEV] ... BASE_URL  =  http://apps.facebook.com/sample EXTERNAL_URL  =  http://dev.foo.com/sample
Header Redirects ,[object Object]
Header Redirects ,[object Object],<?php class  ItemController  extends  Zend_Controller_Action { public   function  listAction() { try { $category_id = (int) $this ->_request->getParam( 'category_id' ); $this ->view->items = Item::find( 'category_id = ?' ,  $category_id ); } catch  (Exception  $e ) { // Forward to ErrorController::indexAction // aka http://www.foo.com/error/index $this ->_forward( 'index', 'error' );  } } } ?>
Learning Curve ,[object Object],[object Object],[object Object]
FQL ,[object Object],[object Object],[object Object]
ActiveRecord http://en.wikipedia.org/wiki/Active_record_pattern
Easier to learn <?php ... // Get the user object from FQL table $fb_user      =  new  Facebook_User( 12345 ); // Get the user's items from local SQL table $items  = Items::find( 'fb_user_id = ?' ,  $fb_user ->uid); ... ?> <?php ... // Get the user object from FQL table $fb_lib =  new  Facebook(API_KEY, SECRET_KEY); $fb_client =  $fb_lib ->api_client; $results =  $fb_client ->fql_query( 'SELECT uid, first_name, last_name, ... FROM user WHERE uid = &quot;12345&quot;' ); $fb_user_array = array_pop( $results ); // Get the user's items from local SQL table $items = Items::find( 'fb_user_id = ?' ,  $fb_user [ 'uid' ]); ... ?>
Don’t build CRUD ,[object Object],<?php ... // Get the user object from FQL table $fb_user =  new  Facebook_User( 12345 ); // Get an item from local SQL table $item =  new  Item( 1 ); // Bind item to the user's items in local SQL table $item_bind =  new  Item_Bind(); $item_bind ->fb_uid =  $fb_user ->uid; $item_bind ->item_id =  $item ->id; $item_bind ->save(); ... ?>
FBML ,[object Object],[object Object],[object Object],http://wiki.developers.facebook.com/index.php/FBML
FBML Proxy <html> ... <h1> {fb_profile_pic uid=&quot;12345&quot; size=&quot;thumb&quot; } {fb_name uid=&quot;12345&quot; } </h1> <hr/> <p> {fb_user_status uid=&quot;12345&quot; linked=&quot;false&quot; } </p> ... </html>
[object Object],[object Object],[object Object],Why stop with FBML?
UI Components < html > ... {Grid recordset=$recordset} {Column header=&quot;ID&quot; field=&quot;id&quot;} {Column header=&quot;Name&quot; field=&quot;name&quot;} {ColumnComplex header=&quot;Email&quot;} < a  href = &quot;mailto:{$record.email}&quot; > {$record.email} </ a > {/ColumnComplex} {/Grid} ... </ html > Make a grid - 3 columns (ID, Name, Email) - Loop through items in $recordset for rows < html > ... < table > < tr > < th > ID </ th > < th > Name </ th > < th > Email </ th > </ tr > <?php   foreach  ( $recordset   as   $record ) {  ?> < tr > < td > <? =  $record ->id  ?> </ td > < td > <? =  $record ->name  ?> </ td > < td > < a  href =&quot; mailto: <? =  $record ->email  ?> &quot; > <? =  $record ->email  ?> </ a > </ td > </ tr > <?php  }  ?> </ table > ... </ html > ID Name Email 1 John Doe [email_address] 2 Steve Smith [email_address]
Wrapping AJAX Libraries < html > ... < input  id = &quot;mb1&quot;  type = &quot;button&quot;  value = &quot;Show Popup&quot;  /> < script > Ext.onReady( function () { Ext.get( 'mb1' ).on( 'click' ,  function (e) { Ext.MessageBox.confirm( 'Confirm' ,  'Are you sure you want to do that?' , showResult); } ); </ script > ... </ html > < html > ... {PopupButton value=&quot;Show Popup&quot; header=&quot;Confirm&quot; message=&quot;Are you sure you want to do that?&quot; callback=&quot;showResult&quot;} ... </ html > http://extjs.com /
Multi-application interfaces http://zynga.com /
Make it work. Make it right. Make it fast. Make it fast. Make it fast.
Make a framework. Make it right. Make it fast. Make it fast. Make it fast.
Make a framework. Make it right. Use a framework. Use a framework. Use a framework.
Make a framework. Make great FB apps. Use a framework. Use a framework. Use a framework.
Shameless Plug ,[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your MindCICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mindciconf
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginnersjeroenvdmeer
 
Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social PluginsAizat Faiz
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsJohn Brunswick
 
Make Your Own Damn SEO Tools (Using Google Docs!)
Make Your Own Damn SEO Tools (Using Google Docs!)Make Your Own Damn SEO Tools (Using Google Docs!)
Make Your Own Damn SEO Tools (Using Google Docs!)Sean Malseed
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?brynary
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 
Make Everyone a Tester: Natural Language Acceptance Testing
Make Everyone a Tester: Natural Language Acceptance TestingMake Everyone a Tester: Natural Language Acceptance Testing
Make Everyone a Tester: Natural Language Acceptance TestingViget Labs
 
[PyConZA 2017] Web Scraping: Unleash your Internet Viking
[PyConZA 2017] Web Scraping: Unleash your Internet Viking[PyConZA 2017] Web Scraping: Unleash your Internet Viking
[PyConZA 2017] Web Scraping: Unleash your Internet VikingAndrew Collier
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML FormsMike Crabb
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching ResurrectedBen Scofield
 

Was ist angesagt? (16)

Jabber Bot
Jabber BotJabber Bot
Jabber Bot
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your MindCICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
 
PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social Plugins
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
PHP
PHPPHP
PHP
 
Make Your Own Damn SEO Tools (Using Google Docs!)
Make Your Own Damn SEO Tools (Using Google Docs!)Make Your Own Damn SEO Tools (Using Google Docs!)
Make Your Own Damn SEO Tools (Using Google Docs!)
 
Zend Form Tutorial
Zend Form TutorialZend Form Tutorial
Zend Form Tutorial
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
Make Everyone a Tester: Natural Language Acceptance Testing
Make Everyone a Tester: Natural Language Acceptance TestingMake Everyone a Tester: Natural Language Acceptance Testing
Make Everyone a Tester: Natural Language Acceptance Testing
 
[PyConZA 2017] Web Scraping: Unleash your Internet Viking
[PyConZA 2017] Web Scraping: Unleash your Internet Viking[PyConZA 2017] Web Scraping: Unleash your Internet Viking
[PyConZA 2017] Web Scraping: Unleash your Internet Viking
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
Selenium for-ops
Selenium for-opsSelenium for-ops
Selenium for-ops
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching Resurrected
 

Andere mochten auch

Facebook Presto presentation
Facebook Presto presentationFacebook Presto presentation
Facebook Presto presentationCyanny LIANG
 
Happy facebook developer
Happy facebook developerHappy facebook developer
Happy facebook developerYu-Wei Chuang
 
Making Facebook Faster
Making Facebook FasterMaking Facebook Faster
Making Facebook Fasterguest1240e7c
 
Facebook App Development
Facebook App DevelopmentFacebook App Development
Facebook App DevelopmentCristiano Betta
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Colin Su
 
Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandMatthew Turland
 
Workshop : Facebook JavaScript SDK
Workshop : Facebook JavaScript SDKWorkshop : Facebook JavaScript SDK
Workshop : Facebook JavaScript SDKDimitar Danailov
 
Introduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKIntroduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKColin Su
 
Introduction to facebook java script sdk
Introduction to facebook java script sdk Introduction to facebook java script sdk
Introduction to facebook java script sdk Yi-Fan Chu
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Yi-Fan Chu
 
Facebook Competitive Advantage (social networking)
Facebook Competitive Advantage (social networking)Facebook Competitive Advantage (social networking)
Facebook Competitive Advantage (social networking)Akash Senapaty
 
Facebook Architecture - Breaking it Open
Facebook Architecture - Breaking it OpenFacebook Architecture - Breaking it Open
Facebook Architecture - Breaking it OpenHARMAN Services
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M usersJongyoon Choi
 

Andere mochten auch (14)

Facebook Presto presentation
Facebook Presto presentationFacebook Presto presentation
Facebook Presto presentation
 
Happy facebook developer
Happy facebook developerHappy facebook developer
Happy facebook developer
 
Making Facebook Faster
Making Facebook FasterMaking Facebook Faster
Making Facebook Faster
 
Facebook App Development
Facebook App DevelopmentFacebook App Development
Facebook App Development
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)
 
Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew Turland
 
Workshop : Facebook JavaScript SDK
Workshop : Facebook JavaScript SDKWorkshop : Facebook JavaScript SDK
Workshop : Facebook JavaScript SDK
 
Introduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKIntroduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDK
 
Introduction to facebook java script sdk
Introduction to facebook java script sdk Introduction to facebook java script sdk
Introduction to facebook java script sdk
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Introduction to facebook javascript sdk
Introduction to facebook javascript sdk
 
Facebook + Ruby
Facebook + RubyFacebook + Ruby
Facebook + Ruby
 
Facebook Competitive Advantage (social networking)
Facebook Competitive Advantage (social networking)Facebook Competitive Advantage (social networking)
Facebook Competitive Advantage (social networking)
 
Facebook Architecture - Breaking it Open
Facebook Architecture - Breaking it OpenFacebook Architecture - Breaking it Open
Facebook Architecture - Breaking it Open
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M users
 

Ähnlich wie Facebook Development with Zend Framework

Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Michiel Rook
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в MagentoMagecom Ukraine
 
Flash templates for Joomla!
Flash templates for Joomla!Flash templates for Joomla!
Flash templates for Joomla!Herman Peeren
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Alfresco Software
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Alfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Software
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rob
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To LampAmzad Hossain
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Phpfunkatron
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop APIChris Jean
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsPete DuMelle
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCPPete DuMelle
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterStraight North
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructureguest517f2f
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructurePamela Fox
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...Kirill Chebunin
 
Struts2
Struts2Struts2
Struts2yuvalb
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 

Ähnlich wie Facebook Development with Zend Framework (20)

Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Flash templates for Joomla!
Flash templates for Joomla!Flash templates for Joomla!
Flash templates for Joomla!
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Alfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Forms Service Deep Dive
Alfresco Forms Service Deep Dive
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCP
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Alfresco Search Internals
Alfresco Search InternalsAlfresco Search Internals
Alfresco Search Internals
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
Struts2
Struts2Struts2
Struts2
 
Html5
Html5Html5
Html5
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 

Kürzlich hochgeladen

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 

Kürzlich hochgeladen (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 

Facebook Development with Zend Framework

  • 1. Facebook Development using Zend Framework Brett Harris
  • 2. Make it work. Make it right. Make it fast. Make it fast. Make it fast.
  • 3.
  • 4.
  • 7.
  • 10. FBML Parser <html> ... <h1> <fb:profile-pic uid=&quot;12345&quot; size=&quot;thumb&quot; /> <fb:name uid=&quot;12345&quot; /> </h1> <hr/> <p> <fb:user-status uid=&quot;12345&quot; linked=&quot;false&quot;/> </p> ... </html>
  • 11. FBML Parser Parsed by Facebook Not parsed Brett Harris is presenting at ZendCon
  • 12. FBML Parser Proxy function smarty_function_fb_name( $params , & $smarty ) { if (Framework_Config::get( 'MODE') == 'local' ) { return 'Grant Raphael' ; } $fbml = '<fb:name ' ; foreach ( $params as $key => $value ) { $fbml .= $key . '=&quot;' . addslashes( $value ) . '&quot;' ; } $fbml .= ' />' ; return $fbml ; } http://smarty.net/manual/en/plugins.php
  • 13. FBML Parsing Mock <html> ... <h1> {fb_profile_pic uid=&quot;12345&quot; size=&quot;thumb&quot; } {fb_name uid=&quot;12345&quot; } </h1> <hr/> <p> {fb_user_status uid=&quot;12345&quot; linked=&quot;false&quot; } </p> ... </html>
  • 14. FBML Parsing Mock Grant Raphael is updating their status Parsed by Facebook Not parsed Brett Harris is speaking at ZendCon
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 24. Easier to learn <?php ... // Get the user object from FQL table $fb_user = new Facebook_User( 12345 ); // Get the user's items from local SQL table $items = Items::find( 'fb_user_id = ?' , $fb_user ->uid); ... ?> <?php ... // Get the user object from FQL table $fb_lib = new Facebook(API_KEY, SECRET_KEY); $fb_client = $fb_lib ->api_client; $results = $fb_client ->fql_query( 'SELECT uid, first_name, last_name, ... FROM user WHERE uid = &quot;12345&quot;' ); $fb_user_array = array_pop( $results ); // Get the user's items from local SQL table $items = Items::find( 'fb_user_id = ?' , $fb_user [ 'uid' ]); ... ?>
  • 25.
  • 26.
  • 27. FBML Proxy <html> ... <h1> {fb_profile_pic uid=&quot;12345&quot; size=&quot;thumb&quot; } {fb_name uid=&quot;12345&quot; } </h1> <hr/> <p> {fb_user_status uid=&quot;12345&quot; linked=&quot;false&quot; } </p> ... </html>
  • 28.
  • 29. UI Components < html > ... {Grid recordset=$recordset} {Column header=&quot;ID&quot; field=&quot;id&quot;} {Column header=&quot;Name&quot; field=&quot;name&quot;} {ColumnComplex header=&quot;Email&quot;} < a href = &quot;mailto:{$record.email}&quot; > {$record.email} </ a > {/ColumnComplex} {/Grid} ... </ html > Make a grid - 3 columns (ID, Name, Email) - Loop through items in $recordset for rows < html > ... < table > < tr > < th > ID </ th > < th > Name </ th > < th > Email </ th > </ tr > <?php foreach ( $recordset as $record ) { ?> < tr > < td > <? = $record ->id ?> </ td > < td > <? = $record ->name ?> </ td > < td > < a href =&quot; mailto: <? = $record ->email ?> &quot; > <? = $record ->email ?> </ a > </ td > </ tr > <?php } ?> </ table > ... </ html > ID Name Email 1 John Doe [email_address] 2 Steve Smith [email_address]
  • 30. Wrapping AJAX Libraries < html > ... < input id = &quot;mb1&quot; type = &quot;button&quot; value = &quot;Show Popup&quot; /> < script > Ext.onReady( function () { Ext.get( 'mb1' ).on( 'click' , function (e) { Ext.MessageBox.confirm( 'Confirm' , 'Are you sure you want to do that?' , showResult); } ); </ script > ... </ html > < html > ... {PopupButton value=&quot;Show Popup&quot; header=&quot;Confirm&quot; message=&quot;Are you sure you want to do that?&quot; callback=&quot;showResult&quot;} ... </ html > http://extjs.com /
  • 32. Make it work. Make it right. Make it fast. Make it fast. Make it fast.
  • 33. Make a framework. Make it right. Make it fast. Make it fast. Make it fast.
  • 34. Make a framework. Make it right. Use a framework. Use a framework. Use a framework.
  • 35. Make a framework. Make great FB apps. Use a framework. Use a framework. Use a framework.
  • 36.