1. What is Ruby on Rails?

bricklayerbelchedInternet and Web Development

Feb 5, 2013 (4 years and 8 months ago)

107 views

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)


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!!