Skip Navigation Links

Course Length:
5 Days
Course Description:
This course combines the following courses into a single course:
          Ruby Programming
          Ruby on Rails 3

The description of each course is listed below:

This course covers the fundamental components of the Ruby Programming Language. Emphasis is placed on the object oriented aspects of Ruby. Topics include arrays, hashes, regular expressions, io, exceptions, modules, and applications areas.

This course describes how to write database-backed Web Applications using the Ruby on Rails (also pronounced RoR, or Rails) Framework. Students are taken through the various steps of creating a full-fledged Web Application. Topics include the MVC paradigm, object relational mapping, fill in forms, sessions, validation techniques, testing, and various other Rails topics.
Who Should Attend:
This course combines several courses, the descriptions for who should attend are listed below: This course is intended primarily for those who have programmed in other programming languages such as, but not limited to, C, C++, Java, or Perl. A typical student in this course has either been tasked with writing a Rails application, or has been tasked with evaluating the Rails framework. Thus, this course should be attended by developers and managers alike, and possibly system administrators.
Benefits of Attendance:
Upon completion of this course, students will be able to:
  • Distinguish and use various Ruby datatypes
  • Master the use of arrays and hashes
  • Build home grown classes
  • Use the extensive pre bundled classes
  • Use the I/O facilities of Ruby to read and write binary and text files
  • Master the use of Iterators to loop through various data structures
  • Use Exceptions in handling various run time errors
  • Create Ruby modules
  • Use the wide variety of Ruby Modules that come with the Ruby distribution
  • Download and install Rails along with various other products that allow one to write Rails applications
  • Understand the Model, View, Controller paradigm and how this applies to Rails applications
  • Understand the directory structure of a Rails application
  • Build non-trivial database backed Web Applications
  • Understand the ActiveRecord classes and how they wrap database tables
  • Understand the interplay between various controller actions and .rhtml (template) files
  • Understand the Create, Read, Update, and Destroy (CRUD) paradigm
  • Validate Model data
  • Use the Rails console to debug applications
Prerequisites:
Students should have taken the Software Development for Non-Programmers course or have at least six months of programming experience in at least one programming language. Students should have been through a course in the Ruby Programming language. They should also have an understanding of HTML. Students should also have experience with a SQL compliant database such as MySQL.
Course Outline:
  • Chapter 1: An Overview Of Ruby (Part 1)
    1. What is Ruby?
    2. Executing Ruby Code
    3. Getting Input
    4. Comments
    5. Numbers
    6. Strings
    7. The Class Class
    8. Decision Making
    9. The case Construct
    10. Loops
    11. Iterators
    12. Regular Expressions
    13. Functions
    14. Odds and Ends
    15. Time Methods
  • Chapter 2: An Overview of Ruby (Part 2)
    1. Arrays
    2. Array Operator Methods
    3. Array Equality Operator
    4. Arrays as Stacks and Queues
    5. Higher Dimensional Arrays
    6. Other Useful Arrays Methods
    7. Command Line Arguments
    8. Hashes
    9. Common Hash Methods
    10. Sorting Hashes
    11. Iterators with Arrays and Hashes
    12. Arrays and Functions
    13. Hashes and Functions
    14. Named Parameters
    15. Symbols
    16. Procs
    17. Closures
  • Chapter 3: Classes
    1. Objects
    2. Brief History of OOP
    3. OOP Vocabulary
    4. Creating a New Class
    5. Using Objects
    6. Defining Operator Methods
    7. Inheritance
    8. Ancestors
    9. self
    10. Access Levels - public
    11. Access Levels – private
    12. Access Levels - protected
    13. Access Levels - Specification
    14. Class Data and Class Methods
    15. Adding Methods to Classes and Objects
    16. Special Global Variables
    17. Scope of Variables
    18. Built-in Classes
    19. The Math Class
    20. The NilClass Class
    21. TrueClass and FalseClass
    22. Built-in Class Hierarchy
  • Chapter 4: Input and Output
    1. Introduction
    2. Reading from the Standard Input
    3. Reading a Character at a Time
    4. Writing to the Standard Output
    5. Reading and Writing Disk Files
    6. Reading Files Using Iterators
    7. I/O With Command Line Commands
    8. Seeking About Files
    9. tell
    10. Capturing Data About Files
    11. Processing Directories
  • Chapter 5: Exceptions
    1. Introduction
    2. Exceptions
    3. Handling Exceptions
    4. Multiple Rescue Clauses
    5. Exceptions are Classes
    6. ensure
    7. retry
    8. raise
    9. Creating Your Own Exceptions
    10. catch and throw
  • Chapter 6: Modules
    1. Introduction
    2. Using Core Ruby Classes
    3. Ruby Standard Library
    4. require
    5. Search Path
    6. File Organization
    7. Load
    8. Modules
    9. include
    10. Mixins
    11. Using the Comparable Module
    12. Collection Classes
    13. yield
    14. Using the Enumerable Module
  • Chapter 7: Odds and Ends
    1. Ruby Conventions
    2. Strings Are References
    3. The Selection Operator, [ ]
    4. Index Methods
    5. Stripping Whitespace Characters
    6. Bit Manipulation
    7. The upto Method
    8. Substituting
    9. Processing a Line at a Time
    10. Marshalling
    11. Reflection
    12. grep
    13. Classes are Objects
    14. Aliasing
    15. Testing
    16. Test::Unit
    17. Testing Your Own Classes
    18. Freezing Objects
  • Chapter 1: An Overview Of Ruby on Rails
    1. What is Ruby on Rails?
    2. Overview of Rails Components
    3. Installing Rails
    4. A Simple Rails Application
    5. Starting the Rails Server
    6. Static Pages Within a Rails Application
    7. The Structure of a Rails Application
    8. Generating a Controller
    9. Rendering the View
    10. Adding a Static Page
    11. Dynamic Pages with Embedded Ruby
    12. Using the render Method
    13. Using the link_to Method
  • Chapter 2: Rails and HTML Forms
    1. A Basic HTML Form
    2. Processing an HTML Form
    3. Working With Form Data
    4. Other Form Elements
    5. Form Tag Helpers
  • Chapter 3: Databases and Rails
    1. Review of the MVC Architecture
    2. Entities and Relationships
    3. Databases and Models
    4. Rails Database Conventions
    5. Adding a Model
    6. Database Migrations
    7. The Rails Database Console
    8. Creating a Rails View of a Database Table
    9. Scaffolding
    10. RESTful Routes and Resources
  • Chapter 4: Form Helpers and Validation
    1. Introduction
    2. Form Helpers and form_for
    3. Processing Form Helpers
    4. From Form to Database
    5. Redirection
    6. Data Validation
    7. Validation Helpers
    8. The presence Validator
    9. The numericality Validator
    10. The uniqueness Validator
    11. The length Validator
    12. The format Validator
    13. Custom Validation Methods
    14. The errors Object
    15. Displaying Validation Errors in the View
  • Chapter 5: Adding Style to an Application
    1. Styling
    2. Rails and Sass
    3. Cascading Style Sheets
  • Chapter 6: Users
    1. Introduction
    2. Configuring an Application for Sessions
    3. Registering Users
    4. The Register Action
    5. The flash Hash
    6. Validating the Registration
    7. Logging in
    8. Logging Out
    9. Protected Pages
    10. Filters
  • Chapter 7: Putting it All Together
    1. Introduction
    2. The Business Application
    3. Database Terminology
    4. Linking Two Models
    5. Adding Tasks
    6. The Database Tables
    7. Displaying Employee Tasks
    8. Deleting a Task
    9. Listing Employees and Tasks
    10. Migrations
    11. Editing a Record
    12. Summary