Title: Ruby on Rails
1Ruby on Rails
Presented by Gregg Pollack
www.PatchedSoftware.com
2The Disclaimer
I am not an Expert
I am a bad programmer
3Ruby on Rails?
- Ruby A Programming Language
- Created in 1993 by Yukihiro Matz Matsumoto
Java
PHP
Perl
C
- Ruby On Rails A Web Framework
- Created in 2004 by David Heinemeier Hansson
PRADO
PEAR
Struts
ASP.NET
WebObjects
NWAF
Mason
Catalyst
Hibernate
Mavrick.NET
Cocoon
Tapestry
Catalyst
Ozone
Fusebox
Atlas
Spring Framework
MonoRail
PageKit
Maypole
4The Ruby Language
- Take a true object-oriented language, such as
Smalltalk. Drop the unfamiliar syntax and move to
more conventional, file-based source code. Now
add in a good measure of the flexibility and
convenience of languages such as Python and Perl. - -Dave Thomas
- You end up with Ruby. Programming Ruby
Simple
- Principle of Least Surprise (POLS)
- Everything is an Object
Transparent
- Simplistic straightforward syntax
5Everything you could want
- Exception handling like Java
- Inheritance
- Blocks
- Garbage Collection
- No Variable Declarations
- OS Independent Threading
- Highly portable
6Coderspeak
- Ruby allows you to express your ideas through a
computer - Why the lucky stiff
3.Times print Ho! exit unless
restaurant.include? aura 'toast', 'cheese',
'wine'.each food print food.capitalize
7Ruby Gems
- Problem
- You have to keep detailed driver version records
Ruby Gems
- Solution
- Package Version Dependency Management
- Package Delivery
- Package Documentation Management
- gem install rails include dependencies
8Ruby On Rails Concepts
- Convention Over Configuration
NO XML!
9Rails Features
- Automated DB Model Mapping
- Web Services
- Generators
- AJAX Support
- Full Stack MVC Framework
10What is MVC?
- Model Business logic
- Manages interaction
View Display logic
Controller User Action logic
11An MVC Example
- Request I want to edit Blog Post 3
http//www.My.com/Blog/Edit?id3
- Web server receives request and calls the
appropriate Controller
- Controller called Blog
2. The Controller figures out what code should
run
- Function called Edit
- Function Action called Edit
3. The Action retrieves data from the Model
- Model named Post id 3
4. The Action sends the data to the appropriate
View
5. The View combines the data with html
6. The webpage is sent back to your browser
12The Anatomy of Rails
http//www.My.com/Blog/Edit/3
http//www.My.com/Blog/Edit?id3
Name of the Controller Class
Name of the Action
blog_controller.rb
13Time to Hack!
14Web Servers Databases
- Mysql
- PostgresSQL
- SQLite
- SQL Server
- DB2
- Oracle
15Why ruby on rails growing so fast?
- High signal to noise ratio
16Ruby on Rails Resources
Ruby on Rails is astounding. Using it is like
watching a kung-fu movie,where a dozen bad-ass
frameworks prepare to beat up the little
newcomeronly to be handed their asses in a
variety of imaginative ways. -Nathan
Torkington, O'Reilly Program Chair for OSCON
- For Videos www.RubyOnRails.com/screencasts
- To Learn www.RubyOnRails.com/docs
- To Talk
- Orlando Ruby Users Group
- www.ORUG.org
- Oh! Rug!