- 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)
- What is Ruby?
- Executing Ruby Code
- Getting Input
- Comments
- Numbers
- Strings
- The Class Class
- Decision Making
- The case Construct
- Loops
- Iterators
- Regular Expressions
- Functions
- Odds and Ends
- Time Methods
- Chapter 2: An Overview of Ruby (Part 2)
- Arrays
- Array Operator Methods
- Array Equality Operator
- Arrays as Stacks and Queues
- Higher Dimensional Arrays
- Other Useful Arrays Methods
- Command Line Arguments
- Hashes
- Common Hash Methods
- Sorting Hashes
- Iterators with Arrays and Hashes
- Arrays and Functions
- Hashes and Functions
- Named Parameters
- Symbols
- Procs
- Closures
- Chapter 3: Classes
- Objects
- Brief History of OOP
- OOP Vocabulary
- Creating a New Class
- Using Objects
- Defining Operator Methods
- Inheritance
- Ancestors
- self
- Access Levels - public
- Access Levels – private
- Access Levels - protected
- Access Levels - Specification
- Class Data and Class Methods
- Adding Methods to Classes and Objects
- Special Global Variables
- Scope of Variables
- Built-in Classes
- The Math Class
- The NilClass Class
- TrueClass and FalseClass
- Built-in Class Hierarchy
- Chapter 4: Input and Output
- Introduction
- Reading from the Standard Input
- Reading a Character at a Time
- Writing to the Standard Output
- Reading and Writing Disk Files
- Reading Files Using Iterators
- I/O With Command Line Commands
- Seeking About Files
- tell
- Capturing Data About Files
- Processing Directories
- Chapter 5: Exceptions
- Introduction
- Exceptions
- Handling Exceptions
- Multiple Rescue Clauses
- Exceptions are Classes
- ensure
- retry
- raise
- Creating Your Own Exceptions
- catch and throw
- Chapter 6: Modules
- Introduction
- Using Core Ruby Classes
- Ruby Standard Library
- require
- Search Path
- File Organization
- Load
- Modules
- include
- Mixins
- Using the Comparable Module
- Collection Classes
- yield
- Using the Enumerable Module
- Chapter 7: Odds and Ends
- Ruby Conventions
- Strings Are References
- The Selection Operator, [ ]
- Index Methods
- Stripping Whitespace Characters
- Bit Manipulation
- The upto Method
- Substituting
- Processing a Line at a Time
- Marshalling
- Reflection
- grep
- Classes are Objects
- Aliasing
- Testing
- Test::Unit
- Testing Your Own Classes
- Freezing Objects
- Chapter 1: An Overview Of Ruby on Rails
- What is Ruby on Rails?
- Overview of Rails Components
- Installing Rails
- A Simple Rails Application
- Starting the Rails Server
- Static Pages Within a Rails Application
- The Structure of a Rails Application
- Generating a Controller
- Rendering the View
- Adding a Static Page
- Dynamic Pages with Embedded Ruby
- Using the render Method
- Using the link_to Method
- Chapter 2: Rails and HTML Forms
- A Basic HTML Form
- Processing an HTML Form
- Working With Form Data
- Other Form Elements
- Form Tag Helpers
- Chapter 3: Databases and Rails
- Review of the MVC Architecture
- Entities and Relationships
- Databases and Models
- Rails Database Conventions
- Adding a Model
- Database Migrations
- The Rails Database Console
- Creating a Rails View of a Database Table
- Scaffolding
- RESTful Routes and Resources
- Chapter 4: Form Helpers and Validation
- Introduction
- Form Helpers and form_for
- Processing Form Helpers
- From Form to Database
- Redirection
- Data Validation
- Validation Helpers
- The presence Validator
- The numericality Validator
- The uniqueness Validator
- The length Validator
- The format Validator
- Custom Validation Methods
- The errors Object
- Displaying Validation Errors in the View
- Chapter 5: Adding Style to an Application
- Styling
- Rails and Sass
- Cascading Style Sheets
- Chapter 6: Users
- Introduction
- Configuring an Application for Sessions
- Registering Users
- The Register Action
- The flash Hash
- Validating the Registration
- Logging in
- Logging Out
- Protected Pages
- Filters
- Chapter 7: Putting it All Together
- Introduction
- The Business Application
- Database Terminology
- Linking Two Models
- Adding Tasks
- The Database Tables
- Displaying Employee Tasks
- Deleting a Task
- Listing Employees and Tasks
- Migrations
- Editing a Record
- Summary
- Chapter 1: An Overview Of Ruby (Part 1)


















