SlideShare a Scribd company logo
Create a Force.com-
Powered Facebook
  App on Heroku

   Pat Patterson
   @metadaddy
   Principal Developer Evangelist
   salesforce.com
Safe Harbor Statement
“Safe harbor” statement under the Private Securities Litigation Reform Act of 1995: This presentation and the oral remarks that
accompany it contain forward-looking statements the achievement of which involves risks, uncertainties and assumptions. If any
such risks or uncertainties materialize or if any of the assumptions proves incorrect, our results could differ materially from the
results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact
could be deemed forward-looking, including any statements concerning new, planned or upgraded services or technology
developments, any projections of subscriber growth, earnings, revenues or other financial items and any statements regarding
strategies or plans of management for future operations, statements of belief and statements about future customer contracts or
future customer use of our services.
The risks and uncertainties referred to above include - but are not limited to - interruptions or delays in our service or our Web
hosting; our ability to complete and successfully release new and improved versions of our on-demand platform and development
environment; our new business model; problems integrating, launching or operating services based on newly acquired businesses
or technologies, breach of our security measures; possible fluctuations in our operating results and rate of growth; the emerging
market in which we operate; our relatively limited operating history; our ability to hire, retain and motivate our employees and
manage our growth; competition; our ability to continue to release and gain customer acceptance of new and improved versions of
our CRM service; unanticipated changes in our effective tax rate; fluctuations in the number of shares outstanding; the price of
such shares; foreign currency exchange rates and interest rates.
Further information on these and other factors that could affect our financial results is included in the reports on Forms 10-K, 10-Q
and 8-K and in other filings we make with the Securities and Exchange Commission from time to time, including our Form 10-K for
the fiscal year ended January 31, 2007. These documents are available on the SEC Filings section of the Investor Information
section of our website at www.salesforce.com/investor.

Any unreleased services or features referenced in this or other press releases or public statements are not currently available and
may not be delivered on time or at all. Customers who purchase our services should make purchase decisions based upon features
that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking
statements, except as required by law.
Agenda
• Brief overview of Heroku
• Create a Facebook app with Heroku
  – Pull data from Force.com
  – Show some best practices
  – Give away some money!
1,250,000+ Apps Running on Heroku
The Heroku Cloud Application Platform

Run Anything


Forget Servers          $ heroku create -s cedar



Deploy Instantly        $ git push heroku master



Scale with Ease


Extend with Add-ons
Heroku and Facebook:
    Even Simpler!
The Brief
• Create a Facebook app to
  – Retrieve a list of charities from Force.com
  – Collect votes on charities
  – Restrict users to a single vote
• Create a Force.com app to
  – Manage the list of charities
  – When the contest is over, initiate the approval
    process for a donation to the winning charity
Charity App Back-end
• Let’s look at how employees manage
  charities in Force.com
Force.com REST API
• Authenticate/authorize access via OAuth 2.0
• Records in Force.com identified by URLs
   – /services/data/v24.0/sobjects/Charity__c/a0
     0d0000002XU4r
• CRUD via POST/GET/PATCH/DELETE
• SOQL query interface
   – /services/data/v24.0/query?q=SELECT+Na
     me+FROM+Charity__c
Step 1
• Let’s extend our basic Facebook app
  to pull charity data from Force.com
Efficiency
• App gets charity data from Force.com
  on every page view
  – GOOD: data is timely
  – BAD: resource
    consumption, performance
Best Practice
• Let’s use Memcache to store charity
  data
  – Facebook app loads cache from
    Force.com
  – Force.com trigger flushes cache on any
    change
Step 2
• Add Memcacheaddon
• Store charity data in Memcache
• Configure Force.com app to flush
  cache on any change to charity data
Let’s Get Voting!
• But where do we store votes?
HerokuPostgres
• Managed SQL database
• Free shared-database addon for
  development
• Several tiers of paid service for
  production
Step 3
• Store votes in Postgres
• Expose vote totals via RESTful Web
  service
• Integrate with approval process in
  Force.com
Vote
• Insert Heroku app URL here!
Conclusion
• Use Heroku for your high-volume
  Facebook apps
• Use the Force.com REST API to
  integrate external apps with
  Force.com
• Integration is straightforward, but
  follow best practices to get a great
  result!
Resources

 www.heroku.com/facebook

 developer.force.com/REST

workbench.developerforce.com

     bit.ly/cs12-facebook

More Related Content

What's hot (20)

PPTX
Manage and consume the api
Achyuta Lakshmi Puvvala
 
PPTX
Fremont Salesforce Community Group - Salesforce Labs Day - October 2019
Jayant Jindal
 
PPTX
Winter'18 Developer Preview Webinar
Salesforce Developers
 
PPTX
Embed Customer Support into your Apps with Snap-ins
Salesforce Developers
 
PPTX
Salesforce Lightning Web Components - Open Source
Jayant Jindal
 
PPTX
Unleash the Power of Apex Realtime Debugger
Salesforce Developers
 
PPTX
Forcelandia 2016 Wave App Development
Skip Sauls
 
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
PPTX
Building BOTS on App Cloud
Salesforce Developers
 
PDF
Salesforce Lightning Customization Roadmap (TDX18)
Developer Force
 
PDF
Summer '18 Developer Highlights
Salesforce Developers
 
PDF
Salesforce Lightning Supersession (TDX18)
Developer Force
 
PPTX
Salesforce Lightning Component Framework Roadmap (TDX18)
Developer Force
 
PPTX
Build Better Communities with Lightning
Salesforce Developers
 
PPT
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
PDF
Agile Development with Heroku webinar
Salesforce Developers
 
PPTX
Modern UI development with Lightning Components - Spanish!
Alba Azcona Rivas
 
PPTX
Mule organization
Son Nguyen
 
PDF
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Jayant Jindal
 
PPTX
Integration with the Salesforce App Cloud - Amsterdam 2016
Samuel De Rycke
 
Manage and consume the api
Achyuta Lakshmi Puvvala
 
Fremont Salesforce Community Group - Salesforce Labs Day - October 2019
Jayant Jindal
 
Winter'18 Developer Preview Webinar
Salesforce Developers
 
Embed Customer Support into your Apps with Snap-ins
Salesforce Developers
 
Salesforce Lightning Web Components - Open Source
Jayant Jindal
 
Unleash the Power of Apex Realtime Debugger
Salesforce Developers
 
Forcelandia 2016 Wave App Development
Skip Sauls
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
Building BOTS on App Cloud
Salesforce Developers
 
Salesforce Lightning Customization Roadmap (TDX18)
Developer Force
 
Summer '18 Developer Highlights
Salesforce Developers
 
Salesforce Lightning Supersession (TDX18)
Developer Force
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Developer Force
 
Build Better Communities with Lightning
Salesforce Developers
 
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
Agile Development with Heroku webinar
Salesforce Developers
 
Modern UI development with Lightning Components - Spanish!
Alba Azcona Rivas
 
Mule organization
Son Nguyen
 
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Jayant Jindal
 
Integration with the Salesforce App Cloud - Amsterdam 2016
Samuel De Rycke
 

Similar to Create a Force.com-Powered Facebook App on Heroku (20)

PPTX
Dreamforce 2013 - Heroku 5 use cases
Vincent Spehner
 
PDF
Building Mobile Apps That Deliver Salesforce to Your Employees
Salesforce Developers
 
PDF
Examples of Using Heroku With Force.com to Build Apps
Salesforce Developers
 
PPTX
Heroku - developer playground
Troy Sellers
 
PPTX
Introducing the Salesforce platform
John Stevenson
 
PPT
Dreamforce 13 developer session: Introduction to Heroku
John Stevenson
 
PPTX
Web Apps for Salesforce with Heroku Connect
Tom Gersic
 
PDF
Introduction to Heroku
Salesforce Developers
 
PPTX
Salesforce CCT Munich 2013 Introducing heroku - elastic, polyglot platform as...
John Stevenson
 
PPTX
Build Consumer-Facing Apps with Heroku Connect
Jeff Douglas
 
PDF
Heroku + Salesforce = Partner Success
Alexander Sutherland
 
PDF
Tour of Heroku + Salesforce Integration Methods
Salesforce Developers
 
PPT
Developers guide to the Salesforce1 Platform
John Stevenson
 
PPTX
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
Salesforce Developers
 
PDF
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
JAX London
 
PDF
Salesforce platform session 2
Salesforce - Sweden, Denmark, Norway
 
PPTX
Heroku Introduction: Scaling customer facing apps & services
John Stevenson
 
PPTX
Connect Your Clouds with Force.com
Jeff Douglas
 
PDF
Developing a Documentation Portal on Heroku
Salesforce Developers
 
PPTX
Build, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Salesforce Developers
 
Dreamforce 2013 - Heroku 5 use cases
Vincent Spehner
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Salesforce Developers
 
Examples of Using Heroku With Force.com to Build Apps
Salesforce Developers
 
Heroku - developer playground
Troy Sellers
 
Introducing the Salesforce platform
John Stevenson
 
Dreamforce 13 developer session: Introduction to Heroku
John Stevenson
 
Web Apps for Salesforce with Heroku Connect
Tom Gersic
 
Introduction to Heroku
Salesforce Developers
 
Salesforce CCT Munich 2013 Introducing heroku - elastic, polyglot platform as...
John Stevenson
 
Build Consumer-Facing Apps with Heroku Connect
Jeff Douglas
 
Heroku + Salesforce = Partner Success
Alexander Sutherland
 
Tour of Heroku + Salesforce Integration Methods
Salesforce Developers
 
Developers guide to the Salesforce1 Platform
John Stevenson
 
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
Salesforce Developers
 
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
JAX London
 
Salesforce platform session 2
Salesforce - Sweden, Denmark, Norway
 
Heroku Introduction: Scaling customer facing apps & services
John Stevenson
 
Connect Your Clouds with Force.com
Jeff Douglas
 
Developing a Documentation Portal on Heroku
Salesforce Developers
 
Build, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Salesforce Developers
 
Ad

More from Pat Patterson (20)

PPTX
DevOps from the Provider Perspective
Pat Patterson
 
PPTX
How Imprivata Combines External Data Sources for Business Insights
Pat Patterson
 
PPTX
Data Integration with Apache Kafka: What, Why, How
Pat Patterson
 
PPTX
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Pat Patterson
 
PPTX
Dealing with Drift: Building an Enterprise Data Lake
Pat Patterson
 
PPTX
Integrating with Einstein Analytics
Pat Patterson
 
PPTX
Efficient Schemas in Motion with Kafka and Schema Registry
Pat Patterson
 
PPTX
Dealing With Drift - Building an Enterprise Data Lake
Pat Patterson
 
PPTX
Building Data Pipelines with Spark and StreamSets
Pat Patterson
 
PPTX
Adaptive Data Cleansing with StreamSets and Cassandra
Pat Patterson
 
PDF
Building Custom Big Data Integrations
Pat Patterson
 
PPTX
Ingest and Stream Processing - What will you choose?
Pat Patterson
 
PPTX
Open Source Big Data Ingestion - Without the Heartburn!
Pat Patterson
 
PPTX
Ingest and Stream Processing - What will you choose?
Pat Patterson
 
PPTX
All Aboard the Boxcar! Going Beyond the Basics of REST
Pat Patterson
 
PPTX
Provisioning IDaaS - Using SCIM to Enable Cloud Identity
Pat Patterson
 
PPTX
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
Pat Patterson
 
PPTX
Enterprise IoT: Data in Context
Pat Patterson
 
PPTX
OData: A Standard API for Data Access
Pat Patterson
 
PPTX
API-Driven Relationships: Building The Trans-Internet Express of the Future
Pat Patterson
 
DevOps from the Provider Perspective
Pat Patterson
 
How Imprivata Combines External Data Sources for Business Insights
Pat Patterson
 
Data Integration with Apache Kafka: What, Why, How
Pat Patterson
 
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Pat Patterson
 
Dealing with Drift: Building an Enterprise Data Lake
Pat Patterson
 
Integrating with Einstein Analytics
Pat Patterson
 
Efficient Schemas in Motion with Kafka and Schema Registry
Pat Patterson
 
Dealing With Drift - Building an Enterprise Data Lake
Pat Patterson
 
Building Data Pipelines with Spark and StreamSets
Pat Patterson
 
Adaptive Data Cleansing with StreamSets and Cassandra
Pat Patterson
 
Building Custom Big Data Integrations
Pat Patterson
 
Ingest and Stream Processing - What will you choose?
Pat Patterson
 
Open Source Big Data Ingestion - Without the Heartburn!
Pat Patterson
 
Ingest and Stream Processing - What will you choose?
Pat Patterson
 
All Aboard the Boxcar! Going Beyond the Basics of REST
Pat Patterson
 
Provisioning IDaaS - Using SCIM to Enable Cloud Identity
Pat Patterson
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
Pat Patterson
 
Enterprise IoT: Data in Context
Pat Patterson
 
OData: A Standard API for Data Access
Pat Patterson
 
API-Driven Relationships: Building The Trans-Internet Express of the Future
Pat Patterson
 
Ad

Recently uploaded (20)

PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 

Create a Force.com-Powered Facebook App on Heroku

  • 1. Create a Force.com- Powered Facebook App on Heroku Pat Patterson @metadaddy Principal Developer Evangelist salesforce.com
  • 2. Safe Harbor Statement “Safe harbor” statement under the Private Securities Litigation Reform Act of 1995: This presentation and the oral remarks that accompany it contain forward-looking statements the achievement of which involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions proves incorrect, our results could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any statements concerning new, planned or upgraded services or technology developments, any projections of subscriber growth, earnings, revenues or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief and statements about future customer contracts or future customer use of our services. The risks and uncertainties referred to above include - but are not limited to - interruptions or delays in our service or our Web hosting; our ability to complete and successfully release new and improved versions of our on-demand platform and development environment; our new business model; problems integrating, launching or operating services based on newly acquired businesses or technologies, breach of our security measures; possible fluctuations in our operating results and rate of growth; the emerging market in which we operate; our relatively limited operating history; our ability to hire, retain and motivate our employees and manage our growth; competition; our ability to continue to release and gain customer acceptance of new and improved versions of our CRM service; unanticipated changes in our effective tax rate; fluctuations in the number of shares outstanding; the price of such shares; foreign currency exchange rates and interest rates. Further information on these and other factors that could affect our financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings we make with the Securities and Exchange Commission from time to time, including our Form 10-K for the fiscal year ended January 31, 2007. These documents are available on the SEC Filings section of the Investor Information section of our website at www.salesforce.com/investor. Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
  • 3. Agenda • Brief overview of Heroku • Create a Facebook app with Heroku – Pull data from Force.com – Show some best practices – Give away some money!
  • 5. The Heroku Cloud Application Platform Run Anything Forget Servers $ heroku create -s cedar Deploy Instantly $ git push heroku master Scale with Ease Extend with Add-ons
  • 6. Heroku and Facebook: Even Simpler!
  • 7. The Brief • Create a Facebook app to – Retrieve a list of charities from Force.com – Collect votes on charities – Restrict users to a single vote • Create a Force.com app to – Manage the list of charities – When the contest is over, initiate the approval process for a donation to the winning charity
  • 8. Charity App Back-end • Let’s look at how employees manage charities in Force.com
  • 9. Force.com REST API • Authenticate/authorize access via OAuth 2.0 • Records in Force.com identified by URLs – /services/data/v24.0/sobjects/Charity__c/a0 0d0000002XU4r • CRUD via POST/GET/PATCH/DELETE • SOQL query interface – /services/data/v24.0/query?q=SELECT+Na me+FROM+Charity__c
  • 10. Step 1 • Let’s extend our basic Facebook app to pull charity data from Force.com
  • 11. Efficiency • App gets charity data from Force.com on every page view – GOOD: data is timely – BAD: resource consumption, performance
  • 12. Best Practice • Let’s use Memcache to store charity data – Facebook app loads cache from Force.com – Force.com trigger flushes cache on any change
  • 13. Step 2 • Add Memcacheaddon • Store charity data in Memcache • Configure Force.com app to flush cache on any change to charity data
  • 14. Let’s Get Voting! • But where do we store votes?
  • 15. HerokuPostgres • Managed SQL database • Free shared-database addon for development • Several tiers of paid service for production
  • 16. Step 3 • Store votes in Postgres • Expose vote totals via RESTful Web service • Integrate with approval process in Force.com
  • 17. Vote • Insert Heroku app URL here!
  • 18. Conclusion • Use Heroku for your high-volume Facebook apps • Use the Force.com REST API to integrate external apps with Force.com • Integration is straightforward, but follow best practices to get a great result!

Editor's Notes

  • #2: Pre-session checklist: facebook dev page, workbench, Heroku home page, https://addons.heroku.com/
  • #5: Show ‘Trust & Manage’ tab of Heroku website to see current number
  • #6: Heroku makes cloud development simple
  • #7: Create a default Facebook app in Heroku. git clone to retrieve source. Point out envvars for config, mogli for Facebook Graph API interactions.
  • #9: Show ‘Charities’ tab in Cloudstock app in Force.com
  • #10: Show workbench to query data
  • #11: Copy over ‘stage 1’ source code. Point out oauth2 Ruby gem, new envvars for Force.com credentials, OAuth 2.0 log in, one line of code to pull charities from Force.com, code in index.erb to show charities. Commit, push to heroku, try running – oops!!! No values for envvars! Run script to set env vars. Try running again. Invite audience to hit app. Refresh app a few times. Explain how it’s likely a bit slow, since all traffic is being handled by a single dyno – let’s fix that right now by scaling it to 5 dynos.
  • #12: Make a change to one of the charity’s logos then refresh to show that we do always see fresh data. Invite audience to hit app. Go to Force.com System Overview page and show API usage increasing as the page is hit.
  • #13: Go to Herokuaddons page to point out Memcache add on.
  • #14: AddMemcacheaddon, copy over ‘stage 2’ source code, point out use of Dalli Ruby gem for Memcache. Point out caching – charity data, plus access token/instance URL for Force.com. Point out cache flush code. Go to Force.com app, show trigger, cache flush method, update remote site setting, custom setting. Push new code. Invite audience to start hitting the app and watch the API Usage meter not change. Reverse the change we made earlier in Force.com and show that charity data is updated, and API usage incremented once.
  • #15: Our brief says we need to integrate with approvals, so our Force.com app needs access to voting data, but where do we actually store it? Ask the audience – where should we store the votes?
  • #16: Go to addons page and show levels of HerokuPostgres service.
  • #17: Add shared-databaseaddon. Point out DataMapper usage, voting functionality – jQuery click handler posts vote to Ruby app
  • #18: Refresh the page a few times as the votes come in. When audience is all done, show code in FB app to return vote counts. Go to Force.com and show code to pull vote counts, initiate approval. Go to VF page and show vote counts, click button to initiate approval, show record is locked for approval.