Agile Web Development with Rails 5

Similar documents
Agile Web Development with Rails 5

Agile Web Development with Rails 5.1

Distributed and Parallel Computing with Ruby

Programming Clojure. Extracted from: Second Edition. The Pragmatic Bookshelf

Java by Comparison. Extracted from: Become a Java Craftsman in 70 Examples. The Pragmatic Bookshelf

Practical Vim, Second Edition

Java By Comparison. Extracted from: Become a Java Craftsman in 70 Examples. The Pragmatic Bookshelf

Practical Programming, Third Edition

Deploying with JRuby 9k

Pragmatic Guide to Sass

Reactive Programming with RxJS

Practical Vim, Second Edition

Learn Functional Programming with Elixir

Node.js 8 the Right Way

Build Database Apps in Elixir for Scalability and Performance

Developing Android on Android

Complex Network Analysis in Python

Automate with Grunt. Extracted from: The Build Tool for JavaScript. The Pragmatic Bookshelf

Pragmatic Guide to Sass 3

Reactive Programming with RxJS 5

Modern Vim. Extracted from: Craft Your Development Environment with Vim 8 and Neovim. The Pragmatic Bookshelf

Effective Testing with RSpec 3

Build Safe and Maintainable Front-End Applications

Programming Clojure, Third Edition

Practical Programming, 2nd Edition

SQL Antipatterns. Extracted from: Avoiding the Pitfalls of Database Programming. The Pragmatic Bookshelf

Pragmatic Guide to Git

ios 9 SDK Development

Build Reactive Websites with RxJS

Node.js the Right Way

Web Design for Developers A Programmer s Guide to Design Tools and Techniques

Design It! Extracted from: From Programmer to Software Architect. The Pragmatic Bookshelf

Dart for Hipsters. Extracted from: The Pragmatic Bookshelf

Build ios Games with Sprite Kit

Copyright 2009 The Pragmatic Programmers, LLC.

Beginning Mac Programming

iphone SDK Development

Cocoa Programming A Quick-Start Guide for Developers

Docker for Rails Developers

Python Companion to Data Science

ios 8 SDK Development

Programming Google Glass, Second Edition

Complex Network Analysis in Python

Release It! Second Edition

ios 8 SDK Development

Programming Kotlin. Extracted from: Creating Elegant, Expressive, and Performant JVM and Android Applications. The Pragmatic Bookshelf

Agile Web Development With Rails (4th Edition - Rails 3 & Ruby 1.9) By Sam Ruby

Ruby on Rails. SITC Workshop Series American University of Nigeria FALL 2017

Mastering Clojure Macros

Contents. Contents... XI

Web Design for Developers A Programmer s Guide to Design Tools and Techniques

Ruby on Rails for PHP and Java Developers

The SQL Guide to Pervasive PSQL. Rick F. van der Lans

Interface-Oriented Design

Contents in Detail. Foreword by Xavier Noria

Web Application Expectations

Getting Started with Processing by Casey Reas and Ben Fry

Things You Should Know

Copyright 2006The Pragmatic Programmers, LLC.

1 CUSTOM TAG FUNDAMENTALS PREFACE... xiii. ACKNOWLEDGMENTS... xix. Using Custom Tags The JSP File 5. Defining Custom Tags The TLD 6

Florian Müller Jay Brown Jeff Potts. FOREWORDS BY Richard J. Howarth John Newton MANNING.

Are you using Ruby on Rails?

Pro ASP.NET MVC 2 Framework

Schlumberger Private Customer Use

Hello! Python. Anthony Briggs MANNING SHELTER ISLAND

leihs, the leading free equipment booking system It took us eight years to get it right. What we learned about being a FOSS project.

Essential Angular for ASP.NET Core MVC

AGILE WEB DEVELOPMENT WITH RAILS 5 BY SAM RUBY DOWNLOAD EBOOK : AGILE WEB DEVELOPMENT WITH RAILS 5 BY SAM RUBY PDF

XML Primer Plus By Nicholas Chase

LEGITIMATE APPLICATIONS OF PEER-TO-PEER NETWORKS DINESH C. VERMA IBM T. J. Watson Research Center A JOHN WILEY & SONS, INC., PUBLICATION

Real World Kanban Do Less Accomplish More With Lean Thinking

UX400. OpenUI5 Development Foundations COURSE OUTLINE. Course Version: 02 Course Duration: 5 Day(s)

CHORDS: Cloud-Hosted Real-time Data

Introduction and first application. Luigi De Russis. Rails 101

See What's Coming in Oracle CPQ Cloud

Product Slider for Magento 2. User Guide

Foundation for Cloud Computing with VMware vsphere 4

End User s Guide Release 5.0

SAS Universal Viewer 1.3

Functional Programming in Java

Inline Processing Engine User Guide. Release: August 2017 E

UPGRADE YOUR ECOMMERCE SOLUTION

Getting MEAN. with Mongo, Express, Angular, and Node SIMON HOLMES MANNING SHELTER ISLAND

Want to read more? You can buy this book at oreilly.com in print and ebook format. Buy 2 books, get the 3rd FREE!

SAS Contextual Analysis 14.3: Administrator s Guide

Agile Database Techniques Effective Strategies for the Agile Software Developer. Scott W. Ambler

The Unofficial Guide to Creating Reports In Crystal using your Pastel Data

Programming the World Wide Web by Robert W. Sebesta

Gift Card Magento Extension User Guide Official extension page: Gift Card

To configure the extension please go to System Configuration Order Attributes in the admin panel.

Table of Contents. CHAPTER 1 Introducing Amazon Web Services. In The Beginning, There Was Affiliate Marketing... 1

From Building Better Models with JMP Pro. Full book available for purchase here.

Oracle Application Express

LEGITIMATE APPLICATIONS OF PEER-TO-PEER NETWORKS

2 Webpage Markup with HTML HTML5 Page Structure Creating a Webpage HTML5 Elements and Entities

Using Joomla O'REILLY. foreword by Louis Landry. Ron Severdia and Kenneth Crowder. Taipei Tokyo. Cambridge. Beijing. Farnham Kbln Sebastopol

Sun Solaris support now available from IBM for select IBM System x and BladeCenter servers

Insbridge Enterprise Rating RateManager User Guide

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

This document is a preview generated by EVS

Transcription:

Extracted from: Agile Web Development with Rails 5 This PDF file contains pages extracted from Agile Web Development with Rails 5, published by the Pragmatic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit http://www.pragprog.com. Note: This extract contains some colored text (particularly in code listing). This is available only in online versions of the books. The printed versions are black and white. Pagination might vary between the online and printed versions; the content is otherwise identical. Copyright 2016 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. The Pragmatic Bookshelf Raleigh, North Carolina

Agile Web Development with Rails 5 Sam Ruby Dave Thomas David Heinemeier Hansson The Pragmatic Bookshelf Raleigh, North Carolina

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic books, screencasts, and audio books can help you and your team create better software and have more fun. Visit us at https://pragprog.com. The team that produced this book includes: Susannah Davidson Pfalzer (editor) Potomac Indexing, LLC (index) Eileen Cohen (copyedit) Gilson Graphics (layout) Janet Furlow (producer) For sales, volume licensing, and support, please contact support@pragprog.com. For international rights, please contact rights@pragprog.com. Copyright 2016 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-13: 978-1-68050-171-1 Encoded using the finest acid-free high-entropy binary digits. Book version: P1.0 September 2016

Contents Foreword to the Rails 5 Edition........? Preface to the Rails 5 Edition.........? Acknowledgments...........? Introduction.............? Part I Getting Started 1. Installing Rails............? Installing on Cloud9? Installing on a Virtual Machine? Installing on Windows? Installing on Mac OS X? Installing on Linux? Choosing a Rails Version? Setting Up Your Development Environment? Rails and Databases? 2. Instant Gratification...........? Creating a New Application? Hello, Rails!? Linking Pages Together? When Things Go Wrong? 3. The Architecture of Rails Applications......? Models, Views, and Controllers? Rails Model Support? Action Pack: The View and Controller? 4. Introduction to Ruby...........? Ruby Is an Object-Oriented Language?

Contents vi Data Types? Logic? Organizing Structures? Marshaling Objects? Pulling It All Together? Ruby Idioms? Part II Building an Application 5. The Depot Application..........? Incremental Development? What Depot Does? Let s Code? 6. Task A: Creating the Application........? Iteration A1: Creating the Product Maintenance Application? Iteration A2: Making Prettier Listings? 7. Task B: Validation and Unit Testing.......? Iteration B1: Validating!? Iteration B2: Unit Testing of Models? 8. Task C: Catalog Display..........? Iteration C1: Creating the Catalog Listing? Iteration C2: Adding a Page Layout? Iteration C3: Using a Helper to Format the Price? Iteration C4: Functional Testing of Controllers? Iteration C5: Caching of Partial Results? 9. Task D: Cart Creation...........? Iteration D1: Finding a Cart? Iteration D2: Connecting Products to Carts? Iteration D3: Adding a Button? 10. Task E: A Smarter Cart..........? Iteration E1: Creating a Smarter Cart? Iteration E2: Handling Errors? Iteration E3: Finishing the Cart? 11. Task F: Add a Dash of Ajax.........? Iteration F1: Moving the Cart? Iteration F2: Creating an Ajax-Based Cart?

Contents vii Iteration F3: Highlighting Changes? Iteration F4: Hiding an Empty Cart? Iteration F5: Broadcasting Updates with Action Cable? 12. Task G: Check Out!...........? Iteration G1: Capturing an Order? Iteration G2: Atom Feeds? 13. Task H: Sending Mail...........? Iteration H1: Sending Confirmation Emails? Iteration H2: Integration Testing of Applications? 14. Task I: Logging In............? Iteration I1: Adding Users? Iteration I2: Authenticating Users? Iteration I3: Limiting Access? Iteration I4: Adding a Sidebar, More Administration? 15. Task J: Internationalization.........? Iteration J1: Selecting the Locale? Iteration J2: Translating the Storefront? Iteration J3: Translating Checkout? Iteration J4: Add a Locale Switcher? 16. Task K: Deployment and Production.......? Iteration K1: Deploying with Phusion Passenger and MySQL? Iteration K2: Deploying Remotely with Capistrano? Iteration K3: Checking Up on a Deployed Application? 17. Depot Retrospective...........? Rails Concepts? Documenting What We ve Done? Part III Rails in Depth 18. Finding Your Way Around Rails........? Where Things Go? Naming Conventions? 19. Active Record.............? Defining Your Data? Locating and Traversing Records?

Contents viii Creating, Reading, Updating, and Deleting (CRUD)? Participating in the Monitoring Process? Transactions? 20. Action Dispatch and Action Controller......? Dispatching Requests to Controllers? Processing of Requests? Objects and Operations That Span Requests? 21. Action View.............? Using Templates? Generating Forms? Processing Forms? Uploading Files to Rails Applications? Using Helpers? Reducing Maintenance with Layouts and Partials? 22. Migrations.............? Creating and Running Migrations? Anatomy of a Migration? Managing Tables? Advanced Migrations? When Migrations Go Bad? Schema Manipulation Outside Migrations? 23. Nonbrowser Applications..........? A Stand-Alone Application Using Active Record? A Library Function Using Active Support? 24. Rails Dependencies...........? Generating XML with Builder? Generating HTML with ERB? Managing Dependencies with Bundler? Interfacing with the Web Server with Rack? Automating Tasks with Rake? Survey of Rails Dependencies? 25. Rails Plugins.............? Credit Card Processing with Active Merchant? Beautifying Our Markup with Haml?

Contents ix Pagination? Finding More at RailsPlugins.org? 26. Where to Go from Here..........? A1. Bibliography.............? Index...............?