Ruby on rails online training

Ruby on rails online training

Ruby on Rails, often simply Rails, is an open source web application framework which runs via the Ruby programming language. It is a full-stack framework: it allows creating pages and applications that gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server.

Ruby on Rails emphasizes the use of well-known software engineering patterns and principles, such as active record pattern, convention over configuration (CoC), don't repeat yourself (DRY), and model–view–controller (MVC).

1. Getting Started with Rails
A. Installing Rails

B. Platform requirements
    • Supported database back ends
    • Ruby installation
    • Instant Rails for Windows

C. Creating a new application
    • The 'rails' command
    • Tour of the Rails application layout

D. Application configuration and bootstrapping
    • Creating the databases
    • Configuring database.yml
    • Setting the default route

E. Connecting to a Rails application
    • Controller/action/id URL semantics
    • Dispatcher and routing roadmap
    • Basic custom route creation
    • Examining the log files

F. Rails tools
    • Managing tasks with rake (Ruby make)
    • The application console

G. The Model/View/Controller (MVC) framework architecture
    • Separation of concerns
    • MVC in the application directory layout

H. The Rails philosophy: "Convention over configuration"
I. Version control manager (git, GitHub)
J. Plugins and Gems
2. Ruby Language Skills and Techniques
A. Running Ruby
    • Command-line Ruby
    • The Interactive Ruby (irb) console

B. Objects, variables, and methods
    • Basic object-orientation concepts
    • Naming conventions
    • Variable assignment
    • Local vs. instance variables
    • Method-calling semantics
    • Method arguments and return values
    
C. Classes and modules
    • Instantiating classes
    • Mixing in modules
    • Modules as namespaces

D. Built-in classes
    • String
    • Array
    • Hash
    • Symbol
    • Numeric's
    
E. Blocks and iterations
    • Blocks vs. methods vs. lambdas
    • Collection iteration
    • Single-object iteration
3. Model Design and Database Management
A. Domain modeling for Rails and Ruby
    • Describing the "what" of the application
    • Creating ActiveRecord models with "generate"

B. Object-relational mapping with ActiveRecord
    • ActiveRecord models and Ruby classes
    • ActiveRecord associations
        a. One-to-one, one-to-many
        b. Many-to-many

C. "Rails-friendly" SQL
    • Table-naming conventions
    • Primary and foreign keys
    
D. Database maintenance with ActiveRecord Migrations
    • Default migrations
    • Customizing migrations
    • Migrating backwards

4. Controller Actions and View Templates
A. 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

B. HTML templating with Embedded Ruby (ERb)
    • Rules of ERb processing
    • Layouts
    • Using master and partial templates

C. Fine-tuning controllers and view
    • Controller filters
    • Redirecting requests
    • Default and custom view helper methods

D. Writing and processing HTML forms in Rails
    • Using form helper methods
    • "Magic" field initialization from instance variables
    • Accessing CGI data through the "params" hash

E. Ajax calls and RJS (Ruby/JavaScript) templates
    • Basic DOM updating with Ajax
    • Using RJS for composite Ajax calls
5. Application Testing
A. Rails unit tests
    • The Ruby TestUnit framework
    • Writing fixtures
    • Addressing test failures and errors

B. Functional (controller) tests
    • Triggering controller requests from tests
    • Examining controller responses

6. Ruby and Rails Resources
    A. Mailing lists
    B. Websites
    C. Books
    D. IRC channels