2014 10 02 an Introduction to Web Development With Ruby on Rails
Introduction to rails
-
Upload
chamnap-chhorn -
Category
Technology
-
view
438 -
download
2
Transcript of Introduction to rails
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: [email protected]
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?