+ All Categories
Home > Technology > Building Social Enterprise with Ruby and Salesforce

Building Social Enterprise with Ruby and Salesforce

Date post: 14-Nov-2014
Category:
Upload: raymond-gao
View: 1,956 times
Download: 1 times
Share this document with a friend
Description:
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
Popular Tags:
44
Building Social Enterprise with Ruby and Salesforce Dallas Ruby Brigade, Oct 4 th , 2011 Presented by Raymond Gao
Transcript
Page 1: Building Social Enterprise with Ruby and Salesforce

Building Social

Enterprise with Ruby and

Salesforce

Dallas Ruby Brigade, Oct 4th, 2011

Presented by Raymond Gao

Page 2: Building Social Enterprise with Ruby and Salesforce

Growth of Cloud Computing & Social

Enterprise

Page 3: Building Social Enterprise with Ruby and Salesforce

Growth of Cloud Computing

Page 4: Building Social Enterprise with Ruby and Salesforce

Cloud Computing will be a $ 241 billion mkt by 2020

Page 5: Building Social Enterprise with Ruby and Salesforce

Market Cap of Top Cloud Computing CompaniesName (Ticker) Market Cap

(Billions )Stock Price ($)

Key Product(s)

Google (GOOG) $160 B $495.52 G App Engine

Amazon (AMZN) $96.23 B $211.98 AWS

Vmware (VMW) $33.31 B $78.89 Server Virtualization

Salesforce (CRM) $15.16 B $111.91 Force Platform

NetApp (NTAP) $12.39 B $33.64 Storage

RackSpace (RAX) $31.49 B $31.49 Cloud Services

Page 6: Building Social Enterprise with Ruby and Salesforce

2010

2011

Web Usage 4 hoursper month

Rest of the Web

Sources: Ben Elowitz, Wetpaint / comScore

Social Revolution

Page 7: Building Social Enterprise with Ruby and Salesforce

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

7

Page 8: Building Social Enterprise with Ruby and Salesforce

Architecture for the Real World

Page 9: Building Social Enterprise with Ruby and Salesforce

Your Data Model

Your business logic

Data Layer

Application Logic

User Interface Screens exposed to the end users

Classic Application Architecture

Page 10: Building Social Enterprise with Ruby and Salesforce

Idealized Situation

Page 11: Building Social Enterprise with Ruby and Salesforce

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?

Page 12: Building Social Enterprise with Ruby and Salesforce

Small Problem – Easy Fix

Page 13: Building Social Enterprise with Ruby and Salesforce

Just lift the car out of water

Page 14: Building Social Enterprise with Ruby and Salesforce

Initial Disappointment

Page 15: Building Social Enterprise with Ruby and Salesforce

Bring on Heavier Equipment

Page 16: Building Social Enterprise with Ruby and Salesforce

Whoops, That too was a surprise!

Page 17: Building Social Enterprise with Ruby and Salesforce

Guess what’s next?

Page 18: Building Social Enterprise with Ruby and Salesforce

An Example DB Schema

Source: from Internet

Page 19: Building Social Enterprise with Ruby and Salesforce

Another Example

Source: from Internet

Page 20: Building Social Enterprise with Ruby and Salesforce

More Examples

Source: from Internet

Page 21: Building Social Enterprise with Ruby and Salesforce

1st attempt at reinventing the wheel

Page 22: Building Social Enterprise with Ruby and Salesforce

Reinvent the wheel is tougher than you think

Page 23: Building Social Enterprise with Ruby and Salesforce

Classic Approach Meets Classic Problems

Too Simplistic

Linear model

Inflexible

Static Input / Output

Either Quality, Time, or Cost

Read my blog - http://www.are4.us/?p=815

Page 24: Building Social Enterprise with Ruby and Salesforce

Lean Approach – Smart Learning

Page 25: Building Social Enterprise with Ruby and Salesforce

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 !!!

Page 26: Building Social Enterprise with Ruby and Salesforce

Meshed Architecture (Macro View )

Community Data Models

Page 27: Building Social Enterprise with Ruby and Salesforce

Growth of No-SQL DBs

Page 28: Building Social Enterprise with Ruby and Salesforce

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

Backup

Security

Profiles

Etc

Page 29: Building Social Enterprise with Ruby and Salesforce

Mesh Architecture (Micro view)

PersistentData Store(RDBMS)

High PerfData Services

(No-SQL, In-MemoryCached Objects)

Transient Data

Additional Data Sources

Page 30: Building Social Enterprise with Ruby and Salesforce

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

Page 31: Building Social Enterprise with Ruby and Salesforce

History of Ruby on Salesforce

Version 0 – API era

Version 1 + 2 (REST + SOAP) – Force.com Era

Version 3 – (Pure REST) Database.com era

Page 32: Building Social Enterprise with Ruby and Salesforce

History of Ruby / Salesforce

Page 33: Building Social Enterprise with Ruby and Salesforce

Salesforce Social Platform

Page 34: Building Social Enterprise with Ruby and Salesforce

Example App – Ruby Social

Network Updater

Page 35: Building Social Enterprise with Ruby and Salesforce

The Datbase.Com GEM

Covers both Sobject & Chatter API

Full CRUD on DDL side

Support:

User-name password

Security token

Oauth Flow

Page 36: Building Social Enterprise with Ruby and Salesforce

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

Page 37: Building Social Enterprise with Ruby and Salesforce

Use the Gem

Add GEMs to Gemfile

gem 'databasedotcom'

gem 'databasedotcom-rails’ (optional)

Run bundle install

Page 38: Building Social Enterprise with Ruby and Salesforce

Initialize the client

# configure client id/secret explicitly # client = Databasedotcom::Client.new :client_id => "xxx", :client_secret => "yyy"

# configure client id/secret from a YAML file # client = Databasedotcom::Client.new "databasedotcom.yml"

# configure client id/secret from the environment # client = Databasedotcom::Client.new

Page 39: Building Social Enterprise with Ruby and Salesforce

Authenticate

# authenticate with a username and password client.authenticate(:username => "[email protected]", :password => "arkham")

# authenticate with a callback hash from Omniauth client.authenticate(hash_from_omniauth)

# authenticate with an externally-acquired OAuth2 access token client.authenticate(:token => "whoa-that-is-long")

Page 40: Building Social Enterprise with Ruby and Salesforce

client.materialize("Contact")

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.save

ron.reload["Company"] #=> "Some New Gig, LLC"

Materialize a SObject ClassCRUD operations

Page 41: Building Social Enterprise with Ruby and Salesforce

Form-building attributes

Contact.label_for("Phone”)#=> "Phone Number”

Contact.picklist_values("Honorific") #=> ["Mr.", "Ms.", "Dr."]

Page 42: Building Social Enterprise with Ruby and Salesforce

Get More Info

Presentation - http://dreamforce-demo.heroku.com/slides#slide17

API doc - http://rubydoc.info/gems/databasedotcom/frames

Join the Google Group ActiveSalesforcehttp://groups.google.com/group/activesalesforce

Page 43: Building Social Enterprise with Ruby and Salesforce

Q & A

Page 44: Building Social Enterprise with Ruby and Salesforce

The End

Blog: http://raysblog.are4.us

Twitter: raygao

Github: raygao

Email: [email protected]


Recommended