Your SlideShare is downloading. ×
  • Like
Building Social Enterprise with Ruby and Salesforce
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Building Social Enterprise with Ruby and Salesforce


This was my presentation at the Oct 4th, Dallas Ruby Brigade night. It covers Lean Methodology and using DatabaseDotCom and Ruby …

This was my presentation at the Oct 4th, Dallas Ruby Brigade night. It covers Lean Methodology and using DatabaseDotCom and Ruby
Source Code

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • Il y a plus 500 milliards membres actives pour le réseau social - Facebook.


  • 1. Building Social Enterprise with Ruby and Salesforce
    Dallas Ruby Brigade, Oct 4th, 2011
    Presented by Raymond Gao
  • 2. Growth of Cloud Computing & Social Enterprise
  • 3. Growth of Cloud Computing
  • 4. Cloud Computing will be a $ 241 billion mkt by 2020
  • 5. Market Cap of Top Cloud Computing Companies
  • 6. Social Revolution
    4 hours
    per month
    Web Usage
    Rest of the Web
    Sources: Ben Elowitz, Wetpaint / comScore
  • 7. Facebook Members (Growth of Social Networking)
    More than 500 million active users
    over 900 million objects (pages, groups, events and community pages)
    About 70% of Facebook users are outside the United States
    9 Novembre, 2010
    2010 IUT Cloud Computing Seminar
  • 8. Architecture for the Real World
  • 9. User
    Classic Application Architecture
    Screens exposed to the end users
    Your business logic
    Your Data Model
  • 10. Idealized Situation
  • 11. How are your opinions?
    What do you like most?
    What do you like least?
    What kinds of difficulties have you had?
    What do you think the real world is like?
  • 12. Small Problem – Easy Fix
  • 13. Just lift the car out of water
  • 14. Initial Disappointment
  • 15. Bring on Heavier Equipment
  • 16. Whoops, That too was a surprise!
  • 17. Guess what’s next?
  • 18. An Example DB Schema
    Source: from Internet
  • 19. Another Example
    Source: from Internet
  • 20. More Examples
    Source: from Internet
  • 21. 1st attempt at reinventing the wheel
  • 22. Reinvent the wheel is tougher than you think
  • 23. Classic Approach Meets Classic Problems
    Too Simplistic
    Linear model
    Static Input / Output
    Either Quality, Time, or Cost
    Read my blog -
  • 24. Lean Approach – Smart Learning
  • 25. Data Store is everywhere
    Browsers (Chrome, Firefox, IE, Opera)
    Mobile devices (Iphone, Android, Blackberry, Windows CE, Symbian)
    Adobe Flash Applications
    Desktop Applications
    Game Consoles,
    Everywhere !!!
  • 26. Meshed Architecture (Macro View )
    Community Data Models
  • 27. Growth of No-SQL DBs
  • 28. Some Causes
    SW developers are not natural born DBAs
    Developing a good data scheme is pretty tough
    Convince your partner to use your DB scheme is tougher!
    DB administration could be a full time job
  • 29. Mesh Architecture (Micro view)
    Additional Data Sources
    High Perf
    Data Services
    (No-SQL, In-Memory
    Cached Objects)
    Data Store
    Transient Data
  • 30. Benefits of Ruby on SF
    There are lots of incentive to use Ruby
    Tools for building web-apps (ERB, HAML, Markdowns)
    Methodology (BDD – Cucumbe, Rspec, Shoulda)
    Testing (Webrat, Capybara, Unit Testing)
    Ease of Deployment & code version & collaboration (Git)
    Extensive Code libraries – Github & RubyGems
    Many more
  • 31. History of Ruby on Salesforce
    Version 0 – API era
    Version 1 + 2 (REST + SOAP) – Era
    Version 3 – (Pure REST) era
  • 32. History of Ruby / Salesforce
  • 33. Salesforce Social Platform
  • 34. Example App – Ruby Social Network Updater
  • 35. The Datbase.ComGEM
    Covers both Sobject & Chatter API
    Full CRUD on DDL side
    User-name password
    Security token
    Oauth Flow
  • 36. Basic Steps
    Use the GEMs
    Create a client with Consumer key + secret
    Authenticate (3 options)
    Materialize an Sobject + set Namespace (module name)
    CRUD operation on the object
    Form-building attributes
  • 37. Use the Gem
    gem 'databasedotcom'
    gem 'databasedotcom-rails’ (optional)
    Run bundleinstall
  • 38. Initialize the client
    # configure client id/secret explicitly # client = :client_id => "xxx", :client_secret => "yyy"
    # configure client id/secret from a YAML file # client = "databasedotcom.yml"
    # configure client id/secret from the environment # client =
  • 39. Authenticate
    # authenticate with a username and password client.authenticate(:username => "", :password => "arkham")
    # authenticate with a callback hash from Omniauthclient.authenticate(hash_from_omniauth)
    # authenticate with an externally-acquired OAuth2 access token client.authenticate(:token => "whoa-that-is-long")
  • 40. Materialize a SObject Class
    CRUD operations
    Contact.attributes#=> ["Name", "Company", "Phone"]
    ron= Contact.find("rons_id")
    puts ron["Company"] #=> "The Olde Company, Inc."
    ron["Company"] = "Some New Gig, LLC"
    ron.reload["Company"] #=> "The Olde Company, Inc."
    ron["Company"] = "Some New Gig, LLC"
    ron.reload["Company"]#=> "Some New Gig, LLC"
  • 41. Form-building attributes
    Contact.label_for("Phone”)#=> "Phone Number”
    Contact.picklist_values("Honorific") #=> ["Mr.", "Ms.", "Dr."]
  • 42. Get More Info
    Presentation -
    API doc -
    Join the Google Group ActiveSalesforce
  • 43. Q & A
  • 44. The End
    Twitter: raygao
    Github: raygao