SlideShare ist ein Scribd-Unternehmen logo
1 von 96
Ruby On Rails Gautam Rege Josh Software Pvt. Ltd.
Speaker Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Part – 1  Ruby on Rails Introduction
History of Ruby ,[object Object],[object Object],[object Object],[object Object]
Ruby Vs Python ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ruby Vs Perl ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ruby Vs Perl contd.. ,[object Object],[object Object],[object Object]
Features of Ruby ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What do I choose anyway?? ,[object Object],[object Object],[object Object]
Overall Comparison Rails Pylons cgi/perl Web-frameworks    Plug-ins / auto-installation    Object Oriented Nature  Weak References (leaks)    Garbage Collection    Loose Data Typing    Data Types: Arrays, Hash Ruby Python Perl Features
Web Technologies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
J2EE, .NET Web Development ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CGI / Perl & PHP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pylons ,[object Object],[object Object],[object Object],[object Object]
Ruby on Rails ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ruby On Rails contd.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rails in the Real World ,[object Object],[object Object],[object Object],[object Object],[object Object]
Part 2 – Rails Architecture
Terminologies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model – View – Controller
Model - Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Controller – Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
View – Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MVC in Rails
Routing in Rails ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A word about RESTfull Rails Routes: map.resources :teams
Session Break Coffee ?
Part 2.1 ActiveRecord ,[object Object],[object Object],[object Object],[object Object],[object Object]
Object Relational Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database “rules” ,[object Object],[object Object],[object Object],[object Object],[object Object]
Database “rules” contd.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Part 2.4 Migrations ,[object Object],[object Object],[object Object],[object Object]
Example of Migration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],This creates customer_id field in database.  Relation between Customer and Address is determined by the models. i.e. class Customer  has_one :address
Rake ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Part 3 – Hands-on work Building a Rails Application
Ruby on Rails Installation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Setup the Environment ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rails Project Layout ..../app  ......../controller  ......../helpers  ......../models  ......../views  ............/layouts  ..../config  ..../components ..../db  ..../doc  ..../lib  ..../log  ..../public  ..../script  ..../test  ..../tmp  ..../vendor ......../plugins Core Application code: Controllers, Helpers, Models, Views Configuration for database, initializers,routes Database migrations Additional or custom libraries, rake tasks etc. The HTDOC for this web project. This contains JS, CSS, images etc. External plugins for this project.
Session Break Coffee ?
ActiveRecord Validations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ActiveRecord Callbacks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ActiveRecord Relations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database revisit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],This line is actually not necessary in Rails as migrations handle this.
has_one  ↔  belongs_to ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database revisit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
has_many  ↔  belongs_to ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Camelization !!
Database Revist ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
has_many :through => ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Named Scopes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Named Scope example class Customer < ActiveRecord::Base has_many :bank_accounts named_scope :hni, :conditions => [ ‘hni = ?’ true ] named_scope :high_risk lambda do | list | {  :joins => ‘risk_customer_lists’,   :conditions => [‘name in (?)’, list ]  }  End @customers = Customer.hni @customers = Customer.hni  @customers = @customers.high_risk(terrorists) @customers = Customer.hni.high_risk(terrorists)
Hands On! ,[object Object],[object Object],[object Object],[object Object]
Session Break Coffee ?
Part 2.2 ActionController ,[object Object],[object Object],[object Object],[object Object],[object Object]
Processing a HTTP Rails request ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Helpers ,[object Object],[object Object],[object Object],Hmm.. Why are helpers not available to the model?
Filters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ActionController example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],GET and POST parameters are accessed via params
Part 2.3 ActionView ,[object Object],[object Object],[object Object],[object Object]
Partials ,[object Object],[object Object],[object Object],[object Object]
Layouts ,[object Object],[object Object],[object Object]
Rendering Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
FormHelpers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Ajax on Rails ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Break Coffee ?
Building a Rails Application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Rails helps you build web applications really fast but YOU STILL HAVE TO DESIGN IT !!
Application Idea?? Lets think of one now Pre-decided
Survey Application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Survey Application ,[object Object],[object Object],[object Object],[object Object]
Is the above too easy ??   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Survey Application survey questions answers users
Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object]
Migrations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Migrations contd.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scaffolding ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checklist ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Actual Development (finally) ,[object Object],[object Object],[object Object],[object Object]
Session Break Coffee ?
Deploying the application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configuring routes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enterprise Deployment ,[object Object],[object Object],[object Object],[object Object],[object Object]
Capistrano – Rails Deployment ,[object Object],[object Object],[object Object],[object Object]
Session Break Coffee ?
Advanced Topics ,[object Object],[object Object],[object Object],[object Object]
Behaviour Driven Development ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Test Driven Development ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rspec  ,[object Object],[object Object],[object Object],[object Object]
Nuances of Rspec ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rspec - Typical Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rspec – Pending Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Before & After Code  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Before & after code example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Helper Routines ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rspec – further reading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hands On! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You!

Weitere ähnliche Inhalte

Was ist angesagt?

Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Rahul Kumar
 
Placement and variable 03 (js)
Placement and variable 03 (js)Placement and variable 03 (js)
Placement and variable 03 (js)AbhishekMondal42
 
Introduction to plugin development
Introduction to plugin developmentIntroduction to plugin development
Introduction to plugin developmentCaldera Labs
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshellLennart Schoors
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overviewjeresig
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5Peter Gfader
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generationEleonora Ciceri
 
Introduction to hibernate
Introduction to hibernateIntroduction to hibernate
Introduction to hibernatehr1383
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravelwajrcs
 
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Kacper Gunia
 
Hibernate Developer Reference
Hibernate Developer ReferenceHibernate Developer Reference
Hibernate Developer ReferenceMuthuselvam RS
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptMarlon Jamera
 

Was ist angesagt? (19)

Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Placement and variable 03 (js)
Placement and variable 03 (js)Placement and variable 03 (js)
Placement and variable 03 (js)
 
Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Introduction to plugin development
Introduction to plugin developmentIntroduction to plugin development
Introduction to plugin development
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generation
 
Introduction to hibernate
Introduction to hibernateIntroduction to hibernate
Introduction to hibernate
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravel
 
Java
Java Java
Java
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
 
Hibernate Developer Reference
Hibernate Developer ReferenceHibernate Developer Reference
Hibernate Developer Reference
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 

Andere mochten auch

Rails Vs CakePHP
Rails Vs CakePHPRails Vs CakePHP
Rails Vs CakePHPGautam Rege
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing3S Labs
 
GoFFIng around with Ruby #RubyConfPH
GoFFIng around with Ruby #RubyConfPHGoFFIng around with Ruby #RubyConfPH
GoFFIng around with Ruby #RubyConfPHGautam Rege
 
The Invention of Capitalism - Michael Perelman
The Invention of Capitalism - Michael PerelmanThe Invention of Capitalism - Michael Perelman
The Invention of Capitalism - Michael Perelmanberat celik
 
Time Management within IT Project Management
Time Management within IT Project ManagementTime Management within IT Project Management
Time Management within IT Project Managementrielaantonio
 
Explora power point d
Explora power point dExplora power point d
Explora power point dcrector12
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebspasalapudi123
 
Catalogue-FULU MOTOR
Catalogue-FULU MOTORCatalogue-FULU MOTOR
Catalogue-FULU MOTOR圆圆 孟
 
quick sort by student of NUML university
quick sort by student of NUML universityquick sort by student of NUML university
quick sort by student of NUML universityAbdul Qayoom Pirooz
 
E sky2u.com marketing plan v3.0
E sky2u.com marketing plan v3.0E sky2u.com marketing plan v3.0
E sky2u.com marketing plan v3.0e-sky, Inc
 
Slides of webinar: growing advisory businesses through alternative assets
Slides of webinar:   growing advisory businesses through alternative assetsSlides of webinar:   growing advisory businesses through alternative assets
Slides of webinar: growing advisory businesses through alternative assetsMichael Sakraida
 
Team 1 c IMT oral presentation
Team 1 c IMT oral presentationTeam 1 c IMT oral presentation
Team 1 c IMT oral presentationmra21
 

Andere mochten auch (20)

Rails Vs CakePHP
Rails Vs CakePHPRails Vs CakePHP
Rails Vs CakePHP
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
GoFFIng around with Ruby #RubyConfPH
GoFFIng around with Ruby #RubyConfPHGoFFIng around with Ruby #RubyConfPH
GoFFIng around with Ruby #RubyConfPH
 
The Invention of Capitalism - Michael Perelman
The Invention of Capitalism - Michael PerelmanThe Invention of Capitalism - Michael Perelman
The Invention of Capitalism - Michael Perelman
 
工作人生
工作人生工作人生
工作人生
 
2
22
2
 
Historia del computador
Historia del computadorHistoria del computador
Historia del computador
 
15 mei 2013
15 mei 201315 mei 2013
15 mei 2013
 
Apuntes
ApuntesApuntes
Apuntes
 
Time Management within IT Project Management
Time Management within IT Project ManagementTime Management within IT Project Management
Time Management within IT Project Management
 
Explora power point d
Explora power point dExplora power point d
Explora power point d
 
Visvi
VisviVisvi
Visvi
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
 
Catalogue-FULU MOTOR
Catalogue-FULU MOTORCatalogue-FULU MOTOR
Catalogue-FULU MOTOR
 
Status report1
Status report1Status report1
Status report1
 
quick sort by student of NUML university
quick sort by student of NUML universityquick sort by student of NUML university
quick sort by student of NUML university
 
E sky2u.com marketing plan v3.0
E sky2u.com marketing plan v3.0E sky2u.com marketing plan v3.0
E sky2u.com marketing plan v3.0
 
How real is race?
How real is race?How real is race?
How real is race?
 
Slides of webinar: growing advisory businesses through alternative assets
Slides of webinar:   growing advisory businesses through alternative assetsSlides of webinar:   growing advisory businesses through alternative assets
Slides of webinar: growing advisory businesses through alternative assets
 
Team 1 c IMT oral presentation
Team 1 c IMT oral presentationTeam 1 c IMT oral presentation
Team 1 c IMT oral presentation
 

Ähnlich wie Ruby On Rails

Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingDan Davis
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorialsunniboy
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010arif44
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Railsanides
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortegaarman o
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdfAyesha Siddika
 
2010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week12010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week1Wolfram Arnold
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on railspmashchak
 

Ähnlich wie Ruby On Rails (20)

Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby on Rails
Ruby on Rails Ruby on Rails
Ruby on Rails
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortega
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
 
2010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week12010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week1
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
 

Mehr von Gautam Rege

RubyConf India 2019 - Confessions of a rubypreneur
RubyConf India 2019 - Confessions of a rubypreneurRubyConf India 2019 - Confessions of a rubypreneur
RubyConf India 2019 - Confessions of a rubypreneurGautam Rege
 
Agile india 2017 - Rewarding OpenSource with $$$
Agile india 2017 - Rewarding OpenSource with $$$Agile india 2017 - Rewarding OpenSource with $$$
Agile india 2017 - Rewarding OpenSource with $$$Gautam Rege
 
WIDS - Gamifying Open Source
WIDS - Gamifying Open SourceWIDS - Gamifying Open Source
WIDS - Gamifying Open SourceGautam Rege
 
Gamifying Open Source
Gamifying Open SourceGamifying Open Source
Gamifying Open SourceGautam Rege
 
Affordable Smart Housing - The new revolution
Affordable Smart Housing - The new revolutionAffordable Smart Housing - The new revolution
Affordable Smart Housing - The new revolutionGautam Rege
 
WebSummit 2015 - Gopher it
WebSummit 2015 - Gopher itWebSummit 2015 - Gopher it
WebSummit 2015 - Gopher itGautam Rege
 
Dont test your code
Dont test your codeDont test your code
Dont test your codeGautam Rege
 
Art of speaking at tech conferences
Art of speaking at tech conferencesArt of speaking at tech conferences
Art of speaking at tech conferencesGautam Rege
 
RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!Gautam Rege
 
Ruby and rails - Advanced Training (Cybage)
Ruby and rails - Advanced Training (Cybage)Ruby and rails - Advanced Training (Cybage)
Ruby and rails - Advanced Training (Cybage)Gautam Rege
 
RedDot Ruby Conf 2014 - Dark side of ruby
RedDot Ruby Conf 2014 - Dark side of ruby RedDot Ruby Conf 2014 - Dark side of ruby
RedDot Ruby Conf 2014 - Dark side of ruby Gautam Rege
 
ScotRuby - Dark side of ruby
ScotRuby - Dark side of rubyScotRuby - Dark side of ruby
ScotRuby - Dark side of rubyGautam Rege
 
GCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of RubyGCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of RubyGautam Rege
 

Mehr von Gautam Rege (13)

RubyConf India 2019 - Confessions of a rubypreneur
RubyConf India 2019 - Confessions of a rubypreneurRubyConf India 2019 - Confessions of a rubypreneur
RubyConf India 2019 - Confessions of a rubypreneur
 
Agile india 2017 - Rewarding OpenSource with $$$
Agile india 2017 - Rewarding OpenSource with $$$Agile india 2017 - Rewarding OpenSource with $$$
Agile india 2017 - Rewarding OpenSource with $$$
 
WIDS - Gamifying Open Source
WIDS - Gamifying Open SourceWIDS - Gamifying Open Source
WIDS - Gamifying Open Source
 
Gamifying Open Source
Gamifying Open SourceGamifying Open Source
Gamifying Open Source
 
Affordable Smart Housing - The new revolution
Affordable Smart Housing - The new revolutionAffordable Smart Housing - The new revolution
Affordable Smart Housing - The new revolution
 
WebSummit 2015 - Gopher it
WebSummit 2015 - Gopher itWebSummit 2015 - Gopher it
WebSummit 2015 - Gopher it
 
Dont test your code
Dont test your codeDont test your code
Dont test your code
 
Art of speaking at tech conferences
Art of speaking at tech conferencesArt of speaking at tech conferences
Art of speaking at tech conferences
 
RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!
 
Ruby and rails - Advanced Training (Cybage)
Ruby and rails - Advanced Training (Cybage)Ruby and rails - Advanced Training (Cybage)
Ruby and rails - Advanced Training (Cybage)
 
RedDot Ruby Conf 2014 - Dark side of ruby
RedDot Ruby Conf 2014 - Dark side of ruby RedDot Ruby Conf 2014 - Dark side of ruby
RedDot Ruby Conf 2014 - Dark side of ruby
 
ScotRuby - Dark side of ruby
ScotRuby - Dark side of rubyScotRuby - Dark side of ruby
ScotRuby - Dark side of ruby
 
GCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of RubyGCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of Ruby
 

Ruby On Rails

  • 1. Ruby On Rails Gautam Rege Josh Software Pvt. Ltd.
  • 2.
  • 3. Part – 1 Ruby on Rails Introduction
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Overall Comparison Rails Pylons cgi/perl Web-frameworks    Plug-ins / auto-installation    Object Oriented Nature  Weak References (leaks)    Garbage Collection    Loose Data Typing    Data Types: Arrays, Hash Ruby Python Perl Features
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Part 2 – Rails Architecture
  • 19.
  • 20. Model – View – Controller
  • 21.
  • 22.
  • 23.
  • 25.
  • 26. A word about RESTfull Rails Routes: map.resources :teams
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Part 3 – Hands-on work Building a Rails Application
  • 36.
  • 37.
  • 38. Rails Project Layout ..../app ......../controller ......../helpers ......../models ......../views ............/layouts ..../config ..../components ..../db ..../doc ..../lib ..../log ..../public ..../script ..../test ..../tmp ..../vendor ......../plugins Core Application code: Controllers, Helpers, Models, Views Configuration for database, initializers,routes Database migrations Additional or custom libraries, rake tasks etc. The HTDOC for this web project. This contains JS, CSS, images etc. External plugins for this project.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. Named Scope example class Customer < ActiveRecord::Base has_many :bank_accounts named_scope :hni, :conditions => [ ‘hni = ?’ true ] named_scope :high_risk lambda do | list | { :joins => ‘risk_customer_lists’, :conditions => [‘name in (?)’, list ] } End @customers = Customer.hni @customers = Customer.hni @customers = @customers.high_risk(terrorists) @customers = Customer.hni.high_risk(terrorists)
  • 51.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 65.
  • 66. Application Idea?? Lets think of one now Pre-decided
  • 67.
  • 68.
  • 69.
  • 70. Survey Application survey questions answers users
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 78.
  • 79.
  • 80.
  • 81.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.