Refactoring: Ruby Edition: Ruby Edition (Addison-Wesley Professional Ruby Series) (重構:Ruby 版 (Addison-Wesley 專業 Ruby 系列))

Jay Fields, Shane Harvie, Martin Fowler, Kent Beck

  • 出版商: Addison Wesley
  • 出版日期: 2009-10-15
  • 售價: $2,040
  • 貴賓價: 9.5$1,938
  • 語言: 英文
  • 頁數: 480
  • 裝訂: Paperback
  • ISBN: 0321984137
  • ISBN-13: 9780321984135
  • 相關分類: RubyRefactoring
  • 立即出貨 (庫存 < 3)

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

相關主題

商品描述

The Definitive Refactoring Guide, Fully Revamped for Ruby

 

With refactoring, programmers can transform even the most chaotic software into well-designed systems that are far easier to evolve and maintain. What’s more, they can do it one step at a time, through a series of simple, proven steps. Now, there’s an authoritative and extensively updated version of Martin Fowler’s classic refactoring book that utilizes Ruby examples and idioms throughout–not code adapted from Java or any other environment.

 

The authors introduce a detailed catalog of more than 70 proven Ruby refactorings, with specific guidance on when to apply each of them, step-by-step instructions for using them, and example code illustrating how they work. Many of the authors’ refactorings use powerful Ruby-specific features, and all code samples are available for download.

 

Leveraging Fowler’s original concepts, the authors show how to perform refactoring in a controlled, efficient, incremental manner, so you methodically improve your code’s structure without introducing new bugs. Whatever your role in writing or maintaining Ruby code, this book will be an indispensable resource.

 

This book will help you

•    Understand the core principles of refactoring and the reasons for doing it

•    Recognize “bad smells” in your Ruby code

•    Rework bad designs into well-designed code, one step at a time

•    Build tests to make sure your refactorings work properly

•    Understand the challenges of refactoring and how they can be overcome

•    Compose methods to package code properly

•    Move features between objects to place responsibilities where they fit best

•    Organize data to make it easier to work with

•    Simplify conditional expressions and make more effective use of polymorphism

•    Create interfaces that are easier to understand and use

•    Generalize more effectively

•    Perform larger refactorings that transform entire software systems and may take months or years

•    Successfully refactor Ruby on Rails code

商品描述(中文翻譯)

《Ruby重構指南:全新改版》

透過重構,程式設計師可以將混亂的軟體轉變為設計良好、更易於演進和維護的系統。更重要的是,他們可以透過一系列簡單而有效的步驟逐步實現這一目標。現在,Martin Fowler的經典重構書籍已經經過權威且全面的更新,其中使用了Ruby的範例和慣用語法,而非從Java或其他環境中改編的程式碼。

作者們介紹了一個詳盡的目錄,包含超過70種經過驗證的Ruby重構方法,並提供了何時應用每種重構方法的具體指導,以及使用它們的逐步說明和示例程式碼。許多作者的重構方法使用了強大的Ruby特定功能,而且所有程式碼範例都可以下載。

在借鑒Fowler的原始概念的基礎上,作者們展示了如何以受控、高效、增量的方式進行重構,從而有系統地改善程式碼結構,而不引入新的錯誤。無論你在編寫或維護Ruby程式碼中扮演什麼角色,這本書都將是一個不可或缺的資源。

這本書將幫助你:

• 理解重構的核心原則和進行重構的原因
• 辨識你的Ruby程式碼中的「壞味道」
• 逐步將壞設計轉變為設計良好的程式碼
• 建立測試以確保你的重構正常運作
• 理解重構的挑戰以及如何克服它們
• 組合方法以適當地封裝程式碼
• 在物件之間移動功能,將責任放在最合適的地方
• 組織資料以便更容易處理
• 簡化條件表達式並更有效地使用多型
• 創建更易於理解和使用的介面
• 更有效地進行泛化
• 進行更大範圍的重構,轉變整個軟體系統,可能需要數月或數年的時間
• 成功地重構Ruby on Rails程式碼