Ruby on Rails

Preview:

DESCRIPTION

Ruby on Rails. By S. Christopher Hellriegel. Overview. 1. What is Ruby on Rails?. 2. What is MVC?. 3. Simple example. 4. Wow, that was cool!. What is Ruby on Rails?. New, radical web development framework Built in Ruby and utilizes MVC architecture Practices DRY (Don’t Repeat Yourself) - PowerPoint PPT Presentation

Citation preview

Ruby on Rails

By S. Christopher Hellriegel

Overview

1. What is Ruby on Rails?1. What is Ruby on Rails?

2. What is MVC?2. What is MVC?

3. Simple example 3. Simple example

4. Wow, that was cool!4. Wow, that was cool!

What is Ruby on Rails?

• New, radical web development framework

• Built in Ruby and utilizes MVC architecture

• Practices DRY (Don’t Repeat Yourself)

• Utilizes metaprogramming

• Is fully database capable

• Utilizes convention over configuration

• Easy to use, especially when compared to other frameworks

What is MVC?

• Model-View-Controller Architecture

• Breaks components up

• Model -> encapsulates data

• View -> presentation layer

• Controller -> business logic, ties Model and View together

Simple Example

• Store Recipes!

• First, create directory

Example Continued…

• cd into cookbook2 directory

• Create database

Example Continued…

• Configure database

Example Continued…

• Test run server

Example Continued…

• Generate model object

• Add scaffold into model

Wow, that was cool!

• It works!!