Agile Web Development with Rails 4 / Edition 1

Agile Web Development with Rails 4 / Edition 1

ISBN-10:
1937785564
ISBN-13:
9781937785567
Pub. Date:
10/12/2013
Publisher:
Pragmatic Bookshelf
ISBN-10:
1937785564
ISBN-13:
9781937785567
Pub. Date:
10/12/2013
Publisher:
Pragmatic Bookshelf
Agile Web Development with Rails 4 / Edition 1

Agile Web Development with Rails 4 / Edition 1

Paperback

$43.95
Current price is , Original price is $43.95. You
$43.95 
  • SHIP THIS ITEM
    In stock. Ships in 1-2 days.
  • PICK UP IN STORE

    Your local store may have stock of this item.

  • SHIP THIS ITEM

    Temporarily Out of Stock Online

    Please check back later for updated availability.


Overview

Rails just keeps on changing. Both Rails 3 and 4, as well as Ruby 1.9 and 2.0, bring hundreds of improvements, including new APIs and substantial performance enhancements. The fourth edition of this award-winning classic has been reorganized and refocused so it's more useful than ever before for developers new to Ruby and Rails.

Rails 4 introduces a number of user-facing changes, and the ebook has been updated to match all the latest changes and new best practices in Rails. This includes full support for Ruby 2.0, controller concerns, Russian Doll caching, strong parameters, Turbolinks, new test and bin directory layouts, and much more.

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly. You concentrate on creating the application, and Rails takes care of the details.

Tens of thousands of developers have used this award-winning book to learn Rails. It's a broad, far-reaching tutorial and reference that's recommended by the Rails core team. If you're new to Rails, you'll get step-by-step guidance. If you're an experienced developer, this book will give you the comprehensive, insider information you need.

Rails has evolved over the years, and this book has evolved along with it. We still start with a step-by-step walkthrough of building a real application, and in-depth chapters look at the built-in Rails features. This edition now gives new Ruby and Rails users more information on the Ruby language and takes more time to explain key concepts throughout. Best practices on how to apply Rails continue to change, and this edition keeps up. Examples use Concerns, Russian Doll caching, and Turbolinks, and the book focuses throughout on the right way to use Rails. Additionally, this edition now works on Ruby 2.0, a new release of Ruby with substantial functional and performance improvements.

This edition is for Rails4.0 and beyond.

Product Details

ISBN-13: 9781937785567
Publisher: Pragmatic Bookshelf
Publication date: 10/12/2013
Edition description: Fourth Edition
Pages: 458
Product dimensions: 7.40(w) x 9.00(h) x 1.00(d)

About the Author

Sam Ruby is a prominent software developer who is a co-chair of the W3C HTML Working Group and has made significant contributions to many of the Apache Software Foundation's open source software projects. He is a Senior Technical Staff Member in the Emerging Technologies Group of IBM.

Dave Thomas, as one of the authors of the Agile Manifesto, understands agility. As the author of "Programming Ruby," he understands Ruby. And, as an active Rails developer, he knows Rails.

David Heinemeier Hansson is the creator of the Rails framework.

Table of Contents

Acknowledgments ix

Introduction xi

Part I Getting Started

1 Installing Rails 3

1.1 Installing on Windows 4

1.2 Installing on Mac OS X 4

1.3 Installing on Linux 6

1.4 Choosing a Rails Version 8

1.5 Setting Up Your Development Environment 9

1.6 Rails and Databases 12

2 Instant Gratification 15

2.1 Creating a New Application 15

2.2 Hello, Rails! 17

2.3 Linking Pages Together 24

3 The Architecture of Rails Applications 29

3.1 Models, Views, and Controllers 29

3.2 Rails Model Support 32

3.3 Action Pack: The View and Controller 34

4 Introduction to Ruby 37

4.1 Ruby Is an Object-Oriented Language 37

4.2 Data Types 39

4.3 Logic 43

4.4 Organizing Structures 45

4.5 Marshaling Objects 48

4.6 Pulling It All Together 49

4.7 Ruby Idioms 50

Part II Building an Application

5 The Depot Application 55

5.1 Incremental Development 55

5.2 What Depot Does 56

5.3 Lets Code 60

6 Task A: Creating the Application 61

6.1 Iteration A1: Creating the Products Maintenance Application 61

6.2 Iteration A2: Making Prettier Listings 68

7 Task B: Validation and Unit Testing 77

7.1 Iteration B1: Validating! 77

7.2 Iteration B2: Unit Testing of Models 82

8 Task C: Catalog Display 91

8.1 Iteration C1: Creating the Catalog Listing 91

8.2 Iteration C2: Adding a Page Layout 96

8.3 Iteration C3: Using a Helper to Format the Price 100

8.4 Iteration C4: Functional Testing of Controllers 101

8.5 Iteration C5: Caching of Partial Results 104

9 Task D: Cart Creation 107

9.1 Iteration D1: Finding a Cart 107

9.2 Iteration D2: Connecting Products to Carts 108

9.3 Iteration D3: Adding a Button 110

10 Task E: A Smarter Cart 119

10.1 Iteration E1: Creating a Smarter Cart 119

10.2 Iteration E2: Handling Errors 124

10.3 Iteration E3: Finishing the Cart 128

11 Task F: Add a Dash of Ajax 135

11.1 Iteration F1: Moving the Cart 136

11.2 Iteration F2: Creating an Ajax-Based Cart 142

11.3 Iteration F3: Highlighting Changes 146

11.4 Iteration F4: Hiding an Empty Cart 149

11.5 Iteration F5: Making Images Clickable 152

11.6 Testing Ajax Changes 154

12 Task G: Check Out! 159

12.1 Iteration G1: Capturing an Order 159

12.2 Iteration G2: Atom Feeds 172

13 Task H: Sending Mall 177

13.1 Iteration H1: Sending Confirmation Emails 177

13.2 Iteration H2: Integration Testing of Applications 184

14 Task I: Logging In 191

14.1 Iteration I1: Adding Users 191

14.2 Iteration I2: Authenticating Users 197

14.3 Iteration I3: Limiting Access 202

14.4 Iteration I4: Adding a Sidebar, More Administration 204

15 Task J: Internationalization 211

15.1 Iteration J1: Selecting the Locale 211

15.2 Iteration J2: Translating the Storefront 215

15.3 Iteration J3: Translating Checkout 222

15.4 Iteration J4: Add a Locale Switcher 229

16 Task K: Deployment and Production 233

16.1 Iteration K1: Deploying with Phusion Passenger and MySQL 234

16.2 Iteration K2: Deploying Remotely with Capistrano 242

16.3 Iteration K3: Checking Up on a Deployed Application 248

17 Depot Retrospective 253

17.1 Rails Concepts 253

17.2 Documenting What We Have Done 256

Part III Rails in Depth

18 Finding Your Way Around Rails 261

18.1 Where Things Go 261

18.2 Naming Conventions 270

19 Active Record 275

19.1 Defining Your Data 275

19.2 Locating and Traversing Records 280

19.3 Creating. Reading. Updating, and Deleting (CRUD) 284

19.4 Participating in the Monitoring Process 298

19.5 Transactions 304

20 Action Dispatch and Action Controller 309

20.1 Dispatching Requests to Controllers 309

20.2 Processing of Requests 319

20.3 Objects and Operations That Span Requests 330

21 Action View 341

21.1 Using Templates 341

21.2 Generating Forms 343

21.3 Processing Forms 346

21.4 Uploading Files to Rails Applications 348

21.5 Using Helpers 351

21.6 Reducing Maintenance with Layouts and Partials 358

22 Migrations 367

22.1 Creating and Running Migrations 367

22.2 Anatomy of a Migration 370

22.3 Managing Tables 375

22.4 Advanced Migrations 379

22.5 When Migrations Go Bad 382

22.6 Schema Manipulation Outside Migrations 383

23 Nonbrowser Applications 385

23.1 A Stand-Alone Application Using Active Record 385

23.2 A Library Function Using Active Support 386

24 Rails' Dependencies 393

24.1 Generating XML with Builder 393

24.2 Generating HTML with ERB 395

24.3 Managing Dependencies with Bundler 397

24.4 Interfacing with the Web Server with Rack 400

24.5 Automating Tasks with Rake 404

24.6 Survey of Rails' Dependencies 405

25 Rails Plugins 411

25.1 Credit Card Processing with Active Merchant 411

25.2 Beautifying Our Markup with Haml 413

25.3 Pagination 416

25.4 FindingMoreatRailsPlugins.org 418

26 Where to Go from Here 421

A1 Bibliography 423

Index 425

From the B&N Reads Blog

Customer Reviews