SlideShare a Scribd company logo
1 of 32
“I always knew that one day
Smalltalk would replace Java. I
just didn’t know it would be called
Ruby.”
– Kent Beck, MountainWest RubyConf 2009
o   dynamic, reflective, general purpose object-oriented
    programming language
o   designed by Yukihiro "Matz" Matsumoto. It was influenced
    primarily by Perl, Smalltalk, Eiffel, and Lisp.
o   Ruby supports multiple programming paradigms, including
    functional, object oriented, imperative and reflective. It
    also has a dynamic type system and automatic memory
    management; it is therefore similar in varying respects to
    Python, Perl, Lisp, Dylan, Pike, and CLU.
o   alternative implementations of the Ruby language,
    including YARV, JRuby, Rubinius, IronRuby, MacRuby, and
    HotRuby, each of which takes a different approach, with
    IronRuby, JRuby and MacRuby providing just-in-time
    compilation and MacRuby also providing ahead-of-time
    compilation
o   open source web application framework for the Ruby
    programming language.
o   It is intended to be used with an Agile development
    methodology that is used by web developers for rapid
    development
o   Ruby on Rails was extracted by David Heinemeier Hansson
    from his work on Basecamp, a project management tool by
    37signals (now a web application company
o   David Hansson first released Rails as open source in July 2004
o By helping you know what the code in your
  application is doing
o By helping you do more in, and with, your Rails
  applications that you can if you limit yourself to the
  readily available Rails idioms and techniques
o By allowing you to familiarize yourself with the Rails
  source code, which in turn enables you to
  participate in discussions about Rails and perhaps
  submit bugs and patches.
o By giving you powerful tool for administrative and
  organization tasks connected with your application.
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
•   Thinking in Ruby
•   IRB
•   Hello World
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
•   Ruby Constructs
•   Importance of Ruby
•   Extending Rails and other
    frameworks
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
Ruby Concepts
Ruby for Rails
Rails Concepts
Hello RoR
First RoR App
Further reading
•   MVC
•   Server
•   Convention over Configuration
•   Structure of a Rails App
•   DRY(Don’t Repeat Yourself)
•   Migrations
•   Gems
•   Routes
•   And other topics
o  Stands for Model-View-Controller
o Model is responsible for maintaining the state of an
   application
o View layer provides the user interface
of an application
o   WEBrick
o   Mongrel

o   > ruby script/server
o   > gem server
o   All you need is common
    sense and it works like
    magic!
o   Comparison with C# ,
    Java
o   No Connection String
o   Another example of
    convention over
    configuration
o   Advantages
o   > ruby script/console
Implications of DRY in RoR ;
migrations , seeds etc.
1.   Migrations are a convenient way for you to alter your
     database in a structured and organized manner. You could
     edit fragments of SQL by hand but you would then be
     responsible for telling other developers that they need to go
     and run them. You’d also have to keep track of which
     changes need to be run against the production machines
     next time you deploy.
2.   db/schema.rb
3.   Timestamp
4.   Use of migrations in case of faulty code generation
class CreateProducts < ActiveRecord::Migration
def self.up
        create_table :products do |t|
          t.string :name
          t.text :description
          t.timestamps
        end
end
def self.down
        drop_table :products
end
end
> rake db:migrate
VERSION=<timestamp>

> ruby script/generate
migration
Add<Field>To<ContollerNam
e> fieldname:type
o   routes.rb
o    map.root
1.   > gem install <gem-name>
2.   > gem install <gem-name> --local
3.   > gem update –system
4.   > gem server
5.   From setup.rb … >ruby setup.rb
6.   From gemspec .. >gem build example.gemspec
7.   Get gemspecs / .gems form Rubyforge.com or
     github
8.   Rake gem:install
Hello RoR
http://rubyonrails.org
http://railsbrain.com
http://railscasts.com
http://asciicasts.com
http://github.com
o    Gourab Mitra
    gourab5139014@gmail.com
    http://gourabmitra.co.cc



o    Sujeet Kumar
    sujeet0s1@gmail.com
    http://bit.ly/aEFKTT
Ruby on Rails : First Mile

More Related Content

What's hot

Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
Dobrica Pavlinušić
 

What's hot (20)

Why ruby
Why rubyWhy ruby
Why ruby
 
Ruby Beyond Rails
Ruby Beyond RailsRuby Beyond Rails
Ruby Beyond Rails
 
Introduction To Rails
Introduction To RailsIntroduction To Rails
Introduction To Rails
 
Tech Webinar: Web App in un'ora con Ruby on Rails
Tech Webinar: Web App in un'ora con Ruby on RailsTech Webinar: Web App in un'ora con Ruby on Rails
Tech Webinar: Web App in un'ora con Ruby on Rails
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
 
The Ruby Racer: under the hood
The Ruby Racer: under the hoodThe Ruby Racer: under the hood
The Ruby Racer: under the hood
 
Ruby and Security
Ruby and SecurityRuby and Security
Ruby and Security
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Ruby in office time reboot
Ruby in office time rebootRuby in office time reboot
Ruby in office time reboot
 
Dissecting ruby on rails
Dissecting ruby on railsDissecting ruby on rails
Dissecting ruby on rails
 
Web development basics (Part-7)
Web development basics (Part-7)Web development basics (Part-7)
Web development basics (Part-7)
 
rubyonrails
rubyonrailsrubyonrails
rubyonrails
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
Making CLI app in ruby
Making CLI app in rubyMaking CLI app in ruby
Making CLI app in ruby
 
Javascript Basic RESTful
Javascript Basic RESTfulJavascript Basic RESTful
Javascript Basic RESTful
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 
Kotlin in the age of digital transformation
Kotlin   in the age of digital transformationKotlin   in the age of digital transformation
Kotlin in the age of digital transformation
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
 
TypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without AnnotationsTypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without Annotations
 
Ruby Plugins for Jenkins
Ruby Plugins for JenkinsRuby Plugins for Jenkins
Ruby Plugins for Jenkins
 

Viewers also liked (8)

Journal System
Journal SystemJournal System
Journal System
 
Offerta formativa scuole primarie e secondarie Sabbioneta
Offerta formativa scuole primarie e secondarie SabbionetaOfferta formativa scuole primarie e secondarie Sabbioneta
Offerta formativa scuole primarie e secondarie Sabbioneta
 
Primo incontro Parte 2
Primo incontro Parte 2Primo incontro Parte 2
Primo incontro Parte 2
 
Exciting News In Our Class!
Exciting News In Our Class!Exciting News In Our Class!
Exciting News In Our Class!
 
Minimum Information Loss Algorithm
Minimum Information Loss AlgorithmMinimum Information Loss Algorithm
Minimum Information Loss Algorithm
 
Имперо
ИмпероИмперо
Имперо
 
Secondo incontro Parte 1
Secondo incontro Parte 1Secondo incontro Parte 1
Secondo incontro Parte 1
 
Copenhagen Feedback System
Copenhagen Feedback SystemCopenhagen Feedback System
Copenhagen Feedback System
 

Similar to Ruby on Rails : First Mile

Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
pmashchak
 
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
arif44
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
Ayesha Siddika
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Nilesh Panchal
 

Similar to Ruby on Rails : First Mile (20)

Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
 
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
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
 
Úvod do Ruby on Rails
Úvod do Ruby on RailsÚvod do Ruby on Rails
Úvod do Ruby on Rails
 
Ruby on Rails best resources for self
Ruby on Rails best resources for selfRuby on Rails best resources for self
Ruby on Rails best resources for self
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 
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 introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
 
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 - Rochester K Linux User Group
Ruby On Rails - Rochester K Linux User GroupRuby On Rails - Rochester K Linux User Group
Ruby On Rails - Rochester K Linux User Group
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Ruby on Rails : First Mile

  • 1. “I always knew that one day Smalltalk would replace Java. I just didn’t know it would be called Ruby.” – Kent Beck, MountainWest RubyConf 2009
  • 2.
  • 3.
  • 4. o dynamic, reflective, general purpose object-oriented programming language o designed by Yukihiro "Matz" Matsumoto. It was influenced primarily by Perl, Smalltalk, Eiffel, and Lisp. o Ruby supports multiple programming paradigms, including functional, object oriented, imperative and reflective. It also has a dynamic type system and automatic memory management; it is therefore similar in varying respects to Python, Perl, Lisp, Dylan, Pike, and CLU. o alternative implementations of the Ruby language, including YARV, JRuby, Rubinius, IronRuby, MacRuby, and HotRuby, each of which takes a different approach, with IronRuby, JRuby and MacRuby providing just-in-time compilation and MacRuby also providing ahead-of-time compilation
  • 5. o open source web application framework for the Ruby programming language. o It is intended to be used with an Agile development methodology that is used by web developers for rapid development o Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by 37signals (now a web application company o David Hansson first released Rails as open source in July 2004
  • 6. o By helping you know what the code in your application is doing o By helping you do more in, and with, your Rails applications that you can if you limit yourself to the readily available Rails idioms and techniques o By allowing you to familiarize yourself with the Rails source code, which in turn enables you to participate in discussions about Rails and perhaps submit bugs and patches. o By giving you powerful tool for administrative and organization tasks connected with your application.
  • 7. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 8. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 9. Thinking in Ruby • IRB • Hello World
  • 10. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 11. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 12. Ruby Constructs • Importance of Ruby • Extending Rails and other frameworks
  • 13. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 14. Ruby Concepts Ruby for Rails Rails Concepts Hello RoR First RoR App Further reading
  • 15. MVC • Server • Convention over Configuration • Structure of a Rails App • DRY(Don’t Repeat Yourself) • Migrations • Gems • Routes • And other topics
  • 16. o Stands for Model-View-Controller o Model is responsible for maintaining the state of an application o View layer provides the user interface of an application
  • 17. o WEBrick o Mongrel o > ruby script/server o > gem server
  • 18. o All you need is common sense and it works like magic! o Comparison with C# , Java o No Connection String
  • 19. o Another example of convention over configuration o Advantages o > ruby script/console
  • 20. Implications of DRY in RoR ; migrations , seeds etc.
  • 21. 1. Migrations are a convenient way for you to alter your database in a structured and organized manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run them. You’d also have to keep track of which changes need to be run against the production machines next time you deploy. 2. db/schema.rb 3. Timestamp 4. Use of migrations in case of faulty code generation
  • 22. class CreateProducts < ActiveRecord::Migration def self.up create_table :products do |t| t.string :name t.text :description t.timestamps end end def self.down drop_table :products end end
  • 23. > rake db:migrate VERSION=<timestamp> > ruby script/generate migration Add<Field>To<ContollerNam e> fieldname:type
  • 24. o routes.rb o map.root
  • 25. 1. > gem install <gem-name> 2. > gem install <gem-name> --local 3. > gem update –system 4. > gem server 5. From setup.rb … >ruby setup.rb 6. From gemspec .. >gem build example.gemspec 7. Get gemspecs / .gems form Rubyforge.com or github 8. Rake gem:install
  • 26.
  • 28.
  • 29.
  • 31. o Gourab Mitra gourab5139014@gmail.com http://gourabmitra.co.cc o Sujeet Kumar sujeet0s1@gmail.com http://bit.ly/aEFKTT

Editor's Notes

  1. Matz ,
  2. Basecamp
  3. Thinking inRuby : Just the psychology behind ruby. What its meant to be? Conceptual elegance.