ruby on rails it’s so rad. what we’ll cover what is ruby? what is ror? why ror? developing...
TRANSCRIPT
![Page 1: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/1.jpg)
RUBY ON RAILS
It’s so rad
![Page 2: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/2.jpg)
What we’ll cover
What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions
![Page 3: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/3.jpg)
What is Ruby?
Object-oriented language Written in 1995 by some smart Japanese
man Influenced by PERL, Python, and Lisp
(but mostly Python) EASY to understand, simple syntax
![Page 4: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/4.jpg)
What is RoR?
Full stack web application framework Written in Ruby (duh) Since 2004 Open Source Focused on rapid application
development
![Page 5: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/5.jpg)
Why Ruby on Rails?
Rails is a framework Python – TurboGears, Django Java - JSP/Servlets, Struts PHP – Cake, Symfony
Convention over Configuration Super fast to get started writing useable code
class Project < ActiveRecord::Base
belongs_to :portfolio
has_one :project_manager
has_many :milestones
end
![Page 6: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/6.jpg)
Developing with RoR
Rails gives the developer a solid infrastructure to build a
web application Model View Controller (MVC) Model, the Object Relational Mapper
Automatically maps the database to objects Very easy and natural to work with Thin layer with SQL – dynamically generates SQL queries
User.find_all User.find(:first, :conditions => [“user = ? AND password =?”],
user, pass) Controller, the logic of the application View, provides HTML templates and UI helpers
![Page 7: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/7.jpg)
Developing with RoR
![Page 8: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/8.jpg)
Developing with RoR
Support many database back-ends (db agnostic) Oracle, MySQL, PosgreSQL, SQLite
Built-in support for AJAX Built-in functional and unit testing Code tests while you develop Test templates are automatically generated Rails comes with a complete toolbox of
classes, helpers and utilities
![Page 9: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/9.jpg)
Deployment
Rails apps are compatible with Unix and Windows environments Rails apps can be deployed on multiple web server Configurations
Mod_rails (Phusion Passenger) Mongrel/Mongrel Cluster (plus some Apache goodness for proxy) FastCGI – running behind Apache or Lighty CGI WEBrick – a standalone Ruby web server, easy for development
Easy control of the deployment with Capistrano A scripting tool to control the deployment of the application on
multiple sites Easy control of schema migration
rake migrate VERSION=3
![Page 10: RUBY ON RAILS It’s so rad. What we’ll cover What is Ruby? What is RoR? Why RoR? Developing with RoR Deployment Demo Questions](https://reader035.vdocuments.mx/reader035/viewer/2022081007/56649dd55503460f94acd549/html5/thumbnails/10.jpg)
Demo
Real-time demo of the “Blog in 15 Minutes” (so it will probably take at least 20)