Date post: | 06-May-2015 |
Category: |
Technology |
Upload: | chamnap-chhorn |
View: | 438 times |
Download: | 2 times |
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?