Polished Ruby Programming: Build better software with more intuitive, maintainable, scalable, and high-performance Ruby code

Evans, Jeremy

  • 出版商: Packt Publishing
  • 出版日期: 2021-07-16
  • 售價: $1,980
  • 貴賓價: 9.5$1,881
  • 語言: 英文
  • 頁數: 434
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1801072728
  • ISBN-13: 9781801072724
  • 相關分類: RubyJVM 語言
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Become an accomplished Ruby programmer by understanding the design principles, best practices, and trade-offs involved in implementation approaches to keep your Ruby applications maintainable in the long term


Key Features:

  • Understand the design principles behind polished Ruby code and trade-offs between implementation approaches
  • Use metaprogramming and DSLs to reduce the amount of code needed without decreasing maintainability
  • Learn Ruby web application design principles and strategies for databases, security, and testing


Book Description:

Most successful Ruby applications become difficult to maintain over time as the codebase grows in size. Polished Ruby Programming provides you with recommendations and advice for designing Ruby programs that are easy to maintain in the long term.


This book takes you through implementation approaches for many common programming situations, the trade-offs inherent in each approach, and why you may choose to use different approaches in different situations. You'll start by learning fundamental Ruby programming principles, such as correctly using core classes, class and method design, variable usage, error handling, and code formatting. Moving on, you'll learn higher-level programming principles, such as library design, use of metaprogramming and domain-specific languages, and refactoring. Finally, you'll learn principles specific to web application development, such as how to choose a database and web framework, and how to use advanced security features.


By the end of this Ruby programming book, you'll have gained the skills you need to design robust, high-performance, scalable, and maintainable Ruby applications.


While most code examples and principles discussed in the book apply to all Ruby versions, some examples and principles are specific to Ruby 3.0, the latest release at the time of publication.


What You Will Learn:

  • Use Ruby's core classes and design custom classes effectively
  • Explore the principles behind variable usage and method argument choice
  • Implement advanced error handling approaches such as exponential backoff
  • Design extensible libraries and plugin systems in Ruby
  • Use metaprogramming and DSLs to avoid code redundancy
  • Implement different approaches to testing and understand their trade-offs
  • Discover design patterns, refactoring, and optimization with Ruby
  • Explore database design principles and advanced web app security


Who this book is for:

If you already know how to program in Ruby and want to learn more about the principles and best practices behind writing maintainable, scalable, optimized, and well-structured Ruby code, then this Ruby book is for you. Intermediate to advanced-level working knowledge of the Ruby programming language is expected to get the most out of this book.

商品描述(中文翻譯)

成為一位傑出的 Ruby 程式設計師,了解設計原則、最佳實踐和在實作方法中所涉及的權衡,以確保您的 Ruby 應用程式在長期維護中保持可維護性。

主要特點:
- 了解精緻的 Ruby 程式碼背後的設計原則和不同實作方法之間的權衡
- 使用元程式設計和領域特定語言(DSL)減少所需的程式碼量,同時不降低可維護性
- 學習 Ruby 網頁應用程式的設計原則,以及資料庫、安全性和測試策略

書籍描述:
隨著程式碼庫的增長,大多數成功的 Ruby 應用程式隨著時間的推移變得難以維護。《精緻的 Ruby 程式設計》為您提供了設計長期易於維護的 Ruby 程式的建議和建議。

本書將帶您了解許多常見程式設計情境的實作方法、每種方法所固有的權衡,以及為什麼您可能會選擇在不同情況下使用不同方法。您將首先學習基本的 Ruby 程式設計原則,例如正確使用核心類別、類別和方法設計、變數使用、錯誤處理和程式碼格式化。接著,您將學習更高層次的程式設計原則,例如庫設計、元程式設計和領域特定語言的使用,以及重構。最後,您將學習特定於網頁應用程式開發的原則,例如如何選擇資料庫和網頁框架,以及如何使用高級安全功能。

通過閱讀本書,您將獲得設計堅固、高效、可擴展和易於維護的 Ruby 應用程式所需的技能。

儘管本書中的大多數程式碼示例和原則適用於所有 Ruby 版本,但部分示例和原則僅適用於 Ruby 3.0,即出版時的最新版本。

您將學到什麼:
- 有效使用 Ruby 的核心類別並設計自訂類別
- 探索變數使用和方法參數選擇背後的原則
- 實現高級錯誤處理方法,如指數退避
- 在 Ruby 中設計可擴展的庫和插件系統
- 使用元程式設計和領域特定語言避免程式碼冗余
- 實現不同的測試方法並了解其權衡
- 探索設計模式、重構和優化 Ruby 程式
- 探索資料庫設計原則和高級網頁應用程式安全性

本書適合對 Ruby 程式語言已有中級到高級程度的工作知識,並希望了解撰寫易於維護、可擴展、優化和良好結構化 Ruby 程式的原則和最佳實踐的讀者。