Slide 1

Slide 1 text

RAILS what is

Slide 2

Slide 2 text

Rails is a web framework

Slide 3

Slide 3 text

Rails is a platform

Slide 4

Slide 4 text

Rails is a kitchen sink

Slide 5

Slide 5 text

Rails makes web dev easy

Slide 6

Slide 6 text

How easy it?

Slide 7

Slide 7 text

$ gem install rails

Slide 8

Slide 8 text

Wat? How many gems? ?

Slide 9

Slide 9 text

25 gem dependencies

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

$> cd its_like_groupon_but_newer/

Slide 12

Slide 12 text

$> cd its_like_groupon_but_newer/ $> find . | wc -l

Slide 13

Slide 13 text

$> cd its_like_groupon_but_newer/ $> find . | wc -l 88

Slide 14

Slide 14 text

$> cd its_like_groupon_but_newer/ $> find . | wc -l 88 $> subl .

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

ZOMG SO MUCH SHIT

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Model contains business logic

Slide 24

Slide 24 text

class Post < ActiveRecord::Base belongs_to :author has_many :comments attr_accessible :title, :body end

Slide 25

Slide 25 text

View displays information

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Controller ...

Slide 31

Slide 31 text

Controller controls the other two

Slide 32

Slide 32 text

class PostController < ApplicationController def index @posts = Post.all respond_to do |format| format.html format.json { render json: @posts } end end end

Slide 33

Slide 33 text

MVC

Slide 34

Slide 34 text

Browser View Controller Model

Slide 35

Slide 35 text

Browser View Controller Model

Slide 36

Slide 36 text

Browser View Controller Model

Slide 37

Slide 37 text

Browser View Controller Model

Slide 38

Slide 38 text

Browser View Controller Model

Slide 39

Slide 39 text

Browser View Controller Model

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

ItsLikeGrouponButNewer::Application.routes.draw do resources :posts match ‘admin’ => ‘admin#dashboard’ end

Slide 42

Slide 42 text

QUESTIONS? Any