10
Ruby on Rails By S. Christopher Hellriegel

Ruby on Rails

Embed Size (px)

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

Page 1: Ruby on Rails

Ruby on Rails

By S. Christopher Hellriegel

Page 2: Ruby on Rails

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!

Page 3: Ruby on Rails

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

Page 4: Ruby on Rails

What is MVC?

• Model-View-Controller Architecture

• Breaks components up

• Model -> encapsulates data

• View -> presentation layer

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

Page 5: Ruby on Rails

Simple Example

• Store Recipes!

• First, create directory

Page 6: Ruby on Rails

Example Continued…

• cd into cookbook2 directory

• Create database

Page 7: Ruby on Rails

Example Continued…

• Configure database

Page 8: Ruby on Rails

Example Continued…

• Test run server

Page 9: Ruby on Rails

Example Continued…

• Generate model object

• Add scaffold into model

Page 10: Ruby on Rails

Wow, that was cool!

• It works!!