SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Hands On Ruby on Rails
Building Your First App
Chris Kemp, salesforce.com, Sr. Solution Engineer
Safe Harbor
 Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

 This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if
 any of the assumptions proves incorrect, the results of salesforce.com, inc. 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 projections of
 product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of
 management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments
 and customer contracts or use of our services.

 The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
 service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth,
 interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated
 with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain,
 and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling
 non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the
 financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This
 documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

 Any unreleased services or features referenced in this or other presentations, 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 the 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.
Session Agenda

 • Introduction to Ruby, Rails, and Heroku (10 min)
 • Getting Started (5 min)
 • Building a Blogging App (25 min)
 • Deploying to Heroku (10 min)
 • Q&A (10 min)
What is Ruby?

 • Created by Yukihiro "Matz" Matsumoto, released in 1995
 • Open source, object-oriented programming language
 • Sparse but expressive syntax
 • Runs on every platform
 • Garbage-collected
 • Dynamic type checking
 • No compiler
Ruby Sample:              In Apex:
 posts.each do |post|      for (Post current : posts) {
   unless post.done?          if (!post.isDone()) {
                                    editor.review(current);
     editor.review post
                              } else {
   else
                                    post.submit();
     post.submit
                              }
   end                     }
 end
Ruby on Rails

 • Web-app development framework for Ruby
 • Convention over configuration
 • Model-View-Controller pattern
 • DRY (don’t repeat yourself)
 • RESTful
 • Testing should be baked in
Rails Directory Structure Conventions
 …
 app/
        controllers/
        helpers/
        mailers/
        models/
        views/
 config/
 db/

 …
What is Heroku and why should I use it?

 • Salesforce’s Platform as a Service
 • Forget Servers
 • Run Anything
 • See Everything
 • Scale Rapidly
 • Integrate to Salesforce with
 databasedotcom gem
Getting Started with Heroku

 • Install Heroku Toolbelt (CLI, Foreman, Git)
 • Install Ruby 1.9.2
 • Install Rails
 • Install PostgreSQL
 • Use RVM, Homebrew, RubyGems

http://bit.ly/LN9nvK
Creating a Ruby on Rails app

 • Create a new Rails app
        $ rails new blog
Dependency Management with Ruby

 • Use SQLite for testing, Postrgres for Production by changing
 the gem "sqlite3" line in Gemfile

 • Update Bundle
        $ bundle install
Creating our Data Model & Scaffolding

 • Create scaffolding for Posts
         $ rails generate scaffold Post
             title:string body:text
 • Let’s look at some code!
Changing the Landing Page

 • Remove the static landing page
        $ rm public/index.html
 • Add a route for the landing page (in config/routes.rb)
        root :to => "posts#index"
Testing our App Locally

 • Create the database
         $ rake db:create
 • Run migrations
         $ rake db:migrate
 • Start the app
         $ rails server
 • Enter a new post
Deploying to Heroku

 • Create a new Git repo
    $ git init
 • Create a new Heroku app
        $ heroku create
 • Commit to repo & deploy
        $ git push heroku master

 • Run migrations on Heroku Postgres DB
        $ heroku run rake db:migrate
Developer Resources

• Dev Center: https://devcenter.heroku.com/
• Getting Started with Ruby: https://devcenter.heroku.com/articles/ruby
• Getting Started with Rails 3.x: https://devcenter.heroku.com/articles/rails3
• GitHub repo with today’s Blog example:
  https://github.com/sfckemp/sf13-blog-example
Coming Soon…




       Expected Publishing Date is February 15, 2013.
Hands on Ruby on Rails
Hands on Ruby on Rails

Contenu connexe

Tendances

Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)Ciro Miranda
 
Best practises vop
Best practises vopBest practises vop
Best practises vopSharon James
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayPOSSCON
 
BPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to ActivitiBPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to ActivitiAlfresco Software
 
Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Wael Hamze
 
Continuous Delivery for Dynamics 365/CRM
Continuous Delivery for Dynamics 365/CRMContinuous Delivery for Dynamics 365/CRM
Continuous Delivery for Dynamics 365/CRMWael Hamze
 
Making Angular2 lean and Fast
Making Angular2 lean and FastMaking Angular2 lean and Fast
Making Angular2 lean and FastVinci Rufus
 
Lars thorup-react-and-redux-2016-09
Lars thorup-react-and-redux-2016-09Lars thorup-react-and-redux-2016-09
Lars thorup-react-and-redux-2016-09BestBrains
 
Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Wael Hamze
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web VitalsSamar Panda
 
The Agile Process - Taming Your Process To Work For You
The Agile Process - Taming Your Process To Work For YouThe Agile Process - Taming Your Process To Work For You
The Agile Process - Taming Your Process To Work For YouNowell Strite
 
Alfresco Digital Business Platform - Why, How, What
Alfresco Digital Business Platform - Why, How, WhatAlfresco Digital Business Platform - Why, How, What
Alfresco Digital Business Platform - Why, How, WhatMario Romano
 
Synthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumSynthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumAndriy Samilyak
 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureMaurice De Beijer [MVP]
 
Improving user experience with real user measurements
Improving user experience with real user measurements Improving user experience with real user measurements
Improving user experience with real user measurements Samar Panda
 
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San FranciscoThorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Franciscocamunda services GmbH
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
 
Continuous delivery of danbury.io, Part 1
Continuous delivery of danbury.io, Part 1Continuous delivery of danbury.io, Part 1
Continuous delivery of danbury.io, Part 1Brian Jackson
 
Optimizing React at Postmates
Optimizing React at PostmatesOptimizing React at Postmates
Optimizing React at PostmatesTrey Huffine
 

Tendances (20)

Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)
 
Best practises vop
Best practises vopBest practises vop
Best practises vop
 
Web vitals
Web vitalsWeb vitals
Web vitals
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
 
BPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to ActivitiBPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to Activiti
 
Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013
 
Continuous Delivery for Dynamics 365/CRM
Continuous Delivery for Dynamics 365/CRMContinuous Delivery for Dynamics 365/CRM
Continuous Delivery for Dynamics 365/CRM
 
Making Angular2 lean and Fast
Making Angular2 lean and FastMaking Angular2 lean and Fast
Making Angular2 lean and Fast
 
Lars thorup-react-and-redux-2016-09
Lars thorup-react-and-redux-2016-09Lars thorup-react-and-redux-2016-09
Lars thorup-react-and-redux-2016-09
 
Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
 
The Agile Process - Taming Your Process To Work For You
The Agile Process - Taming Your Process To Work For YouThe Agile Process - Taming Your Process To Work For You
The Agile Process - Taming Your Process To Work For You
 
Alfresco Digital Business Platform - Why, How, What
Alfresco Digital Business Platform - Why, How, WhatAlfresco Digital Business Platform - Why, How, What
Alfresco Digital Business Platform - Why, How, What
 
Synthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumSynthetic web performance testing with Selenium
Synthetic web performance testing with Selenium
 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and Azure
 
Improving user experience with real user measurements
Improving user experience with real user measurements Improving user experience with real user measurements
Improving user experience with real user measurements
 
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San FranciscoThorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
 
Continuous delivery of danbury.io, Part 1
Continuous delivery of danbury.io, Part 1Continuous delivery of danbury.io, Part 1
Continuous delivery of danbury.io, Part 1
 
Optimizing React at Postmates
Optimizing React at PostmatesOptimizing React at Postmates
Optimizing React at Postmates
 

En vedette

Facebook Page Insights
Facebook Page InsightsFacebook Page Insights
Facebook Page InsightsFarzan Sheikh
 
Evaluating natural based toothpaste
Evaluating natural based toothpasteEvaluating natural based toothpaste
Evaluating natural based toothpasteJojo Asavanamuang
 
State Of Online Video - TIMA presentation
State Of Online Video  - TIMA presentationState Of Online Video  - TIMA presentation
State Of Online Video - TIMA presentationLouise_Gordon
 

En vedette (6)

Facebook Page Insights
Facebook Page InsightsFacebook Page Insights
Facebook Page Insights
 
Presentacion Laura T
Presentacion Laura TPresentacion Laura T
Presentacion Laura T
 
Evaluating natural based toothpaste
Evaluating natural based toothpasteEvaluating natural based toothpaste
Evaluating natural based toothpaste
 
Dna inves pre_november_2011
Dna  inves pre_november_2011Dna  inves pre_november_2011
Dna inves pre_november_2011
 
State Of Online Video - TIMA presentation
State Of Online Video  - TIMA presentationState Of Online Video  - TIMA presentation
State Of Online Video - TIMA presentation
 
Marketing
MarketingMarketing
Marketing
 

Similaire à Hands on Ruby on Rails

Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIJeff Douglas
 
Continuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsContinuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsSalesforce Developers
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comSalesforce Developers
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreTom Gersic
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyRightScale
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And ExperiencesProject Zero
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaborationJohn Stevenson
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaborationJohn Stevenson
 
DevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudDevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudrsg00usa
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf
 
TDX19 - Accelerate DevOps with GitLab and Salesforce
TDX19 - Accelerate DevOps with GitLab and SalesforceTDX19 - Accelerate DevOps with GitLab and Salesforce
TDX19 - Accelerate DevOps with GitLab and SalesforceDoug Ayers
 
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...JAX London
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCorky Brown
 
How Open Source Embiggens Salesforce.com
How Open Source Embiggens Salesforce.comHow Open Source Embiggens Salesforce.com
How Open Source Embiggens Salesforce.comSalesforce Engineering
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesHiroshi SHIBATA
 
Best Practices for Team Development in a Single Org
Best Practices for Team Development in a Single OrgBest Practices for Team Development in a Single Org
Best Practices for Team Development in a Single OrgSalesforce Developers
 

Similaire à Hands on Ruby on Rails (20)

Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling API
 
Continuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsContinuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch Orgs
 
Spring '16 Release Preview Webinar
Spring '16 Release Preview Webinar Spring '16 Release Preview Webinar
Spring '16 Release Preview Webinar
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases Weekly
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And Experiences
 
Workbench: The API Swiss Army Knife
Workbench: The API Swiss Army KnifeWorkbench: The API Swiss Army Knife
Workbench: The API Swiss Army Knife
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaboration
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaboration
 
DevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudDevOps in Salesforce AppCloud
DevOps in Salesforce AppCloud
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
 
TDX19 - Accelerate DevOps with GitLab and Salesforce
TDX19 - Accelerate DevOps with GitLab and SalesforceTDX19 - Accelerate DevOps with GitLab and Salesforce
TDX19 - Accelerate DevOps with GitLab and Salesforce
 
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From Scratch
 
Open Source at Salesforce.com
Open Source at Salesforce.comOpen Source at Salesforce.com
Open Source at Salesforce.com
 
How Open Source Embiggens Salesforce.com
How Open Source Embiggens Salesforce.comHow Open Source Embiggens Salesforce.com
How Open Source Embiggens Salesforce.com
 
Introduction to Heroku
Introduction to HerokuIntroduction to Heroku
Introduction to Heroku
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
Best Practices for Team Development in a Single Org
Best Practices for Team Development in a Single OrgBest Practices for Team Development in a Single Org
Best Practices for Team Development in a Single Org
 

Plus de Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

Plus de Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Hands on Ruby on Rails

  • 1. Hands On Ruby on Rails Building Your First App Chris Kemp, salesforce.com, Sr. Solution Engineer
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. 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 projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, 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 the 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.
  • 3. Session Agenda • Introduction to Ruby, Rails, and Heroku (10 min) • Getting Started (5 min) • Building a Blogging App (25 min) • Deploying to Heroku (10 min) • Q&A (10 min)
  • 4. What is Ruby? • Created by Yukihiro "Matz" Matsumoto, released in 1995 • Open source, object-oriented programming language • Sparse but expressive syntax • Runs on every platform • Garbage-collected • Dynamic type checking • No compiler
  • 5. Ruby Sample: In Apex: posts.each do |post| for (Post current : posts) { unless post.done? if (!post.isDone()) { editor.review(current); editor.review post } else { else post.submit(); post.submit } end } end
  • 6. Ruby on Rails • Web-app development framework for Ruby • Convention over configuration • Model-View-Controller pattern • DRY (don’t repeat yourself) • RESTful • Testing should be baked in
  • 7. Rails Directory Structure Conventions … app/ controllers/ helpers/ mailers/ models/ views/ config/ db/ …
  • 8. What is Heroku and why should I use it? • Salesforce’s Platform as a Service • Forget Servers • Run Anything • See Everything • Scale Rapidly • Integrate to Salesforce with databasedotcom gem
  • 9. Getting Started with Heroku • Install Heroku Toolbelt (CLI, Foreman, Git) • Install Ruby 1.9.2 • Install Rails • Install PostgreSQL • Use RVM, Homebrew, RubyGems http://bit.ly/LN9nvK
  • 10. Creating a Ruby on Rails app • Create a new Rails app $ rails new blog
  • 11. Dependency Management with Ruby • Use SQLite for testing, Postrgres for Production by changing the gem "sqlite3" line in Gemfile • Update Bundle $ bundle install
  • 12. Creating our Data Model & Scaffolding • Create scaffolding for Posts $ rails generate scaffold Post title:string body:text • Let’s look at some code!
  • 13. Changing the Landing Page • Remove the static landing page $ rm public/index.html • Add a route for the landing page (in config/routes.rb) root :to => "posts#index"
  • 14. Testing our App Locally • Create the database $ rake db:create • Run migrations $ rake db:migrate • Start the app $ rails server • Enter a new post
  • 15. Deploying to Heroku • Create a new Git repo $ git init • Create a new Heroku app $ heroku create • Commit to repo & deploy $ git push heroku master • Run migrations on Heroku Postgres DB $ heroku run rake db:migrate
  • 16. Developer Resources • Dev Center: https://devcenter.heroku.com/ • Getting Started with Ruby: https://devcenter.heroku.com/articles/ruby • Getting Started with Rails 3.x: https://devcenter.heroku.com/articles/rails3 • GitHub repo with today’s Blog example: https://github.com/sfckemp/sf13-blog-example
  • 17. Coming Soon… Expected Publishing Date is February 15, 2013.