Rails, Angular, Postgres, and Bootstrap

Book description

As a Rails developer, you care about user experience and performance, but you also want simple and maintainable code. Achieve all that by embracing the full stack of web development, from styling with Bootstrap, building an interactive user interface with AngularJS, to storing data quickly and reliably in PostgreSQL. Take a holistic view of full-stack development to create usable, high-performing applications, and learn to use these technologies effectively in a Ruby on Rails environment.

Publisher resources

View/Submit Errata

Table of contents

  1.  Acknowledgments
  2.  Introduction
    1. The Application Stack
    2. Postgres, Angular, and Bootstrap—At the Same Time
    3. How to Read This Book
    4. What You Need to Know
    5. Getting Set Up
  3. 1. Create a Great-Looking Login with Bootstrap and Devise
    1. Setting Up Devise for Authentication
    2. Installing Bootstrap with Bower
    3. Styling the Login and Registration Forms
    4. Validating Registration
    5. Next: Using Postgres to Make Our Login More Secure
  4. 2. Secure the Login Database with Postgres Constraints
    1. Exposing the Vulnerability Devise and Rails Leave Open
    2. Prevent Bad Data Using Check Constraints
    3. Why Use Rails Validations?
    4. Next: Using Postgres Indexes to Speed Up a Fuzzy Search
  5. 3. Use Fast Queries with Advanced Postgres Indexes
    1. Implementing a Basic Fuzzy Search with Rails
    2. Understanding Query Performance with the Query Plan
    3. Indexing Derived and Partial Values
    4. Next: Better-Looking Results with Bootstrap’s List Group
  6. 4. Create Clean Search Results with Bootstrap Components
    1. Creating Google-Style Search Results Without Tables
    2. Paginating the Results Using Bootstrap’s Components
    3. Next: Angular!
  7. 5. Build a Dynamic UI with AngularJS
    1. Configuring Rails and Angular
    2. Porting Our Search to Angular
    3. Changing Our Search to Use Typeahead
    4. Next: Testing
  8. 6. Test This Fancy New Code
    1. Installing RSpec for Testing
    2. Testing Database Constraints
    3. Running Headless Acceptance Tests in PhantomJS
    4. Writing Unit Tests for Angular Components
    5. Next: Level Up on Everything
  9. 7. Create a Single-Page App Using Angular’s Router
    1. Using Angular’s Router for User Navigation
    2. Serving Angular Templates from the Asset Pipeline
    3. Adding a Second View and Controller to Our Angular App
    4. Next: Design Using Grids
  10. 8. Design Great UIs with Bootstrap’s Grid and Components
    1. The Grid: The Cornerstone of a Web Design
    2. Using Bootstrap’s Grid
    3. Adding Polish with Bootstrap Components
    4. Next: Populating the View Easily and Efficiently
  11. 9. Cache Complex Queries Using Materialized Views
    1. Understanding the Performance Impact of Complex Data
    2. Using Materialized Views for Better Performance
    3. Keeping Materialized Views Updated
    4. Next: Combining Data with a Second Source in Angular
  12. 10. Asynchronously Load Data from Many Sources
    1. Understanding How Asynchronous Requests Work
    2. Using Angular-Resource to Connect to Rails
    3. Nesting Controllers to Organize Code
    4. Using Bootstrap’s Progress Bar When Data Is Loading
    5. Passing Data Between Controllers
    6. Testing Controllers That Use Angular-Resource
    7. Next: Sending Changes Back to the Server
  13. 11. Wrangle Forms andValidations with Angular
    1. Managing Client-Side State with Bindings
    2. Validating User Input with Angular Forms
    3. Styling Invalid Fields with Bootstrap
    4. Saving Data Back to the Server
    5. Understanding the Role of Rails Validators
    6. Next: Everything Else
  14. 12. Dig Deeper
    1. Unlocking More of Postgres’s Power
    2. Leveling Up with Angular
    3. Getting Everything Out of Bootstrap
  15. A1. Full Listing of Customer Detail Page HTML
  16. A2. Creating Customer Address Seed Data
  17.  Bibliography

Product information

  • Title: Rails, Angular, Postgres, and Bootstrap
  • Author(s): David B. Copeland
  • Release date: January 2016
  • Publisher(s): Pragmatic Bookshelf
  • ISBN: 9781680501261