Product Overview
Hooray! A new and improved edition on this book is now available!
The 1st edition of Build Your Own Ruby on Rails Web Applications was a fine book but we replaced it with a new and updated edition in May 2008.
However, if you do happen to own a copy of 'Build Your Own Ruby on Rails Web Applications - 1st edition' you may still be interested in:
- Downloading the 1st edition code archive
- Viewing the list of known corrections and typos
Build Your Own Ruby on Rails Web Applications
Table Of Contents
- Here’s a look at the table of contents:
- Preface
- Who Should Read this Book?
- What you’ll Learn
- What’s in this Book?
- The Book’s Web Site
- The Code Archive
- Updates and Errata
- The SitePoint Forums
- The SitePoint Newsletters
- Your Feedback
- Acknowledgements
- Introducing Ruby on Rails
- History
- Development Principles
- Convention Over Configuration
- Don’t Repeat Yourself
- Agile Development
- Building the Example Web Application
- What is digg?
- Features of the Example Application
- Summary
- Getting Started
- What Does All this Cost?
- Installing on Windows
- Installing on Mac OS X
- Mac OS X 10.5 (Leopard)
- Mac OS X 10.4 (Tiger) and Earlier
- Installing on Linux
- Using a Package Manager
- Prerequisites
- Installing Ruby on Linux
- Installing RubyGems on Linux
- Installing Rails on Linux
- Installing MySQL on Linux
- Building a Foundation
- One Directory Structure to Rule them All
- Creating the Standard Directory Structure
- Starting our Application
- Which Text Editor?
- Windows Text Editors
- Mac OS X Text Editors
- Linux and Cross-platform Editors
- Summary
- Introducing Ruby
- Ruby is a Scripting Language
- Compiled Languages
- Scripting Languages
- The Great Performance Debate
- Ruby is an Object Oriented Language
- Reading and Writing Ruby Code
- The Interactive Ruby Shell (irb)
- Interacting with Ruby Objects
- Punctuation in Ruby
- Object Oriented Programming in Ruby
- Classes and Objects
- Object-level Functionality
- Class-level Functionality
- Inheritance
- Return Values
- Standard Output
- Ruby Core Classes
- Arrays
- Hashes
- Strings
- Numerics
- Symbols
- nil
- Running Ruby Files
- Control Structures
- Conditionals
- Loops
- Blocks
- Summary
- Ruby is a Scripting Language
- Rails Revealed
- Three Environments
- Database Configuration
- The Database Configuration File
- Creating the Databases
- The Model-view-controller Architecture
- MVC in Theory
- MVC the Rails Way
ActiveRecord(the Model)- The
ActionPackModule
- Code Generation
- ActionMailer
- Testing and Debugging
- Testing
- Debugging
- A GUI Tool for MySQL
- Summary
- Models, Views, and Controllers
- Generating a Model
- The Model Generator
- Modifying the Schema Using Migrations
- Managing Data Using the Rails Console
- Where’s the SQL?
- Generating a Controller
- Running the
generateScript - Understanding the Output
- Starting our Application … Again
- Running the
- Creating a View
- Generating Views with Scaffolding
- Creating Static Pages
- Creating Dynamic Pages
- Passing Data Back and Forth
- Pulling in a Model
- Summary
- Generating a Model
- Helpers, Forms, and Layouts
- Calling Upon our Trusty Helpers
- Story Submission
- Creating a Form
- Saving Data to the Database
- Creating a Layout
- User Feedback and the Flash
- Testing the Form
- Testing the Model
- Testing the Controller
- Revisiting the Logs
- Summary
- Ajax and Web 2.0
- Generating a Vote Model
- Creating the Model
- Creating the Migration
- Applying the Migration
- An Introduction to Relationships
- Introducing the
has_manyClause - Introducing the
belongs_toClause - How’s our Schema Looking?
- Introducing the
- Clean URLs and Permalinks
- Implementing Clean URLs
- Adding Permalinks to Stories
- Showing off our Stories
- Ajax and Rails
- What is Ajax?
- Remote Scripting with Prototype
- Visual Effects with script.aculo.us
- Making Stories Shove-able
- Introducing Partials
- Adding Voting History
- Creating the Partial
- Styling the Voting History
- Tweaking the Voting History
- Testing the Voting Functionality
- Testing the Model
- Testing the Controller
- Running the Full Test Suite
- Summary
- Generating a Vote Model
- Protective Measures
- Sessions and Cookies
- Identifying Individual Users
- What’s a Cookie?
- What’s a Session?
- Sessions in Rails
- Modeling the User
- Generating a User Model
- Adding Relationships for the
UserClass - Creating a User
- Developing Login Functionality
- Creating the Controller
- Creating the View
- Adding Functionality to the Controller
- Filters
- Before Filters
- After Filters
- Around Filters
- A Word on Filter Methods
- Managing User Logins
- Retrieving the Current User
- Displaying the Name of the Current User
- Allowing Users to Log Out
- Adding a Navigation Menu
- Restricting the Application
- Protecting the Form
- Restricting Access to Story Submission
- Associating Stories with Users
- Testing User Authentication
- Testing the Model
- Testing the Controllers
- Summary
- Sessions and Cookies
- Advanced Topics
- Promoting Popular Stories
- Using a Counter Cache
- Implementing the Front Page
- Implementing the Voting Bin
- Abstracting Presentation Logic
- Requiring that Users Log In to Vote
- Adding Story Attributes
- Auto-generating Permalinks
- Introducing Model Callbacks
- Adding a Callback
- Expanding the Submission Form
- Adding User Pages
- Introducing the Join Model Relationship
- Introducing the
has_many :throughAssociation - Modifying the Controller
- Creating the View
- Testing the New Functionality
- Testing the Model
- Testing the StoryController
- Testing the AccountController
- Running the Complete Test Suite
- Summary
- Promoting Popular Stories
- Rails Plugins
- What is a Plugin?
- Adding Tagging to Shovell
- Introducing the
acts_as_taggablePlugin - Enabling Tag Submission
- Enabling Tag Display
- Assigning our First Tags
- Viewing Stories by Tag
- Introducing the
- Testing the Tagging Functionality
- Testing the Model
- Testing the Controller
- Running the Test Suite ... Again!
- Summary
- Debugging, Testing, and Benchmarking
- Debugging your Application
- Debugging within Templates
- Debugging Using Breakpoints
- Using the Rails Logging Tool
- Overcoming Problems in Debugging
- Testing your Application
- Integration Tests
- Using Breakpoints in a Test
- Revisiting the Rails Console
- Benchmarking your Application
- Taking Benchmarks from Log Files
- Manual Benchmarking
- Summary
- Debugging your Application
- Deployment and Production Use
- The Implications of “Production”
- Choosing a Production Environment
- Web Server Options
- Back-end Options
- Deploying Shovell
- Step 1: Installing Mongrel
- Step 2: Moving to the Production System
- Step 3: Setting Up Apache
- Alternatives for Session Storage
- The
ActiveRecord StoreSession Container - The
MemCached StoreSession Container
- The
- Further Reading
- Caching
- Version Control and Deployment Management
- Errors by Email
- Summary
- Index
Instant Download!
This title available in Adobe PDF format only




