Synopses & Reviews
Ready to go to the next level with Rails? From examining the parts of Ruby that make this framework possible to deploying large Rails applications, Advanced Rails offers you an in-depth look at techniques for dealing with databases, security, performance, web services and much more.
Chapters in this book help you understand not only the tricks and techniques used within the Rails framework itself, but also how to make use of ideas borrowed from other programming paradigms. Advanced Rails pays particular attention to building applications that scale -- whether "scale" means handling more users, or working with a bigger and more complex database. You'll find plenty of examples and code samples that explain:
- Aspects of Ruby that are often confusing or misunderstood
- How to develop Rails plug-ins
- Different database management systems
- Advanced database features, including triggers, rules, and stored procedures
- How to connect to multiple databases
- When to use the Active Support library for generic, reusable functions
- Security principles for web application design, and security issues endemic to the Web
- When and when not to optimize performance
- Why version control and issue tracking systems are essential to any large or long-lived Rails project
also gives you a look at REST for developing web services, ways to incorporate and extend Rails, how to use internationalization, and many other topics. If you're just starting out with rails, or merely experimenting with the framework, this book is not for you. But if you want to improve your skills with Rails through advanced techniques, this book is essential.
About the Author
Brad Ediger is the CTO of Tasman Labs, a real-estate technologycompany. Together with his wife Kristen, a web designer, Brad ownsMadriska Media Group, a firm specializing in custom applicationdevelopment. When not programming, Brad enjoys playing variousmusical instruments and watching obscure films.
Table of Contents
Preface; Prerequisites; Conventions Used in This Book; Using Code Examples; How to Contact Us; Safari® Books Online; Acknowledgments; Chapter 1: Foundational Techniques; 1.1 What Is Metaprogramming?; 1.2 Ruby Foundations; 1.3 Metaprogramming Techniques; 1.4 Functional Programming; 1.5 Examples; 1.6 Further Reading; Chapter 2: ActiveSupport and RailTies; 2.1 Ruby You May Have Missed; 2.2 How to Read Code; 2.3 ActiveSupport; 2.4 Core Extensions; 2.5 RailTies; 2.6 Further Reading; Chapter 3: Rails Plugins; 3.1 About Plugins; 3.2 Writing Plugins; 3.3 Plugin Examples; 3.4 Testing Plugins; 3.5 Further Reading; Chapter 4: Database; 4.1 Database Management Systems; 4.2 Large/Binary Objects; 4.3 Advanced Database Features; 4.4 Connecting to Multiple Databases; 4.5 Caching; 4.6 Load Balancing and High Availability; 4.7 LDAP; 4.8 Further Reading; Chapter 5: Security; 5.1 Application Issues; 5.2 Web Issues; 5.3 SQL Injection; 5.4 Ruby's Environment; 5.5 Further Reading; Chapter 6: Performance; 6.1 Measurement Tools; 6.2 Rails Optimization Example; 6.3 ActiveRecord Performance; 6.4 Architectural Scalability; 6.5 Other Systems; 6.6 Further Reading; Chapter 7: REST, Resources, and Web Services; 7.1 What Is REST?; 7.2 Benefits of a RESTful Architecture; 7.3 RESTful Rails; 7.4 Case Study: Amazon S3; 7.5 Further Reading; Chapter 8: i18n and L10n; 8.1 Locale; 8.2 Character Encodings; 8.3 Unicode; 8.4 Rails and Unicode; 8.5 Rails L10n; 8.6 Further Reading; Chapter 9: Incorporating and Extending Rails; 9.1 Replacing Rails Components; 9.2 Incorporating Rails Components; 9.3 Contributing to Rails; 9.4 Further Reading; Chapter 10: Large Projects; 10.1 Version Control; 10.2 Issue Tracking; 10.3 Project Structure; 10.4 Rails Deployment; 10.5 Further Reading; Colophon;