دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
دسته بندی: برنامه نویسی: زبان های برنامه نویسی ویرایش: 1 نویسندگان: Chad Pytel. Tammer Saleh سری: ISBN (شابک) : 0321604814, 9780321604811 ناشر: Addison-Wesley Professional سال نشر: 2010 تعداد صفحات: 341 زبان: English فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) حجم فایل: 1 مگابایت
در صورت تبدیل فایل کتاب Rails AntiPatterns: Best Practice Ruby on Rails Refactoring (Addison-Wesley Professional Ruby Series) به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب Rails Anti Patterns: Best Practice Ruby on Rails Refactoring (سری یاقوت های حرفه ای Addison-Wesley) نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
راهنمای کامل اجتناب و رفع مشکلات کد و طراحی Common Rails 3 از آنجایی که توسعه دهندگان در سراسر جهان چارچوب وب قدرتمند Ruby on Rails را پذیرفته اند، بسیاری قربانی اشتباهات رایجی شده اند که کیفیت، عملکرد، قابلیت اطمینان، پایداری، مقیاس پذیری و نگهداری کد را کاهش می دهد. Rails™ AntiPatterns این کدهای گسترده و مشکلات طراحی Rails را شناسایی میکند، توضیح میدهد که چرا آنها بد هستند و چرا اتفاق میافتند - و دقیقاً نشان میدهد که در عوض چه باید کرد. این کتاب در فصلهای مختصر و مدولار سازماندهی شده است - هر کدام یک AntiPattern مشترک را تشریح میکنند و راهحلهای کد دقیق و به سبک کتاب آشپزی را ارائه میدهند که قبلاً یافتن آنها دشوار یا غیرممکن بود. توسعه دهندگان پیشرو Rails، Chad Pytel و Tammer Saleh نیز راهنمایی های خاصی را برای بازسازی کد یا طراحی بد موجود ارائه می دهند تا اصول شی گرا و بهترین شیوه های تثبیت شده Rails را منعکس کند. با کمک آنها، توسعه دهندگان، معماران و آزمایش کنندگان می توانند به طور چشمگیری برنامه های کاربردی جدید و موجود را بهبود بخشند، از مشکلات آینده جلوگیری کنند و استانداردهای کدگذاری Rails برتر را در سراسر سازمان خود ایجاد کنند. این کتاب به شما در درک، اجتناب و حل مشکلات مربوط به کد لایه مدل، از نقض عمومی برنامهنویسی شیگرا گرفته تا SQL پیچیده و مدلسازی دامنه بیش از حد افزونگی، از جمله مسائل طرحواره و پایگاه داده مانند نرمالسازی و سریالسازی مشاهده ابزار لایه و قراردادهای کد لایه کنترلر، کمک میکند. شامل کدهای RESTful APIهای مربوط به سرویس، از جمله مهلت زمانی، استثناها، پسزمینهسازی و کدهای پاسخ، کدهای شخص ثالث، از جمله پلاگینها و gemsTesting، از مجموعههای آزمایشی تا فرآیندهای توسعه مبتنی بر آزمایش، مقیاسبندی و استقرار مسائل پایگاه داده، از جمله مهاجرتها و اعتبارسنجیها، طراحی سیستم برای «تخریب دلپذیر» " در دنیای واقعی
The Complete Guide to Avoiding and Fixing Common Rails 3 Code and Design Problems As developers worldwide have adopted the powerful Ruby on Rails web framework, many have fallen victim to common mistakes that reduce code quality, performance, reliability, stability, scalability, and maintainability. Rails™ AntiPatterns identifies these widespread Rails code and design problems, explains why they’re bad and why they happen—and shows exactly what to do instead. The book is organized into concise, modular chapters—each outlines a single common AntiPattern and offers detailed, cookbook-style code solutions that were previously difficult or impossible to find. Leading Rails developers Chad Pytel and Tammer Saleh also offer specific guidance for refactoring existing bad code or design to reflect sound object-oriented principles and established Rails best practices. With their help, developers, architects, and testers can dramatically improve new and existing applications, avoid future problems, and establish superior Rails coding standards throughout their organizations. This book will help you understand, avoid, and solve problems with Model layer code, from general object-oriented programming violations to complex SQL and excessive redundancyDomain modeling, including schema and database issues such as normalization and serializationView layer tools and conventionsController-layer code, including RESTful codeService-related APIs, including timeouts, exceptions, backgrounding, and response codesThird-party code, including plug-ins and gemsTesting, from test suites to test-driven development processesScaling and deploymentDatabase issues, including migrations and validationsSystem design for “graceful degradation” in the real world
Contents......Page 7
Foreword......Page 11
Introduction......Page 13
Acknowledgments......Page 17
About the Authors......Page 19
1 Models......Page 21
AntiPattern: Voyeuristic Models......Page 22
Solution: Follow the Law of Demeter......Page 23
Solution: Push All find() Calls into Finders on the Model......Page 27
Solution: Keep Finders on Their Own Model......Page 30
AntiPattern: Fat Models......Page 34
Solution: Delegate Responsibility to New Classes......Page 35
Solution: Make Use of Modules......Page 41
Solution: Reduce the Size of Large Transaction Blocks......Page 44
AntiPattern: Spaghetti SQL......Page 51
Solution: Use Your Active Record Associations and Finders Effectively......Page 52
Solution: Learn and Love the Scope Method......Page 56
Solution: Use a Full-Text Search Engine......Page 62
Solution: Extract into Modules......Page 70
Solution: Write a Plugin......Page 79
Solution: Make Magic Happen with Metaprogramming......Page 84
2 Domain Modeling......Page 93
AntiPattern: Authorization Astronaut......Page 94
Solution: Simplify with Simple Flags......Page 96
Solution: Denormalize into Text Fields......Page 99
Solution: Make Use of Rails Serialization......Page 102
3 Views......Page 109
AntiPattern: PHPitis......Page 111
Solution: Learn About the View Helpers That Come with Rails......Page 112
Solution: Add Useful Accessors to Your Models......Page 118
Solution: Extract into Custom Helpers......Page 120
AntiPattern: Markup Mayhem......Page 127
Solution: Make Use of the Rails Helpers......Page 129
Solution: Use Haml......Page 131
4 Controllers......Page 137
AntiPattern: Homemade Keys......Page 138
Solution: Use Clearance......Page 139
Solution: Use Authlogic......Page 141
Solution: Use Active Record Callbacks and Setters......Page 143
Solution: Move to a Presenter......Page 162
Solution: Store References Instead of Instances......Page 174
Solution: Embrace REST......Page 181
Solution: Refactor Non-RESTful Actions into a Separate Controller......Page 187
AntiPattern: A Lost Child Controller......Page 190
Solution: Make Use of Nested Resources......Page 193
AntiPattern: Rat’s Nest Resources......Page 200
Solution: Use Separate Controllers for Each Nesting......Page 201
AntiPattern: Evil Twin Controllers......Page 204
Solution: Use Rails 3 Responders......Page 206
5 Services......Page 209
Solution: Know What Exceptions to Look Out For......Page 210
Solution: Move the Task to the Background......Page 215
AntiPattern: Pitiful Page Parsing......Page 217
Solution: Use a Gem......Page 218
AntiPattern: Successful Failure......Page 221
Solution: Obey the HTTP Codes......Page 223
Solution: Divide into Confederated Applications......Page 227
6 Using Third-Party Code......Page 231
Solution: Look for a Gem First......Page 233
Solution: Follow TAM......Page 234
Solution: Prune Irrelevant or Unused Gems......Page 236
Solution: Consider Vendored Code Sacrosanct......Page 237
7 Testing......Page 241
AntiPattern: Fixture Blues......Page 243
Solution: Make Use of Factories......Page 245
Solution: Refactor into Contexts......Page 248
AntiPattern: Lost in Isolation......Page 256
Solution: Watch Your Integration Points......Page 258
AntiPattern: Mock Suffocation......Page 260
Solution: Tell, Don’t Ask......Page 261
AntiPattern: Untested Rake......Page 266
Solution: Extract to a Class Method......Page 268
Solution: Write Normal Unit Tests Without Rails......Page 271
Solution: Load Only the Parts of Rails You Need......Page 274
Solution: Break Out the Atom Bomb......Page 279
8 Scaling and Deploying......Page 287
Solution: Build to Scale from the Start......Page 288
Solution: Make Use of the System Directory......Page 291
Solution: Add Indexes......Page 292
Solution: Reassess Your Domain Model......Page 297
Solution: Don’t Do in Ruby What You Can Do in SQL......Page 302
Solution: Move Processing into Background Jobs......Page 306
9 Databases......Page 311
Solution: Never Modify the up Method on a Committed Migration......Page 312
Solution: Never Use External Code in a Migration......Page 313
Solution: Always Provide a down Method in Migrations......Page 315
AntiPattern: Wet Validations......Page 317
Solution: Eschew Constraints in the Database......Page 318
10 Building for Failure......Page 321
Solution: Fail Fast......Page 322
AntiPattern: Inaudible Failures......Page 326
Solution: Never Fail Quietly......Page 327
A......Page 331
C......Page 332
E......Page 333
G......Page 334
K......Page 335
O......Page 336
R......Page 337
S......Page 338
T......Page 339
V......Page 340
Y......Page 341