دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: 1
نویسندگان: Vladimir Dementyev
سری:
ISBN (شابک) : 9781801813785
ناشر: Packt Publishing
سال نشر: 2023
تعداد صفحات: 298
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 14 مگابایت
در صورت تبدیل فایل کتاب Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب طراحی لایه ای برای برنامه های Ruby on Rails: الگوهای طراحی عملی برای برنامه های کاربردی وب قابل نگهداری را کشف کنید نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
Cover Title Page Copyright Dedication Contributors Table of Contents Preface Part 1: Explore Rails and Its Abstractions Chapter 1: Rails as a Web Application Framework Technical requirements The journey of a click through Rails abstraction layers From web requests to abstraction layers Rack Rails on Rack Rails routing C for controller Beyond requests – background and scheduled tasks The need for background jobs Jobs as units of work Scheduled jobs The heart of a web application – the database The trade-off between abstractions and database performance Database-level abstractions Summary Questions Exercises Further reading Chapter 2: Active Models and Records Technical requirements Active Record overview – persistence and beyond Object-relational mapping From mapping to the model From model to anything Active Model – the hidden gem behind Active Record Active Model as an interface Active Model as an Active Record satellite Active Model versus Struct – performance implications Active Model for an Active Record-like experience Seeking God objects Summary Questions Exercises Further reading Chapter 3: More Adapters, Less Implementations Technical requirements Active Job as a universal queue interface Adapterizing queues Serializing all things Active Storage and its adapters and plugins Adapters versus plugins Adapters and wrappers at your service Summary Questions Exercises Further reading Chapter 4: Rails Anti-Patterns? Technical requirements Callbacks, callbacks everywhere Callbacks under control (and in controllers) Active Record callbacks go wild Concerning Rails concerns Extracting behavior, not code Concerns are still modules, with all the shortcomings Extracting objects from objects On global and current states Current everything Summary Questions Exercises Chapter 5: When Rails Abstractions Are Not Enough Technical requirements The curse of fat/thin controllers and thin/fat models From fat controllers to fat models A fat controller example Refactoring the example controller following the thin controllers, fat models principle From fat models to services Generic services and granular abstractions Layered architecture and abstraction layers Summary Questions Part 2: Extracting Layers from Models Chapter 6: Data Layer Abstractions Technical requirements Using query objects to extract (complex) queries from models Extracting query objects Scopes versus query objects Reusable query objects and Arel Code organization with query objects versus architecture layers Separating domain and persistence with repositories Summary Questions Chapter 7: Handling User Input outside of Models Technical requirements Form objects – closer to the UI, farther from persistence UI forms versus models Using Active Model to abstract form objects Filter objects or user-driven query building Filtering in controllers Moving filtering to models Extracting filter objects Filter objects versus form objects versus query objects Summary Questions Exercise Chapter 8: Pulling Out the Representation Layer Technical requirements Using presenters to decouple models from views Leave helpers for libraries Presenters and decorators Presenters as an abstraction layer Serializers are presenters for your API From model to JSON Serializers as API presenters Summary Questions Further reading Part 3: Essential Layers for Rails Applications Chapter 9: Authorization Models and Layers Technical requirements Authorization, authentication, and friends Authentication versus authorization Lines of defense for a web application Authorization models Domain-less authorization models Classic authorization models Authorization enforcement, or the need for authorization abstractions Extracting policy objects Shaping an abstraction layer for authorization Authorization in views Performance implications of authorization The N+1 authorization problem in the representation layer The case of scoping-based authorization Summary Questions Exercise Further reading Chapter 10: Crafting the Notifications Layer Technical requirements From Action Mailer to multiple notification channels Action Mailer in action Mailers in the layered architecture Not only emails or adding more notification channels Extracting notifications layer Ad hoc abstraction Using third-party libraries to manage notifications Modeling user notification preferences Bit fields and value objects Notification preferences store A separate table for storing preferences Summary Questions Exercises Chapter 11: Better Abstractions for HTML Views Technical requirements The V in Rails’ MVC: templates and helpers UI without a programming interface Reusability and design systems Thinking in components Turning partials and helpers into components View components as an abstraction layer View components for mixed teams Summary Questions Further reading Chapter 12: Configuration as a First-Class Application Citizen Technical requirements Configuration sources and types Files, secrets, credentials, and more Settings and secrets Production, development, and local configurations versus data providers Using domain objects to tame configuration complexity Separating application code from configuration sources Using specialized configuration classes Summary Questions Exercises Chapter 13: Cross-Layers and Off-Layers Technical requirements The Rails infrastructure layer and its diversity Infrastructure abstractions and implementations Across the layers – logging and monitoring Logging Exception tracking Instrumentation Extracting implementations into services Separating WebSockets from Action Cable with AnyCable Processing images on the fly and off Rails Summary Questions Index Gems and Patterns About Packt Other Books You May Enjoy