In this 5 day Ruby on Rails training class, students will learn to create database-driven websites using Ruby on Rails. They will learn to install Ruby and Rails, to program in Ruby and use Ajax in their Ruby on Rails applications.
Goals
- Learn to install and configure Ruby and Rails
- Understand the Model-View-Controller framework architecture
- Learn to program in Ruby
- Learn to build database-driven applications with Ruby on Rails
- Learn to work with templates
- Learn to use Ajax in Ruby on Rails applications
- Learn to test Ruby on Rails applications
Outline
- Getting Started with Rails
- Installing Rails
- Platform requirements
- Supported database backends
- Ruby installation
- InstantRails for Windows
- Creating a new application
- The ‘rails’ command
- Tour of the Rails application layout
- Application configuration and bootstrapping
- Creating the databases
- Configuring database.yml
- Setting the default route
- Connecting to a Rails application
- controller/action/id URL semantics
- Dispatcher and routing roadmap
- Basic custom route creation
- Examining the log files
- Rails tools
- Managing tasks with rake (Ruby make)
- The application console
- The Model/View/Controller (MVC) framework architecture
- Separation of concerns
- MVC in the application directory layout
- The Rails philosophy: “Convention over configuration”
- Ruby Language Skills and Techniques
- Running Ruby
- Command-line Ruby
- The Interactive Ruby (irb) console
- Objects, variables, and methods
- Basic object-orientation concepts
- Naming conventions
- Variable assignment
- Local vs. instance variables
- Method-calling semantics
- Method arguments and return values
- Classes and modules
- Instantiating classes
- Mixing in modules
- Modules as namespaces
- Built-in classes
- String
- Array
- Hash
- Symbol
- Numerics
- Blocks and iterators
- Blocks vs. methods vs. lambdas
- Collection iteration
- Single-object iteration
- Running Ruby
- Model Design and Database Management
- Domain modeling for Rails and Ruby
- Describing the “what” of the application
- Creating ActiveRecord models with “generate”
- Object-relational mapping with ActiveRecord
- ActiveRecord models and Ruby classes
- ActiveRecord associations
- One-to-one, one-to-many
- Many-to-many
- “Rails-friendly” SQL
- Table-naming conventions
- Primary and foreign keys
- Database maintenance with ActiveRecord Migrations
- Default migrations
- Customizing migrations
- Migrating backwards
- Domain modeling for Rails and Ruby
- Controller Actions and View Templates
- Basics of controller/view interaction
- Creating controllers and views with “generate”
- Default rendering rules
- Shared controller/template instance variables
- Separating controller logic from view specifics
- HTML templating with Embedded Ruby (ERb)
- Rules of ERb processing
- Layouts
- Using master and partial templates
- Fine-tuning controllers and view
- Controller filters
- Redirecting requests
- Default and custom view helper methods
- Writing and processing HTML forms in Rails
- Using form helper methods
- “Magic” field initialization from instance variables
- Accessing CGI data through the “params” hash
- Ajax calls and RJS (Ruby/JavaScript) templates
- Basic DOM updating with Ajax
- Using RJS for composite Ajax calls
- Basics of controller/view interaction
- Application Testing
- Rails unit tests
- The Ruby TestUnit framework
- Writing fixtures
- Addressing test failures and errors
- Functional (controller) tests
- Triggering controller requests from tests
- Examining controller responses
- Rails unit tests
- Ruby and Rails Resources
- Mailing lists
- Websites
- Books
- IRC channels
To Hire an AMS Ruby on Rails Subject Matter Expert Developer and Instructor who also teaches this class, call 800-798-3901 today!