We only need one preface this time, contents from my post, but reworded to be in a "selling" style, i.e., what does this mean to the reader.
Preface to the Fourth Edition
Largely untouched (the Acknowledgements may need to be revisited):
1 Introduction 1.1 Rails Is Agile 1.2 Finding Your Way Around 1.3 Acknowledgments
Mostly untouched. The purpose of this chapter is to foreshadow and to provide some insight as to how the pieces fit together once they are more properly introduced. As an example of something we need to update: Rack will be mentioned later (as Rails is now based on it), so it needs to be at least mentioned here, though not in any depth.
2 The Architecture of Rails Applications 2.1 Models, Views, and Controllers 2.2 Active Record: Rails Model Support 2.3 Action Pack: The View and Controller
To the following, we will need to add a section on "how to find the command line".
3 Installing Rails 3.1 Your Shopping List 3.2 Installing on Windows 3.3 Installing on Mac OS X 3.4 Installing on Linux 3.5 Choosing a Rails Version 3.6 Development Environments 3.7 Rails and Databases 3.8 Keeping Up-to-Date 3.9 Rails and ISPs
Chapter 4 will be left mostly as is.
4 Instant Gratification 4.1 Creating a New Application 4.2 Hello, Rails! 4.3 Linking Pages Together 4.4 What We Just Did
Moving the Introduction to Ruby up. Nothing will be completely struck, what you see below as strikethroughs simply means that that content will be significantly deemphasized. And, yes, this appears brutal, but the goal is to focus on what is novel and unique about Ruby. For the most part, people will pick up the rest by seeing examples. In other cases, descriptions of Ruby-specific techniques will be described on their first use.
A Introduction to RubyA.1 Ruby Is an Object-Oriented LanguageA.2 Ruby NamesA.3 MethodsA.4 ClassesA.5 ModulesA.6 Arrays and HashesA.7 Control StructuresA.8 Regular ExpressionsA.9 Blocks and IteratorsA.10 ExceptionsA.11 Marshaling ObjectsA.12 Interactive Ruby A.13 Ruby Idioms A.14 RDoc Documentation
Largely untouched.
5 The Depot Application 5.1 Incremental Development 5.2 What Depot Does 5.3 Let’s Code
Largely the same. Note that the chapter splits may need to change.
6 Task A: Product Maintenance 6.1 Iteration A1: Getting Something Running 6.2 Creating the Products Model and Maintenance Application 18 Active Record: The Basics
In lieu of a separate testing chapter, I would like to introduce the "write a test, watch it fail, fix the code, see the code pass", all done simply and matter-of-factly (i.e., without preaching testing) so as to not detract from the focus on teaching Rails (in this case, teaching Rails migrations).
6.3 Iteration A2: Adding a Missing Column 14 Task T: Testing 17 Migrations
I'm a bit concerned about the pace on this one... not much to cover in the scenario, and a lot to cover in the concepts.
6.4 Iteration A3: Validating! 20.1 Validation
Minor movement between chapters, not a big concern. Note: will use
db/seeds.rb
instead of data migration.
6.5 Iteration A4: Making Prettier Listings 7 Task B: Catalog Display 95 7.1 Iteration B1: Creating the Catalog Listing 7.2 Iteration B2: Adding a Page Layout 7.3 Iteration B3: Using a Helper to Format the Price 23 Action View (but only up to 23.4)
Another area of concern: little scenario, lots of concept.
7.4 Iteration B4: Linking to the Cart 19 Active Record: Relationships Between Tables
A good, one concept chapter. Note: will use cookie based sessions.
8 Task C: Cart Creation 8.1 Sessions 8.2 Iteration C1: Creating a Cart 8.3 Iteration C2: Creating a Smarter Cart 8.4 Iteration C3: Handling Errors 8.5 Iteration C4: Finishing the Cart 22 Action Controller and Rails
Another good, one concept chapter.
9 Task D: Add a Dash of Ajax 9.1 Iteration D1: Moving the Cart 9.2 Iteration D2: Creating an Ajax-Based Cart 9.3 Iteration D3: Highlighting Changes 9.4 Iteration D4: Hiding an Empty Cart 9.5 Iteration D5: Degrading If Javascript Is Disabled 9.6 What We Just Did 24 The Web, v2.0
Once again, easy merge.
10 Task E: Check Out! 10.1 Iteration E1: Capturing an Order 25 Action Mailer
The following will be converted to HTTP authentication
11 Task F: Administration 11.1 Iteration F1: Adding Users 11.2 Iteration F2: Logging In 11.3 Iteration F3: Limiting Access 11.4 Iteration F4: Adding a Sidebar, More Administration
This is a basically a cleanup chapter, tying up loose ends.
12 Task G: One Last Wafer-Thin Change 12.1 Generating the XML Feed 12.2 Finishing Up 21 Action Controller: Routing and URLs 23.10 Caching, Part Two
Next chapter pretty much left as is
13 Task I: Internationalization 13.1 Iteration I1: Enabling Translation 13.2 Iteration I2: Exploring Strategies for Content
Moved up, and completes the scenario.
26 Active Resources 26.1 Alternatives to Active Resource 26.2 Show Me the Code! 26.3 Relationships and Collections 26.4 Pulling It All Together
Left as a wrapup: all concepts.
15 Rails in Depth 15.1 So, Where’s Rails? 15.2 Directory Structure 15.3 Rails Configuration 15.4 Naming Conventions 15.5 Logging in Rails 15.6 Debugging Hints
Worth retaining
27 Securing Your Rails Application 27.1 SQL Injection 27.2 Creating Records Directly from Form Parameters 27.3 Don’t Trust id Parameters 27.4 Don’t Expose Controller Methods 27.5 Cross-Site Scripting (CSS/XSS) 27.6 Avoid Session Fixation Attacks 27.7 File Uploads 27.8 Don’t Store Sensitive Information in the Clear 27.9 Use SSL to Transmit Sensitive Information 27.10 Don’t Cache Authenticated Pages 27.11 Knowing That It Works
Consensus is that integrating this in the way we hope to do with testing would be too overwhelming. Might revisit this later in the cycle, but doubtful that this would be acted upon.
28 Deployment and Production 28.1 Starting Early 28.2 How a Production Server Works 28.3 Installing Passenger 28.4 Worry-Free Deployment with Capistrano 28.5 Checking Up on a Deployed Application 28.6 Production Application Chores 28.7 Moving On to Launch and Beyond
Valuable stuff not present in Rails docs and brittle (subject to change between Rails releases. Might be best to move online
B Configuration Parameters B.1 Top-Level Configuration B.2 Active Record Configuration B.3 Action Controller Configuration B.4 Action View Configuration B.5 Action Mailer Configuration B.6 Test Case Configuration
Could be retained and updated. Also could be moved entire to a pragprog wiki - insulating us from changes.
D Resources D.1 Online Resource
16 Active Support 16.1 Generally Available Extensions 16.2 Enumerations and Arrays 16.3 Hashes 16.4 String Extensions 16.5 Extensions to Numbers 16.6 Time and Date Extensions 16.7 An Extension to Ruby Symbols 16.8 with_options 16.9 Unicode Support 23.5 Forms That Wrap Model Objects 23.6 Custom Form Builders 23.7 Working with Nonmodel Fields 23.8 Uploading Files to Rails Applications 23.9 Layouts and Components 23.11 Adding New Templating Systems C Source Code C.1 The Full Depot Application