Building Social Enterprise with Ruby and Salesforce<br />Dallas Ruby Brigade, Oct 4th, 2011<br />Presented by Raymond Gao<...
Growth of Cloud Computing & Social Enterprise<br />
Growth of Cloud Computing<br />
Cloud Computing will be a  $ 241 billion mkt by 2020<br />
Market Cap of Top Cloud Computing Companies<br />
Social Revolution<br />4 hours<br />per month<br />Web Usage<br />Rest of the Web<br />2010<br />2011<br />Sources:  Ben E...
Facebook Members (Growth of Social Networking)<br />More than 500 million active users<br />over 900 million objects (page...
Architecture for the Real World<br />
User<br /> Interface<br />Application<br /> Logic<br />Data<br /> Layer<br />Classic Application Architecture<br />Screens...
Idealized Situation<br />
How are your opinions?<br />What do you like most?<br />What do you like least?<br />What kinds of difficulties have you h...
Small Problem – Easy Fix<br />
Just lift the car out of water<br />
Initial Disappointment<br />
Bring on Heavier Equipment<br />
Whoops, That too was a surprise!<br />
Guess what’s next?<br />
An Example DB Schema<br />Source: from Internet<br />
Another Example<br />Source: from Internet<br />
More Examples<br />Source: from Internet<br />
1st attempt at reinventing the wheel<br />
Reinvent the wheel is tougher than you think<br />
Classic Approach Meets Classic Problems<br />Too Simplistic<br />Linear model<br />Inflexible<br />Static Input / Output<b...
Lean Approach – Smart Learning<br />
Data Store is everywhere<br />Browsers (Chrome, Firefox, IE, Opera)<br />Mobile devices (Iphone, Android, Blackberry, Wind...
Meshed Architecture (Macro View )<br />Community Data Models<br />
Growth of No-SQL DBs<br />
Some Causes<br />SW developers are not natural born DBAs<br />Developing a good data scheme is pretty tough<br />Convince ...
Mesh Architecture (Micro view)<br />Additional Data Sources<br />High Perf<br />Data Services<br />(No-SQL, In-Memory<br /...
Benefits of Ruby on SF<br />There are lots of incentive to use Ruby<br />Tools for building web-apps (ERB, HAML, Markdowns...
History of Ruby on Salesforce<br />Version 0 – API era<br />Version 1 + 2 (REST + SOAP) – Force.com Era<br />Version 3 – (...
History of Ruby / Salesforce<br />
Salesforce Social Platform<br />
Example App – Ruby Social Network Updater<br />
The Datbase.ComGEM<br />Covers both Sobject & Chatter API<br />Full CRUD on DDL side<br />Support:<br />User-name password...
Basic Steps<br />Use the GEMs<br />Create a client with Consumer key + secret<br />Authenticate (3 options)<br />Materiali...
Use the Gem<br />AddGEMstoGemfile<br />gem 'databasedotcom'<br />gem 'databasedotcom-rails’ (optional)<br />Run bundleinst...
Initialize the client<br /># configure client id/secret explicitly # client = Databasedotcom::Client.new :client_id => "xx...
Authenticate<br /># authenticate with a username and password client.authenticate(:username => "wayne@manor.com", :passwor...
Materialize a SObject Class<br />CRUD operations<br />client.materialize("Contact") <br />Contact.attributes#=> ["Name", "...
Form-building attributes<br />Contact.label_for("Phone”)#=> "Phone Number”<br />Contact.picklist_values("Honorific") #=> [...
Get More Info<br />Presentation - http://dreamforce-demo.heroku.com/slides#slide17<br />API doc - http://rubydoc.info/gems...
 Q & A<br />
The End<br />Blog: http://raysblog.are4.us<br />Twitter: raygao<br />Github: raygao<br />Email: raygao@verizon.net<br />
Upcoming SlideShare
Loading in …5
×

Building Social Enterprise with Ruby and Salesforce

1,850
-1

Published on

This was my presentation at the Oct 4th, Dallas Ruby Brigade night. It covers Lean Methodology and using DatabaseDotCom and Ruby
Source Code
https://github.com/raygao/DallasRubyPresentation

Published in: Technology, Business
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
1,850
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • Il y a plus 500 milliards membres actives pour le réseau social - Facebook.
  • http://www.are4.us/?p=815
  • http://www.iconspedia.com/icon/database-inactive-hot-3-12.htmlhttp://aux.iconpedia.net/uploads/16675932432049440499.png
  • Building Social Enterprise with Ruby and Salesforce

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

    ×