SlideShare une entreprise Scribd logo
1  sur  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]

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 
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
 
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
 
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
 
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
 
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
 

Similaire à 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
 
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
 
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
 
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
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

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.