SlideShare a Scribd company logo
Ruby on Rails Building Web Applications Is Fun Again!
What is Ruby on Rails? Web application framework written in Ruby Ruby is an Object Oriented scripting language Model-view-controller Database agnostic Open source Lots of nice tools, classes and methods to make development easier
The Rails Way DRY (Don’t Repeat Yourself) Convention over configuration Baked in testing Minimal code with maximum effect
Installing Ruby, Gem and Rails Install Ruby OCI8 Driver Connect using TNSNAMES.ORA Connect using InstantClient and a URL More information on wiki.rubyonrails.com Getting Started
Rails on Oracle Key generation assumes sequences for each table with the name ${table_name}_seq Sequence name can be changed using ActiveRecord::Base.set_sequence_name Timezones and sub-second precision not supported More info:  http://wiki.rubyonrails.com/rails/pages/Oracle
Building Your First App Create a new Rails app by typing: rails myapp Edit the config/database.yml Generate a model using: script/generate model MyModel Creating a model creates a class and a migration
ActiveRecord Conventions Naming convention simplifies development and encourages good database design Tables are plural, models are singular Example: Model: LineItem Table: line_items Handles non-regular pluralization such as Person/people Can be overridden, although this complicates things for the developer
Database Migrations Database agnostic means of defining schema Lowest-common-denominator approach Ruby code with full access to ActiveRecord Methods for creating, altering and dropping tables, columns and indexes Can execute arbitrary SQL with ‘execute’ method
ActiveRecord Models Object/Relational Mapping Model classes extend from ActiveRecord::Base ActiveRecord::Base provides: Database agnostic record creation, finding, saving and removal Data validation methods Relationships All in an easy to use package Rails encourages keeping business logic in the model where it belongs AR can be used outside of web applications
Views Responsible for creating part or all of the page displayed in a browser By default uses ERb (Embedded Ruby) Other views include ‘builders’ for XML documents or RJS templates to generate JavaScript for AJAX driven views Includes elegant means for including helper functions for rendering Supports partials and components
Controllers Generate controllers with script/generate controller MyController Controllers tie the view to the model through actions Controllers also have access to “helpers” Designed for people-friendly URLs Provides caching, session management, query parsing, cookie management, pagination
ActiveRecord Relationships  Relationships are through primary keys Supported relationship types: belongs_to (book belongs to author) has_one (book has one publisher) has_many (book has many pages) has_and_belongs_to_many (book has and belongs to many readers) has_many :through (book has many contributors through contributions)
ActiveRecord Validation validates_presence_of validates_uniqueness_of validates_confirmation_of validates_acceptance_of validates_associated validates_each validates_format_of, _length_of validates_exclusion_of, _inclusion_of
More ActiveRecord Acts As acts_as_list (position) acts_as_tree (parent_id) Aggregations composed_of Callbacks Full lifecycle Before and after validation, creation, saving, destroying Calculations average, count, maximum, minimum, sum
Just When You Thought You Had Enough ActiveRecord Callback objects Observers Façade columns Object-level transaction management Magic column names created_on, created_at, updated_on, updated_at auto timestamping and dating lock_version and optimistic locking type for single table inheritence xxx_count counter cache
Other Stuff ActionMailer for sending mail messages ActionView helpers Form helpers Asset tags Javascript support (yummy AJAX!) Pagination Text helpers ActionWebService Ruby language extensions Breakpoint and debugging
Where To Go Next? http://www.rubyonrails.com / http://api.rubyonrails.com / http://wiki.rubyonrails.com/ Agile Web Development with Rails http://www.ruby-doc.org/  for Ruby Programming Ruby IRC, Mailing Lists, Seth Ladd’s brain
Ad

More Related Content

What's hot (20)

JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
Mark Rackley
 
HTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery TrainingHTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery Training
ubshreenath
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
Ian Carnaghan
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
Mark Rackley
 
Berlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworksBerlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworks
Stephan Schmidt
 
Industrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.netIndustrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.net
Pankaj Kushwaha
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
Mark Rackley
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScript
John Calvert
 
MERN stack roadmap
MERN stack roadmapMERN stack roadmap
MERN stack roadmap
RahulDas172878
 
HTL(Sightly) - All you need to know
HTL(Sightly) - All you need to knowHTL(Sightly) - All you need to know
HTL(Sightly) - All you need to know
Prabhdeep Singh
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
06 Javascript
06 Javascript06 Javascript
06 Javascript
Herman Tolle
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
Ivano Malavolta
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
Ivano Malavolta
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
Kunal Ashar
 
SD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI ArchitectureSD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI Architecture
Jeff Haynie
 
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery TrainingCartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Shane Church
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
Mark Rackley
 
HTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery TrainingHTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery Training
ubshreenath
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
Ian Carnaghan
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
Mark Rackley
 
Berlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworksBerlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworks
Stephan Schmidt
 
Industrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.netIndustrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.net
Pankaj Kushwaha
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
Mark Rackley
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScript
John Calvert
 
HTL(Sightly) - All you need to know
HTL(Sightly) - All you need to knowHTL(Sightly) - All you need to know
HTL(Sightly) - All you need to know
Prabhdeep Singh
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
Ivano Malavolta
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
SOFEA: Service Oriented Front End Architecture, Next Gen Web Architecture for...
Kunal Ashar
 
SD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI ArchitectureSD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI Architecture
Jeff Haynie
 
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery TrainingCartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Shane Church
 

Viewers also liked (20)

Arr johnstone-vivaldi-double cello-concerto-soloist_parts
Arr johnstone-vivaldi-double cello-concerto-soloist_partsArr johnstone-vivaldi-double cello-concerto-soloist_parts
Arr johnstone-vivaldi-double cello-concerto-soloist_parts
OsKr Dueñas Niño
 
Zaid Detail CV
Zaid Detail CVZaid Detail CV
Zaid Detail CV
zaid alam
 
NXT
NXTNXT
NXT
Andres Blanco
 
Tocame
TocameTocame
Tocame
chiquitita_roque
 
Assignment 14 representation
Assignment 14 representationAssignment 14 representation
Assignment 14 representation
Ashley Goodall
 
Eilot
EilotEilot
Eilot
want2belive99
 
13 Phrases
13 Phrases13 Phrases
13 Phrases
Andrew Isles
 
Zoekt en gij zult vinden!
Zoekt en gij zult vinden!Zoekt en gij zult vinden!
Zoekt en gij zult vinden!
johndog
 
Assignment 14 representation
Assignment 14 representationAssignment 14 representation
Assignment 14 representation
Ashley Goodall
 
Canon in-d
Canon in-dCanon in-d
Canon in-d
OsKr Dueñas Niño
 
Practica1
Practica1Practica1
Practica1
Fabian Ortiz Garcia
 
Meet the Players
Meet the PlayersMeet the Players
Meet the Players
shyattpentz
 
fall 2006 site conditions surveys lecture
fall 2006 site conditions surveys lecturefall 2006 site conditions surveys lecture
fall 2006 site conditions surveys lecture
Kazys Varnelis
 
Rosa Galicia - Economia, objeto y metodo
Rosa Galicia - Economia, objeto y metodoRosa Galicia - Economia, objeto y metodo
Rosa Galicia - Economia, objeto y metodo
rositagalicia
 
Yaraikellyn peraza
Yaraikellyn perazaYaraikellyn peraza
Yaraikellyn peraza
Yaraikellyn
 
Newsletter
NewsletterNewsletter
Newsletter
cat2504
 
Vanessa jimenez
Vanessa jimenezVanessa jimenez
Vanessa jimenez
vanessa jimenez
 
di y ju
di y judi y ju
di y ju
Diego Nicolás Arcos M
 
Flyer
FlyerFlyer
Flyer
Chad Hutchins
 
Ad

Similar to Ruby on Rails: Building Web Applications Is Fun Again! (20)

Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
shanmukhareddy dasi
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
guest4faf46
 
Lecture #5 Introduction to rails
Lecture #5 Introduction to railsLecture #5 Introduction to rails
Lecture #5 Introduction to rails
Evgeniy Hinyuk
 
Introduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukIntroduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy Hinyuk
Pivorak MeetUp
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Balint Erdi
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Gautam Rege
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
Basayel Said
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
Sadakathullah Appa College
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
Agnieszka Figiel
 
Ruby on rails RAD
Ruby on rails RADRuby on rails RAD
Ruby on rails RAD
Alina Danila
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
Sonia Simi
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
Victor Porof
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
Mark Menard
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
Paul Pajo
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Rails
g3ppy
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspective
Alin Pandichi
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
thebeebs
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
anides
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
_zaMmer_
 
Lecture #5 Introduction to rails
Lecture #5 Introduction to railsLecture #5 Introduction to rails
Lecture #5 Introduction to rails
Evgeniy Hinyuk
 
Introduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukIntroduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy Hinyuk
Pivorak MeetUp
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
Basayel Said
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
Agnieszka Figiel
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
Sonia Simi
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
Victor Porof
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
Mark Menard
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
Paul Pajo
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Rails
g3ppy
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspective
Alin Pandichi
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
thebeebs
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
anides
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
_zaMmer_
 
Ad

Recently uploaded (20)

Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 

Ruby on Rails: Building Web Applications Is Fun Again!

  • 1. Ruby on Rails Building Web Applications Is Fun Again!
  • 2. What is Ruby on Rails? Web application framework written in Ruby Ruby is an Object Oriented scripting language Model-view-controller Database agnostic Open source Lots of nice tools, classes and methods to make development easier
  • 3. The Rails Way DRY (Don’t Repeat Yourself) Convention over configuration Baked in testing Minimal code with maximum effect
  • 4. Installing Ruby, Gem and Rails Install Ruby OCI8 Driver Connect using TNSNAMES.ORA Connect using InstantClient and a URL More information on wiki.rubyonrails.com Getting Started
  • 5. Rails on Oracle Key generation assumes sequences for each table with the name ${table_name}_seq Sequence name can be changed using ActiveRecord::Base.set_sequence_name Timezones and sub-second precision not supported More info: http://wiki.rubyonrails.com/rails/pages/Oracle
  • 6. Building Your First App Create a new Rails app by typing: rails myapp Edit the config/database.yml Generate a model using: script/generate model MyModel Creating a model creates a class and a migration
  • 7. ActiveRecord Conventions Naming convention simplifies development and encourages good database design Tables are plural, models are singular Example: Model: LineItem Table: line_items Handles non-regular pluralization such as Person/people Can be overridden, although this complicates things for the developer
  • 8. Database Migrations Database agnostic means of defining schema Lowest-common-denominator approach Ruby code with full access to ActiveRecord Methods for creating, altering and dropping tables, columns and indexes Can execute arbitrary SQL with ‘execute’ method
  • 9. ActiveRecord Models Object/Relational Mapping Model classes extend from ActiveRecord::Base ActiveRecord::Base provides: Database agnostic record creation, finding, saving and removal Data validation methods Relationships All in an easy to use package Rails encourages keeping business logic in the model where it belongs AR can be used outside of web applications
  • 10. Views Responsible for creating part or all of the page displayed in a browser By default uses ERb (Embedded Ruby) Other views include ‘builders’ for XML documents or RJS templates to generate JavaScript for AJAX driven views Includes elegant means for including helper functions for rendering Supports partials and components
  • 11. Controllers Generate controllers with script/generate controller MyController Controllers tie the view to the model through actions Controllers also have access to “helpers” Designed for people-friendly URLs Provides caching, session management, query parsing, cookie management, pagination
  • 12. ActiveRecord Relationships Relationships are through primary keys Supported relationship types: belongs_to (book belongs to author) has_one (book has one publisher) has_many (book has many pages) has_and_belongs_to_many (book has and belongs to many readers) has_many :through (book has many contributors through contributions)
  • 13. ActiveRecord Validation validates_presence_of validates_uniqueness_of validates_confirmation_of validates_acceptance_of validates_associated validates_each validates_format_of, _length_of validates_exclusion_of, _inclusion_of
  • 14. More ActiveRecord Acts As acts_as_list (position) acts_as_tree (parent_id) Aggregations composed_of Callbacks Full lifecycle Before and after validation, creation, saving, destroying Calculations average, count, maximum, minimum, sum
  • 15. Just When You Thought You Had Enough ActiveRecord Callback objects Observers Façade columns Object-level transaction management Magic column names created_on, created_at, updated_on, updated_at auto timestamping and dating lock_version and optimistic locking type for single table inheritence xxx_count counter cache
  • 16. Other Stuff ActionMailer for sending mail messages ActionView helpers Form helpers Asset tags Javascript support (yummy AJAX!) Pagination Text helpers ActionWebService Ruby language extensions Breakpoint and debugging
  • 17. Where To Go Next? http://www.rubyonrails.com / http://api.rubyonrails.com / http://wiki.rubyonrails.com/ Agile Web Development with Rails http://www.ruby-doc.org/ for Ruby Programming Ruby IRC, Mailing Lists, Seth Ladd’s brain