Refactoring in Ruby (Paperback)

William C. Wake, Kevin Rutherford

  • 出版商: Addison Wesley
  • 出版日期: 2009-10-25
  • 售價: $1,575
  • 貴賓價: 9.5$1,496
  • 語言: 英文
  • 頁數: 288
  • 裝訂: Paperback
  • ISBN: 0321545044
  • ISBN-13: 9780321545046
  • 相關分類: RubyRefactoring
  • 立即出貨

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

相關主題

商品描述

The First Hands-On, Practical, All-Ruby Refactoring Workbook!

 

Refactoring–the art of improving the design of existing code–has taken the world by storm. So has Ruby. Now, for the first time, there’s a refactoring workbook designed from the ground up for the dynamic Ruby language.

 

Refactoring in Ruby gives you all the realistic, hands-on practice you need to refactor Ruby code quickly and effectively. You’ll discover how to recognize “code smells,” which signal opportunities for improvement, and then perfect your program’s design one small, safe step at a time.

 

The book shows you when and how to refactor with both legacy code and during new test-driven development, and walks you through real-world refactoring in detail. The workbook concludes with several applications designed to help practice refactoring in realistic domains, plus a handy code review checklist you’ll refer to again and again. Along the way, you’ll learn powerful lessons about designing higher quality Ruby software–lessons that will enable you to experience the joy of writing consistently great code.

 

Refactoring in Ruby will help you

  • Recognize why poor code design occurs, so you can prevent it from occurring in your own code
  • Master better design techniques that lead to more efficient, reliable, and maintainable software
  • Fix code that’s too long, large, or difficult to follow
  • Ferret out duplication, and express each idea “once and only once”
  • Recognize missing or inadequately formed classes
  • Simplify overly complex relationships between classes and their subclasses
  • Achieve the right balance of responsibilities among objects
  • Make your code easier to test and change
  • Cope with incomplete library modules, and fix runaway dependencies
  • Learn the next steps to take after you refactor

商品描述(中文翻譯)

這是一本首部實用的、全面以Ruby為基礎的重構工作手冊!重構——改善現有程式碼設計的藝術——已經風靡全球。Ruby也是如此。現在,首次有一本從頭到尾專為動態Ruby語言設計的重構工作手冊問世。

《Ruby重構》提供了所有實際、實用的練習,讓您能夠快速有效地重構Ruby程式碼。您將學會如何辨識「程式碼異味」,這些異味表明了改進的機會,然後一步一步地完善程式的設計,安全又小心。

本書將向您展示如何在舊有程式碼和新的測試驅動開發過程中進行重構,並詳細介紹了實際的重構案例。書末還提供了幾個應用程式,旨在幫助您在實際領域中練習重構,以及一份實用的程式碼審查檢查表,供您反覆參考。在此過程中,您將學到有關設計高品質Ruby軟體的重要課程,這些課程將使您能夠享受撰寫一致優秀程式碼的樂趣。

《Ruby重構》將幫助您:
- 辨識為何會出現糟糕的程式碼設計,以便在自己的程式碼中避免這種情況
- 掌握更好的設計技巧,以實現更高效、可靠和易於維護的軟體
- 修復過長、過大或難以理解的程式碼
- 消除重複,並將每個想法「只表達一次」
- 辨識缺失或不完整的類別
- 簡化類別及其子類別之間過於複雜的關係
- 在物件之間實現適當的責任平衡
- 使程式碼更易於測試和修改
- 處理不完整的程式庫模組,並修復失控的相依性
- 學習重構後的下一步驟