Enterprise Rails
Dan Chakقیمت نهایی
۴۹٬۰۰۰ تومان
نسخه اصلی و اورجینال
بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.
تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی
مشخصات کتاب
- نویسنده
- Dan Chak
- ناشر
- O'Reilly Media
- سال انتشار
- ۲۰۰۸
- فرمت
- زبان
- انگلیسی
- حجم فایل
- ۶٫۹ مگابایت
- شابک
- 9780596515201، 9780596554088، 0596515200، 0596554087
دربارهٔ کتاب
What does it take to develop an enterprise application with Rails? Enterprise Rails introduces several time-tested software engineering principles to prepare you for the challenge of building a high-performance, scalable website with global reach. You'll learn how to design a solid architecture that ties the many parts of an enterprise website together, including the database, your servers and clients, and other services as well. Many Rails developers think that planning for scale is unnecessary. But there's nothing worse than an application that fails because it can't handle sudden success. Throughout this book, you'll work on an example enterprise project to learn first-hand what's involved in architecting serious web applications. With this book, you Building for scale requires more work up front, but you'll have a flexible website that can be extended easily when your needs change. Enterprise Rails teaches you how to architect scalable Rails applications from the ground up. Table of Contents 7 Preface 13 The Tale of Twitter 14 Speed Versus Scalability 16 What to Expect in This Book 17 Topics 19 How This Book Is Organized 21 Who Is This Book For? 22 Conventions Used in This Book 22 Using Code Examples 23 Safari® Books Online 23 Comments and Questions 23 Acknowledgments 24 Chapter 1. The Big Picture 25 What Is Enterprise? 25 Growing Slowly 27 Understanding All the Pieces 29 Persistence Layer 29 Application Layer 32 A front-end and services 33 Web-services layer 34 Caching Layer 35 Messaging System 40 Web Server 40 Firewall 40 Chapter 2. Organizing with Plugins 43 Benefits 44 Writing Your Own Plugins 45 Core Enhancements 46 Initialization template 46 Core plugin template 46 Testing 48 Using a core plugin 49 Custom Extensions 50 Initialization template 50 Extension plugin template 50 Using a custom extension 52 Testing 53 Deployment 54 svn:externals 54 Chapter 3. Organizing with Modules 55 Files and Directories 56 Module Boundaries for Namespacing 57 ActiveRecord Associations Between Modules 58 Reciprocal Relationships 59 Modules Presage Services 60 Ensuring Proper Load Order 62 Exercises 63 Refactor Steps 63 High-Level Module Refactor 63 Detangling Utility Methods 64 Chapter 4. Database As a Fortress 65 Your Database Is an Application, Too 66 “One Framework to Rule Them All” 66 “No One in My Company Will Ever Write a Bug” 66 “This Rails Application Is the Only Application on Earth” 67 Sit Atop the Shoulders of Giants 67 Choosing the Right RDBMS 68 A Note on Migrations 68 Dispelling Myths 70 Operations and Reporting 71 Chapter 5. Building a Solid Data Model 75 Theatre Tickets 75 Starting Simple 76 Constraints 78 Mythbusting 87 Referential Integrity 88 Intro to Indexing 94 Chapter 6. Refactoring to Third Normal Form 97 Third Normal Form 97 Timing Is Key 101 Refactoring: Inheritance and Mixins 102 Exercises 106 Refactor Steps 106 Chapter 7. Domain Data 109 Dealing with Zip Codes 111 Strategy Pattern with Domain Tables 113 Refactor from Day One 117 Chapter 8. Composite Keys and Domain Key/Normal Form 119 Why Composite Natural Keys Matter 121 Spotting Composite Keys 123 Atop the Shoulders of... 125 Migrating to Domain Key/Normal Form 126 Single column keys 126 Using Composite Keys in Rails 129 Using the composite_primary_keys plugin 129 Using a DK/NF-Rails hybrid 130 Making assignment easier with method overrides 132 Deferrable Foreign Key Constraints 133 Understanding the Trade-offs 135 Efficient use of indexes 136 Ease of writing code 137 Exercises 137 Refactor Steps 137 Single Column Refactor 138 Multiple Column Refactor 139 Chapter 9. Guaranteeing Complex Relationships with Triggers 141 Constraint Checking with Triggers 141 Anatomy of a PL/pgSQL Function 145 It’s all strings 146 Local variables and assignment 146 Blocks 147 Trigger-specific features 147 Triggers: fail safe versus fail fast 147 Conditionals 148 Chapter 10. Multiple Table Inheritance 151 The Problem 151 What Is Polymorphism? 153 Inheritance and Persistence 155 Single Table Inheritance 156 Multiple Table Inheritance 157 XOR on Columns 159 Elegant MTI in Rails 161 Factory Classes 167 Exercises 168 Refactor Steps 169 Refactoring STI 169 Refactoring: polymorphic => true 169 Chapter 11. View-Backed Models 171 Database Views 172 Creating a View 173 Basing a Model on a View 173 Considerations 174 Insert, Update, Delete 175 References and Constraints 176 Indexing 177 Exercises 177 Refactor Steps 178 Chapter 12. Materialized Views 179 Materialized View Principles 180 A View to Materialize 181 Getting into Form 182 The Target Table 184 Refresh and Invalidation Functions 185 Time Dependency 187 Who Pays the Price? 189 1:1 updates 191 1:N updates 191 N:1 updates 192 Triggered Refreshes and Invalidations 192 Movie Showtimes 193 Movies 195 Theatres 196 Orders 196 Purchased tickets 197 Hiding the Implementation with the Reconciler View 198 Periodic Refreshes 201 Completing the circle 201 Cache Indexes 202 Results 203 Cascading Caches 204 Exercises 204 Chapter 13. SOA Primer 207 What Is SOA? 207 Why SOA? 210 Shared Resources 211 Synchronized tables 211 A shared database 212 A service-oriented architecture 213 Reduce Database Load 214 Slicing and dicing 215 The myth of database replication 218 Scalability II: Caching Is Tricky 220 Reduce Local Complexity 221 In Summary 224 Exercises 224 Chapter 14. SOA Considerations 225 Service Considerations 225 Implementation Details Are Hidden 226 API Is Accessible 228 API Design Best Practices 229 Send Everything You Need 229 Limit Round Trips 231 Look for Opportunities for Parallelization 233 Send as Little as Possible 234 REST Versus XML-RPC Versus SOAP 236 XML-RPC 236 SOAP 238 Chapter 15. An XML-RPC Service 241 ActionWebService and Rails 2.0 241 Creating an Abstraction Barrier 242 ActiveRecord As the Physical Model Layer 242 The Object Model Layer 244 Defining the API 249 More Testing 254 The Client Plugin 256 Shared Code 258 The Client Singleton 258 Integration Testing 260 Chapter 16. Refactoring to Services 263 An Orders Service 263 Integrating with the MoviesService 275 Other Considerations 277 MoviesService Object Model 278 Putting It All Together 289 Chapter 17. REST Primer 291 REST Basics 291 Resources and Verbs 291 Hardware Is Part of the Application 293 Mapping REST to SOA 294 Mapping to CRUD 294 Different Clients, One Interface 296 HTTP+POX 298 Defining a Service Contract 298 REST Clients in Ruby 300 The Way the Web Was Meant to Be Used 301 Chapter 18. A RESTful Web Service 303 Scoping the Problem 303 Tools 305 ROXML 305 Net::HTTP 307 MoviesWebService 308 Resources Server Implementation 309 Actions Server Implementation 312 A Client Implementation 313 wadl.rb 315 REST Describe 318 Chapter 19. Caching End to End 319 Data Layer Caching, Revisited 320 The Snapshot 320 The Refresh Function 321 Invalidation Triggers 321 Indexing 322 Logical Model Caching 322 Considerations 329 Avoiding Rebuilding with Stale Data 332 Cache Indexes 336 Other Caching 337 Query Plan Caching 337 Database Query Caching 338 Rails Query Caching 339 Fragment, Action, and Page Caching 340 Index 343 What does it take to develop an enterprise application with Rails? Enterprise Rails introduces several time-tested software engineering principles to prepare you for the challenge of building a high-performance, scalable website with global reach. You'll learn how to design a solid architecture that ties the many parts of an enterprise website together, including the database, your servers and clients, and other services as well.Many Rails developers think that planning for scale is unnecessary. But there's nothing worse than an application that fails because it can't handle sudden success. Throughout this book, you'll work on an example enterprise project to learn first-hand what's involved in architecting serious web applications.With this book, you will:Tour an ideal enterprise systems layout: how Rails fits in, and which elements don't rely on RailsLearn to structure a Rails 2.0 application for complex websitesDiscover how plugins can support reusable code and improve application clarityBuild a solid data model -- a fortress -- that protects your data from corruptionBase an ActiveRecord model on a database view, and build support for multiple table inheritanceExplore service-oriented architecture and web services with XML-RPC and RESTSee how caching can be a dependable way to improve performanceBuilding for scale requires more work up front, but you'll have a flexible website that can be extended easily when your needs change. Enterprise Rails teaches you how to architect scalable Rails applications from the ground up.'Enterprise Rails is indispensable for anyone planning to build enterprise web services. It's one thing to get your service off the ground with a framework like Rails, but quite another to construct a system that will hold up at enterprise scale. The secret is to make good architectural choices from the beginning. Chak shows you how to make those choices. Ignore his advice at your peril.'-- Hal Abelson, Prof. of Computer Science and Engineering, MIT "What does it take to develop an enterprise application with Rails? Enterprise Rails introduces you to several time-tested software engineering principles to prepare you for the challenge of building a high-performance, scalable website with global reach. Working on an example enterprise project, you'll learn how to design a solid architecture that ties the many parts of an enterprise website together, including the database, your servers and clients, and other services." "Building for scale requires more work up front, but you'll have a flexible website that can be extended easily when your needs change. Enterprise Rails teaches you how to architect scalable Rails applications from the ground up."--Jacket The Ruby on Rails web development framework has a low technical threshold to entry. Building web applications with it is relatively easy, but developing something complex is not. This book teaches new Rails developers how to design applications that scale to the enterprise level
کتابهای مشابه
Enterprise Rails
۴۹٬۰۰۰ تومان
Enterprise Rails
۴۹٬۰۰۰ تومان
Enterprise Rails
۴۹٬۰۰۰ تومان
Enterprise Recipes with Ruby and Rails
۴۹٬۰۰۰ تومان
Enterprise recipes with Ruby and Rails
۴۹٬۰۰۰ تومان
Railed by the Krampus; Railed at the Bacchanal; Railed by the Reaper; Railed by the Tooth Fairy
۴۹٬۰۰۰ تومان
Railed
۴۹٬۰۰۰ تومان
Rail
۴۹٬۰۰۰ تومان
Rails recipes : Rails 3 edition
۴۹٬۰۰۰ تومان
Rails recipes : Rails 3 edition
۴۹٬۰۰۰ تومان
Rails recipes : Rails 3 edition
۴۹٬۰۰۰ تومان
Rails recipes : Rails 3 edition
۴۹٬۰۰۰ تومان
قیمت نهایی
۴۹٬۰۰۰ تومان
