| |
| |
| |
Project Setup and Proof of Concept | |
| |
| |
Introducing the Emporium Project | |
| |
| |
Installing the Software | |
| |
| |
Installing Ruby | |
| |
| |
Installing RubyGems | |
| |
| |
Installing Ruby on Rails | |
| |
| |
Installing MySQL | |
| |
| |
Installing the MySQL Driver | |
| |
| |
Introducing Scrum | |
| |
| |
Creating the Emporium Application | |
| |
| |
Creating the Skeleton Application | |
| |
| |
Creating the Emporium Database | |
| |
| |
Starting Emporium for the First Time | |
| |
| |
How Does Ruby on Rails Work? | |
| |
| |
Implementing the About Emporium User Story | |
| |
| |
Running the Generate Script | |
| |
| |
Modifying the Generated View | |
| |
| |
Creating the Layout | |
| |
| |
Modifying the Generated Controller | |
| |
| |
Summary | |
| |
| |
| |
Author Management | |
| |
| |
Using Test-Driven Development | |
| |
| |
Testing in Rails | |
| |
| |
Unit Testing | |
| |
| |
Functional Testing | |
| |
| |
Integration Testing | |
| |
| |
Creating the ActiveRecord Model | |
| |
| |
Using ActiveRecord Migrations | |
| |
| |
Running Unit Tests | |
| |
| |
Creating the Controller | |
| |
| |
Implementing the User Stories | |
| |
| |
Adding an Author | |
| |
| |
Listing Authors | |
| |
| |
Viewing an Author | |
| |
| |
Editing an Author | |
| |
| |
Deleting an Author | |
| |
| |
Adjusting the Flash Notifications | |
| |
| |
Summary | |
| |
| |
| |
Book Inventory Management | |
| |
| |
Getting the Requirements | |
| |
| |
Using Scaffolding | |
| |
| |
Implementing the Publisher Administration Interface | |
| |
| |
Updating the Schema with the Publishers Table | |
| |
| |
Generating Publisher Code with the Scaffolding Script | |
| |
| |
Completing the Add Publisher User Story | |
| |
| |
Completing the View Publisher User Story | |
| |
| |
Completing the Edit Publisher User Story | |
| |
| |
Implementing the Book Administration Interface | |
| |
| |
Updating the Schema with the Books Table | |
| |
| |
Creating the Book Model | |
| |
| |
ActiveRecord Mapping | |
| |
| |
Modifying the Generated Models | |
| |
| |
Cloning the Database | |
| |
| |
Unit Testing Validations | |
| |
| |
Unit Testing the ActiveRecord Mappings | |
| |
| |
Generating Book Administration Code with the Scaffolding Script | |
| |
| |
Integration Testing | |
| |
| |
Completing the Add Book User Story | |
| |
| |
Completing the Upload Book Cover User Story | |
| |
| |
Completing the List Books User Story | |
| |
| |
Completing the View Book User Story | |
| |
| |
Completing the Edit Book User Story | |
| |
| |
Testing the Delete Book User Story | |
| |
| |
Summary | |
| |
| |
| |
Book Catalog Browsing | |
| |
| |
Getting the Book Catalog Requirements | |
| |
| |
Implementing the Book Catalog Interface | |
| |
| |
Implementing the Browse Books User Story | |
| |
| |
Implementing the View Book Details User Story | |
| |
| |
Implementing the Search Books User Story | |
| |
| |
Implementing the Get Latest Books User Story | |
| |
| |
Creating an RSS Feed | |
| |
| |
Summary | |
| |
| |
| |
Shopping Cart Implementation | |
| |
| |
Getting the Shopping Cart Requirements | |
| |
| |
Setting Up the Shopping Cart | |
| |
| |
Creating the Controller | |
| |
| |
Adding a Functional Test | |
| |
| |
Creating the Models | |
| |
| |
Modifying the Controller | |
| |
| |
Creating the Views | |
| |
| |
Implementing the User Stories | |
| |
| |
Implementing the Add Items to the Cart User Story | |
| |
| |
Implementing the Remove Items from the Cart User Story | |
| |
| |
Implementing the Clear the Cart User Story | |
| |
| |
Summary | |
| |
| |
| |
Forum Implementation | |
| |
| |
Getting the Forum Requirements | |
| |
| |
Using the Threaded Forum Plugin | |
| |
| |
Setting Up the Forum | |
| |
| |
Updating the Database Schema | |
| |
| |
Modifying the Model | |
| |
| |
Unit Testing the Model | |
| |
| |
Generating the Controller and View | |
| |
| |
Implementing the User Stories | |
| |
| |
Implementing the Post to Forum User Story | |
| |
| |
Implementing the View Forum User Story | |
| |
| |
Implementing the View Post User Story | |
| |
| |
Implementing the Reply to Post User Story | |
| |
| |
Summary | |
| |
| |
| |
Tagging Support | |
| |
| |
Getting the Tagging Requirements | |
| |
| |
Using the Tagging RubyGem | |
| |
| |
Setting Up for Tagging | |
| |
| |
Updating the Database Schema | |
| |
| |
Preparing the Models | |
| |
| |
Unit Testing the Model | |
| |
| |
Using the Console to Test the Model | |
| |
| |
Implementing the User Stories | |
| |
| |
Implementing the Assign Tags User Story | |
| |
| |
Implementing the Edit Tags User Story | |
| |
| |
Implementing the List Tags and Show Tag User Stories | |
| |
| |
Implementing the Recommend Books User Story | |
| |
| |
Summary | |
| |
| |
| |
Security | |
| |
| |
Getting the Authentication Requirements | |
| |
| |
Using the Authentication Plugin | |
| |
| |
Implementing the User Stories | |
| |
| |
Implementing the Log In User Story | |
| |
| |
Implementing the Fail Log In User Story | |
| |
| |
Implementing the Reset Password User Story | |
| |
| |
Protecting Your Application | |
| |
| |
Cross-Site Scripting | |
| |
| |
URL and Form Manipulation | |
| |
| |
SQL Injection | |
| |
| |
Cross-Site Request Forgery | |
| |
| |
Summary | |
| |
| |
| |
Checkout and Order Processing | |
| |
| |
Getting the Checkout and Order-Processing Requirements | |
| |
| |
Implementing the Check Out User Story | |
| |
| |
Creating the Models | |
| |
| |
Adding Validations to the Model | |
| |
| |
Creating the Controller and Integration Test | |
| |
| |
Creating the View | |
| |
| |
Saving the Order Information | |
| |
| |
Integrating with Payment Gateways | |
| |
| |
Installing the Active Merchant Plugin | |
| |
| |
Integrating with PayPal | |
| |
| |
Integrating with Authorize.Net | |
| |
| |
Using the Payment Gem | |
| |
| |
Implementing the Administrator User Stories | |
| |
| |
Implementing the View Orders User Story | |
| |
| |
Implementing the View Order User Story | |
| |
| |
Implementing the Close Order User Story | |
| |
| |
Calculating Shipping Costs and Taxes | |
| |
| |
Using the Shipping Gem | |
| |
| |
Calculating Taxes | |
| |
| |
Summary | |
| |
| |
| |
Multiple Language Support | |
| |
| |
Getting the Localization Requirements | |
| |
| |
Using the Globalize Plugin | |
| |
| |
Localizing with Globalize | |
| |
| |
Setting Up Globalize | |
| |
| |
Implementing the User Stories | |
| |
| |
Implementing the Change Locale User Story | |
| |
| |
Implementing the Translation User Stories | |
| |
| |
Translating the View and the Book Model | |
| |
| |
Translating the View | |
| |
| |
Translating the Model | |
| |
| |
Localizing Dates, Numbers, and Currency | |
| |
| |
Localizing Dates | |
| |
| |
Localizing Numbers and Currencies | |
| |
| |
Adding Unicode (UTF-8) Support | |
| |
| |
Setting Character Encoding in HTML | |
| |
| |
Setting Character Encoding for the HTTP Response | |
| |
| |
Changing the Database to Use UTF-8 | |
| |
| |
Summary | |
| |
| |
| |
Acceptance Testing | |
| |
| |
Using Selenium | |
| |
| |
Writing Selenium Tests | |
| |
| |
Selenium Commands | |
| |
| |
Selenium Test Formats | |
| |
| |
The First Acceptance Test | |
| |
| |
Recording Selenium Tests | |
| |
| |
Using the Selenium IDE | |
| |
| |
Recording the View Forum Acceptance Test | |
| |
| |
Recording the Post to Forum Acceptance Test | |
| |
| |
Recording the Show Post Acceptance Test | |
| |
| |
Recording the Reply to Post Acceptance Test | |
| |
| |
Summary | |
| |
| |
| |
Application Deployment | |
| |
| |
Setting Up the Production Environment | |
| |
| |
Connecting to the Production Server: SSH | |
| |
| |
Installing the Web Server: LightTPD | |
| |
| |
Installing the Application Server: Ruby on Rails and FastCGI | |
| |
| |
Installing the Database Server (MySQL) | |
| |
| |
Configuring LightTPD | |
| |
| |
Creating the Production Database | |
| |
| |
Deploying the Application Manually | |
| |
| |
Copying the Application | |
| |
| |
Creating Users and Groups | |
| |
| |
Starting LightTPD | |
| |
| |
Starting FastCGI Processes | |
| |
| |
Automating Deployment | |
| |
| |
Installing Capistrano | |
| |
| |
Creating the Capistrano Deployment Recipe | |
| |
| |
Running the Setup Task | |
| |
| |
Deploying to Production | |
| |
| |
Starting LightTPD | |
| |
| |
Summary | |
| |
| |
| |
Performance Optimization | |
| |
| |
Performance and Scaling | |
| |
| |
Measuring Performance | |
| |
| |
Checking the Log File | |
| |
| |
Using Rails Analyzer | |
| |
| |
Caching | |
| |
| |
Page Caching | |
| |
| |
Action Caching | |
| |
| |
Fragment Caching | |
| |
| |
Fragment Stores | |
| |
| |
Caching ActiveRecord Objects | |
| |
| |
Common Performance Problems in Rails | |
| |
| |
Rendering Speed | |
| |
| |
Database Access | |
| |
| |
Summary | |
| |
| |
Index | |