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

More Related Content

What's hot

Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
Mark Rackley
 
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
 

What's hot (20)

Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
 
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
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
 
HTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery TrainingHTML CSS JavaScript jQuery Training
HTML CSS JavaScript jQuery Training
 
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
 
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
 
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
 
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
 
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
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
 
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
 
MERN stack roadmap
MERN stack roadmapMERN stack roadmap
MERN stack roadmap
 
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
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
06 Javascript
06 Javascript06 Javascript
06 Javascript
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
 
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
 
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...
 
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
 

Viewers also liked

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
Tocame
TocameTocame
Assignment 14 representation
Assignment 14 representationAssignment 14 representation
Assignment 14 representation
Ashley Goodall
 
Eilot
EilotEilot
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
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
Flyer
FlyerFlyer

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
 
Presentacio dimarts
Presentacio dimartsPresentacio dimarts
Presentacio dimarts
 
Zaid Detail CV
Zaid Detail CVZaid Detail CV
Zaid Detail CV
 
NXT
NXTNXT
NXT
 
Tocame
TocameTocame
Tocame
 
Assignment 14 representation
Assignment 14 representationAssignment 14 representation
Assignment 14 representation
 
Eilot
EilotEilot
Eilot
 
13 Phrases
13 Phrases13 Phrases
13 Phrases
 
Zoekt en gij zult vinden!
Zoekt en gij zult vinden!Zoekt en gij zult vinden!
Zoekt en gij zult vinden!
 
Assignment 14 representation
Assignment 14 representationAssignment 14 representation
Assignment 14 representation
 
Canon in-d
Canon in-dCanon in-d
Canon in-d
 
Practica1
Practica1Practica1
Practica1
 
Meet the Players
Meet the PlayersMeet the Players
Meet the Players
 
fall 2006 site conditions surveys lecture
fall 2006 site conditions surveys lecturefall 2006 site conditions surveys lecture
fall 2006 site conditions surveys lecture
 
Rosa Galicia - Economia, objeto y metodo
Rosa Galicia - Economia, objeto y metodoRosa Galicia - Economia, objeto y metodo
Rosa Galicia - Economia, objeto y metodo
 
Yaraikellyn peraza
Yaraikellyn perazaYaraikellyn peraza
Yaraikellyn peraza
 
Newsletter
NewsletterNewsletter
Newsletter
 
Vanessa jimenez
Vanessa jimenezVanessa jimenez
Vanessa jimenez
 
di y ju
di y judi y ju
di y ju
 
Flyer
FlyerFlyer
Flyer
 

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

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

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
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Lecture #5 Introduction to rails
Lecture #5 Introduction to railsLecture #5 Introduction to rails
Lecture #5 Introduction to rails
 
Introduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukIntroduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy Hinyuk
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Ruby on rails RAD
Ruby on rails RADRuby on rails RAD
Ruby on rails RAD
 
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
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
 
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
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspective
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 

Recently uploaded

Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
Priyanka Aash
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
Ivanti
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
Priyanka Aash
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 

Recently uploaded (20)

Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 

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