Course Content
Ruby's syntax, object model, and major built-in classes
- Basic object-orientation principles
- Program design with Ruby
- The use of Ruby as a "scripting" tool for administrative tasks
- Testing basics and Ruby testing facilities
Basic Ruby concepts and features
- "Everything's an object"
- Local variables and assignment
- Top-level method definitions
- Arithmetic and logical operators
- Global variables
- The default object (self)
Object orientation in Ruby
- Messages and methods
- Ruby's class model
- Inheritance
- The object method lookup-path
Classes and modules
- Class methods
- Constants
- Module "mix-ins" in classes
- Modules as namespaces
- Instance method definition syntax
- Reopening class and module definitions
- Overriding methods
Instances and attributes
- Instance variables
- Attribute setter and getter techniques
- Ruby and the "Equal Access Principle"
Strings, symbols, and regular expressions
- Basic string manipulation and indexing
- Symbols and the symbol table
- Regular expression syntax
- Pattern-matching with scan, sub, and match
Collection objects and iterators
- Array, Hash, and Range classes
- Code blocks and iteration
- Creating iterators with the Enumerable module
- Collection filtering, selecting, and transforming
- Enumerators and external iteration
Object dynamism
- Adding singleton methods to objects
- Modular extension of per-object behavior
- Singleton classes
- Extending existing classes
Threads
- Starting, running, stopping threads
- Threads and variable scope
- Thread-safety considerations
Lambdas and function objects
- Creating first-class functions
- Lambda argument semantics
- Variable scope and closures
- Block, Proc, lambda interaction
Metaprogramming
- The eval family of methods
- Programmatic method creation
- Runtime reflection on objects
- Traversing ObjectSpace
- method_missing and other hooks and callbacks
Exception handling
- The Exception class hierarchy
- Raising exceptions
- Rescue and ensure clauses
- Writing your own exception classes
File and I/O operations
- Keyboard input and screen output
- Basic file reading and writing
- File handles as iterators
- Low-level I/O techniques
Date, time, and numeric types
- Date, Time, and DateTime classes
- Date calculation and parsing
- Integers and floating-point numbers
The standard library
- StringIO hybrid objects
- Struct and OpenStruct
- Math extensions
- FileUtils and Pathname
- Socket and network programming facilities
- Administrative and system libraries
Testing in Ruby
- Unit testing principles
- The MiniTest and TestUnit libraries
Ruby tools
- Interactive Ruby (irb)
- Embedded Ruby (erb)
- The RubyGems packaging system
- Rake task management utility
Rails Fundamentals
- Rails overview and walkthrough
- The Model-View-Controller framework architecture
- Creating a new Rails application
- Rails request-handling and URL parsing
- Development-mode deployment
- Generating models and controllers
Database Creation and Configuration
- Basic MySQL creation commands
- Configuring database.yml
- Automatically-generated migrations
- Custom migrations
Working with ActiveRecord
- Modeling a domain
- ActiveRecord models and Ruby classes
- ActiveRecord associations
- Writing Rails-friendly SQL
- Data validation techniques
ActionView Essentials
- RHTML templates
- Embedded Ruby (ERb)
- Partial templates
- Built-in and custom helper methods
- Layouts
Using ActionController
- The session and flash facilities
- Planning and writing actions
- Controller/view communication via instance variables
- The special params hash
- Filter methods for specific actions
- Redirecting actions
- Explicit rendering commands
Working with Forms in Rails
- ActionPack form helper methods
- "Magic" form-field population
- Processing forms
- Hash-based batch processing of CGI data
Routing and REST
- The routes.rb file
- Simple route customization
- Named routes
- Resource mapping
- Default REST action names
Session management and security
- The session hash
- Password deployment and encryption
- Avoiding SQL injection
Deployment
- Distributed deployment with Capistrano
- Mongrel and mongrel_cluster
- Load-balancing with Apache and nginx
Testing in Rails
- Writing fixtures
- Unit tests
- Functional tests
- Integration tests
AJAX, JavaScript, and RJS
- JavaScript facilities and support in Rails
- Basic DOM updating with AJAX calls
- RJS templates
- Graceful degradation of AJAX
Reflective Rails
- The Rails application console
- Examining the Rails source code tree
- The API docs