Rails, Angular, Postgres, and Bootstrap.pdf

所需积分/C币:10 2016-08-09 13:43:11 8.26MB PDF
5
收藏 收藏
举报

Rails, Angular, Postgres, and Bootstrap
Early praise for rails, Angular, Postgres, and Bootstrap This book is a fantastic resource for anyone looking to gain a practical understand ing of full-stack development using contemporary, ubiquitous technologies. I was particularly impressed by how well the author was able to cover so many different software components in such a constructive and cohesive manner. As an engineer who spends most of my time at the data layer, I walked away with a ton of helpful insight into the other layers of the typical application stack ∑ Matthew oldham Director of data architecture, Graphium Health a book that deals with integrating Angular into Rails is something I've been waiting a long time for, and what's here is a definite step above existing online tutorials. Like the author, I'm used to viewing different database management systems as black boxes that are much like each other, and this book made me reconsider that line of thinking. I highly recommend this book for Rails developers who want to try Angular and make use of PostgreSgL's advanced features Nigel Lowry Company director. Lemmata Rails, Angular, Postgres, and Bootstrap is a powerful resource for all software en- gineers interested in full-stack development. No matter your proficiency at each level in the stack, you'll acquire a new technique that's immediately applicable to your project ∑ Simeon wallbanks Lead software engineer, Stitch Fix This book provides beginner developers with solid steps to get"your"application running and to be able to see/do it yourself. I recommend the book to Rails devel opers beginning their learning journey with Angular. Maricris nonato Senior Ruby on Rails developer, Premiere Speakers Bureau Rails, Angular, Postgres, and Bootstrap Powerful. Effective. and efficient Full-Stack Web Development David Bryant Copeland The Pragmatic Bookshelf Dallas, Texas. Raleigh, North Carolina Pragmatic Bookshelf 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 trade marks 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 courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titlespleasevisitusathttps://pragprog.com The team that produced this book includes F Y. Rashid (editor Potomac Indexing, LLC (index) Liz Welch(copyedit Dave Thomas〔 layout Janet Furlow (producer) Ellie Callahan(support) Forinternationalrightspleasecontactrights@pragprog.com Copyright o 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 SBN-13:978-1-68050-126-1 Encoded using the finest acid-free high-entropy binary digits Book version: P1.0-January 2016 Contents Acknowledgments IX Introduction 1. Create a Great-Looking Login with Bootstrap and Devise 1 Setting Up Devise for Authentication Installing Bootstrap with Bower 10 Styling the login and registration Forms 16 Validating registration 22 Next: USing Postgres to Make Our Login More Secure 23 2. Secure the login Database with Postgres constraints 25 Exposing the Vulnerability Devise and Rails Leave Open 25 Prevent Bad Data Using Check Constraints 26 Why Use Rails Validations? 31 Next: Using Postgres Indexes to Speed up a Fuzzy search 32 3. Use Fast queries with Advanced Postgres Indexes 33 Implementing a Basic Fuzzy Search with Rails 34 Understanding Query Performance with the Query Plan 45 Indexing Derived and Partial values 46 Next: Better-Looking Results with Bootstrap's List Group 50 4. Create Clean Search Results with Bootstrap Components 51 Creating Google-Style Search Results Without Tables 52 Paginating the results Using Bootstrap's Components 57 Next: Angular 60 5. Build a Dynamic UI with AngularJs 61 Configuring Rails and Angular 62 Porting Our Search to Angular 65 Contents·vi Changing Our Search to Use Typeahead 79 Next: Testing 81 6. Test This Fancy New Code 83 Installing rspec for Testing 84 Testing Database Constraints 87 Running Headless Acceptance Tests in PhantomS 91 Writing Unit Tests for Angular Components 103 Next: Level Up on Everything l17 7. Create a Single-Page App Using Angular's router 119 Using Angular's Router for User Navigation 121 Serving Angular Templates from the asset Pipeline 124 Adding a Second View and Controller to Our Angular App 127 Next: Design Using Grids 135 8. Design Great UIs with Bootstraps Grid and Components 137 The Grid: The Cornerstone of a Web design 138 Using Bootstrap's grid 140 Adding polish with Bootstrap Components 146 Next: Populating the view Easily and Efficiently 150 9. Cache Complex Queries Using Materialized views 151 Understanding the Performance Impact of Complex Data 152 Using Materialized Views for Better Performance 160 Keeping Materialized Views Updated 165 Next: Combining Data with a Second Source in Angular 169 10. Asynchronously Load Data from Many Sources 171 Understanding How Asynchronous Requests Work 172 Using Angular-Resource to Connect to Rails 175 Nesting Controllers to Organize Code 180 Using Bootstrap's Progress Bar When Data Is Loading 183 Passing Data Between Controllers 186 Testing Controllers That Use Angular-Resource 189 Next: Sending Changes back to the server 191 1l. Wrangle Forms and validations with Angular 193 Managing Client-Side State with Bindings 194 Validating User Input with Angular Forms 195 Styling Invalid Fields with Bootstrap 200 Saving Data back to the server 205 Contents·vi Understanding the role of rails validators 209 Next: Everything Else 211 12. Dig Deeper 213 Unlocking More of Postgres's Power 213 Leveling Up with Angular 225 Getting Everything Out of Bootstrap 234 Al. Full Listing of Customer Detail Page HTML 249 A2. Creating Customer Address Seed Data 253 Bibliography 257 Index 259 Acknowledgments I'd like to first thank my wife amy, who gave me the encouragement and space to spend time every morning writing this book I'd also like to thank my editor, Fahmida rashid, who managed to take what started as a functional requirements document for a customer service appli- cation and helped me turn it into a useful book I'd further like to thank the many people who reviewed the in-progress book, including Chris Hoffman, David McClain,J. Daniel Ashton, Jacob Chae, John Cater, Maricris Nonato, Matthew Oldham, Nell shamrell, Nigel lowry, simeon Willbanks, and Jeremy Frens (who had particular insights that I hope I've reflected well). And a huge thanks to the various readers who pointed out errors in the beta version of the book (including some rather embarrassing omissions): Andrea Bufalo riva, Bradford Baker, Brent nordquist, C. R. Myers Chris McCann, Harri Jauri, J. Daniel Ashton, Jamie Finlay, Jesus Alc, John Lyons, Michael Pope, Narongsak Jirajaruwong, Nick Clyde, Patrick Joyce Russ martin, Sernin van de Krol, stephen lloyd, and Volker Wiegand Finally, I'd like to thank the contributors to the software youre learning about in this book. The people who have given their free time to make Ruby, Rails Postgres, Angular, Bootstrap, PhantomJS, Teaspoon, Poltergeist, Devise Capybara, RSpec, Angular-UI, Database Cleaner, Bower, and all other open source software are far too numerous to list here, but without their work most developers would have a hard time doing their jobs report erratum. discuss

...展开详情
试读 127P Rails, Angular, Postgres, and Bootstrap.pdf
立即下载
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
Rails, Angular, Postgres, and Bootstrap.pdf 10积分/C币 立即下载
1/127
Rails, Angular, Postgres, and Bootstrap.pdf第1页
Rails, Angular, Postgres, and Bootstrap.pdf第2页
Rails, Angular, Postgres, and Bootstrap.pdf第3页
Rails, Angular, Postgres, and Bootstrap.pdf第4页
Rails, Angular, Postgres, and Bootstrap.pdf第5页
Rails, Angular, Postgres, and Bootstrap.pdf第6页
Rails, Angular, Postgres, and Bootstrap.pdf第7页
Rails, Angular, Postgres, and Bootstrap.pdf第8页
Rails, Angular, Postgres, and Bootstrap.pdf第9页
Rails, Angular, Postgres, and Bootstrap.pdf第10页
Rails, Angular, Postgres, and Bootstrap.pdf第11页
Rails, Angular, Postgres, and Bootstrap.pdf第12页
Rails, Angular, Postgres, and Bootstrap.pdf第13页
Rails, Angular, Postgres, and Bootstrap.pdf第14页
Rails, Angular, Postgres, and Bootstrap.pdf第15页
Rails, Angular, Postgres, and Bootstrap.pdf第16页
Rails, Angular, Postgres, and Bootstrap.pdf第17页
Rails, Angular, Postgres, and Bootstrap.pdf第18页
Rails, Angular, Postgres, and Bootstrap.pdf第19页
Rails, Angular, Postgres, and Bootstrap.pdf第20页

试读结束, 可继续阅读

10积分/C币 立即下载