Title: Ruby on Rails
1Ruby on Rails
- Web Development that Doesnt Hurt
Brattleboro Tech Collective Marlboro College Grad
Center February 18, 2006
2Ruby on Rails Web Development that Doesnt Hurt
- Introduction
- Demo Application
- Q A
3- Collectively owned and operated
- Web site development
- We specialize in Web applications
4Brattleboro Tech Collective
- Open Source Content Management System
- Shopping Carts and Order Processing
- Book Publishing Software
- Class/Training Registration System
5Evolution of Web Applications
6CGI
7CGI and server-side applications
- Escaped HTML is in the code
- Difficult to organize, difficult to
- maintain.
8inline code code is embedded into HTML
- Examples
- PHP
- embedded Perl
- JSP
- ASP
- ColdFusion
9inline code
- Difficult to separate display logic from
application logic - Difficult to build large applications
10separation of logic and presentation
11Model, View, Controller (MVC)
- an architecture to separate logic from
presentation
Used by Ruby on Rails (also used by Java on
Struts)
12Model
- data, usually held in a database
13View
- how things are presented to the user (HTML and
CSS, user interface)
14Controller
- code and business logic, controls the interaction
between the View and the Model
15(No Transcript)
16Ruby
- programming language
- released in 1995 in Japan by Yukihiro Matsumoto
17Ruby
- Open Source
- Highly object-oriented
- Focuses on the needs of the programmer, not the
needs of the machine - syntax similar to Perl
18Ruby syntax
- def add_poodle
- _at_poodle Poodle.new(paramspoodle)
- _at_poodle.owner Owner.find(paramsid)
- _at_poodle.save
- render(partial gt 'poodle', layout gt
false) - end
19Rails
- open source web applications framework
- originally written to develop Basecamp
- released in 2004 by 37 Signals
20Basecamp by 37 Signals
21Tadalist and Backpack by 37 Signals
22Typo
23Odeo
2443 Things
25Framework
- support structure in which other applications can
be developed - Rails is an MVC framework
26Advantages of Rails
- Rails handles the tedious and routine structures
so the programmer can focus on actual programming - Scaffold the initial Create/Read/Update/Delete
system (CRUD) - Automatic form validation
- Automatic setup for application testing
27Rails integrates well with AJAX
- Asynchronous Javascript and XML
- AJAX is not a technology, it is a technique
- AJAX is a way to exchange data with the server
without having to reload the entire web page
28Case Study Poodle Influenza
- Your company has won a bid by the CDC
(Center for Disease Control and Prevention) and
the AKC (American Kennel Club) to help develop a
poodle tracking application to help poodle owners
register their precious pets in a national
database. The data from this application will
become part of the EDSRN (Emergency Dog Show
Relief Network.) - The application will be used to collect info
over the web about the owners and the individual
poodles they own. Data from the application will
be used to determine poodle distributions around
the country and help computer simulations
determine likely outcomes of a poodle pandemic
and to calculate the possible economic
repercussions on the dog show industry.
29Case Study Poodle Influenza
- Data Structure Poodles and Owners
- Must CRUD (Create/Read/Update/Delete)
- Focuses on the needs of the programmer, not the
needs of the machine
30(end of slideshow)
Brattleboro Tech Collective Marlboro College Grad
Center February 18, 2006