Beginning Ruby and Rails
Ruby on Rails applications take the concepts of convention-over-configuration and the DRY principle (Don't-Repeat-Yourself) to the next level of productivity. Since 2004 Rails has shown the world that there is a better way to build web application. Rails raises the level of abstraction by bringing the Ruby language closer to the problems facing web developers. In the course students will learn how to build database-driven web 2.0 applications.
Session Agenda
Sessions begin at 9AM and end at 5PM. Attendees must bring their own laptop.
Day 1
- Ruby Basics
- Scripting Languages
- What is Ruby?
- Installing Ruby
- Exploring Ruby with IRB
- Ruby: An object-oriented language
- Variables: Global, Instance and Class
- Numbers
- Strings
- Symbols
- Constants
- Methods and Method Arguments
- Class Methods
- Block
- Ranges
- Arrays
- Hashes
- Beginning Rails
- Creating dynamic pages with Rails
- Simple Model Validation
- Storing and Retrieving from the Session
- Using Scaffolds for rapid prototyping
- Creating Models that interact with the database
Day 2
- Beginning ActiveRecord
- The ActiveRecord Pattern
- ActiveRecord object life-cycle
- Model Class, Database Tables, Primary Keys, Foreign Keys
- Configuring and Connecting to the database
- Performing CRUD operations
- ActiveRecord::Base
- Conditions
- Finders
- Data Validation
- Entity Relationships
- Inheritance
- Migrations
Day 3
- Beginning ActionView
- How ActionView fits into MVC
- Leveraging XHTML and CSS
- ERB and RHTML
- Templates
- Partials
- Layouts
- Handling User Input
- The Public Directory
- Formatting, Linking, and Pagination
- Builder Templates
- JavaScript and RJS
Day 4
- Testing in Rails
- Rails Test Mode
- Unit Testing
- Functional Testing
- Integration Testing
- Behaviour-Driven Development
- Introduction to RSpec
- Using RSpec Spec Framework
- Using RSpect Scenario Framework (Cucumber)
- Beyond Test::Unit with Shoulda
- Production-Ready Rails
- Tagging Support with ActsAsTaggable
- Authentication with ActsAsAuthenticated and RestfulAuthentication
- Securing your Rails applications: Cross-site Scripting, URL and Form Manipulation, SQL injection, Cross-site requests
- Globalization/i18n support
- Performance Optimizations: Measuring/Profiling, Caching
- Deployment Options
- Deployment with Capistrano and Vlad