Ruby on Rails - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Ruby on Rails

Description:

MySQL or SQLite for example. Advantages. Open Source (FREE!) Use, copy, modify, distribute ... SQLite. IBM DB2. Oracle. Microsoft SQL Server ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 16
Provided by: Tre59
Category:
Tags: rails | ruby | sqlite

less

Transcript and Presenter's Notes

Title: Ruby on Rails


1
Ruby on Rails
  • Micah Ernst

2
Outline
  • Overview
  • What is Ruby?
  • What is Rails?
  • Requirements
  • What do I need?
  • Advantages
  • Why do I want it?
  • Questions

3
Overview
  • Ruby is a Object-Oriented programming language
  • Rails is a web application framework

4
Ruby - About
  • TRUE Object Oriented Language
  • Interpreted/Scripted Language
  • Similar Use and Features as Perl
  • Process text files
  • System Management
  • Extensible Portable

5
Ruby - Principles
  • Principle of least surprise
  • Arraysize or Arraylength?
  • Same method theyre aliased
  • What are the differences between arrays?
  • difference array1 array2
  • union array1 array2

6
Ruby - Principles
  • Principle of Least Effort
  • We dont want to waste time
  • Rapid Application development
  • Acessors/Mutators are created for you
  • The quicker we can program something the more we
    can accomplish
  • Less code means less bugs
  • Less code also means easier to understand,
    maintain, and enhance

7
Ruby - Variables
  • No more public, private, protected
  • _at_var ? Instance Variable
  • Var ? Local Variable
  • var ? Global Variable

8
Ruby - Naming Conventions
  • All Variables Are Lowercase
  • No camelCase only under_score
  • Constants are ALL_CAPS

9
Rails - History
  • David Heinemeier Hansson (37signals)
  • Extracted from Basecamp project
  • First released to public in July 2004
  • Version 1.0 was released December 13, 2005

10
Rails - About
  • Based on a Model-View-Controller (MVC)
    architecture

11
Rails - MVC
  • Model
  • Classes representing RDBMS tables
  • Classes are handled through the ActiveRecord
  • View
  • How data from the Controller is displayed
  • HTML templates
  • Controller
  • Responds to user interaction
  • Manipulates data in Model and displays it through
    the View
  • Initiated by a user through a web browser

12
Ruby on Rails - Principles
  • Dont Repeat Yourself
  • Definitions only need to be made once
  • Once a definition is made, Ruby can find the rest
    of the information itself
  • Example Column names do not need to be defined
    in ActiveRecord because Ruby can find them from
    the database itself
  • Convention over Configuration
  • No XML configuration files!
  • Programmer only needs to define what is
    unconventional
  • Example Class Post corresponds to database
    table post.

13
Requirements
  • FastCGI-capable web server
  • Apache 1.3.x or 2.x
  • lighttpd
  • Database and driver
  • MySQL or SQLite for example

14
Advantages
  • Open Source (FREE!)
  • Use, copy, modify, distribute
  • No need to write SQL
  • Works with a variety of database types
  • MySQL
  • PostgreSQL
  • SQLite
  • IBM DB2
  • Oracle
  • Microsoft SQL Server
  • Package includes WEBrick web server for
    development and testing
  • Rails provides helpers for implementing AJAX
    applications

15
Questions?
Write a Comment
User Comments (0)
About PowerShow.com