introduction to rails

Post on 06-May-2015

438 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to Web Development Using Rails

Chhorn Chamnap4 August 2012

Who Am I?

● Software Engineer from Yoolk Inc.● The author of the gem 'active_record_uuid'● Blog: http://chamnap.github.com/● Twitter: @chamnap● Email: chamnapchhorn@gmail.com

What is Rails?

+ =

Websites on Rails

Companies using Rails

Version History

The Framework

● Convention over Configuration (CoC)● Don't Repeat Yourself (DRY)● Model View Controller (MVC)

The Framework (MVC)

ActiveRecord

● Object Relational Mapping (ORM)● Class to Table, Object to Row● CRUD simple● Database Agnostic

ActiveRecord::Base

Validation

has_one

has_many

belongs_to

has_many :through

Associations

Fat Models

ActionController

● Separation of business logic and presentation● Ideally there should be no logic in the view

ActionController

ActionView

action.mimetype.renderer

● show.html.erb● index.rss.builder● edit.iphone.haml

Live Demo

Questions?

top related