Building Maintainable Software, Java Edition: Ten Guidelines for Future-Proof Code (Paperback)
暫譯: 構建可維護的軟體:Java 版未來可持續代碼的十項指導原則 (平裝本)

Joost Visser, Sylvan Rigal, Rob van der Leek, Pascal van Eck, Gijs Wijnholds

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

相關主題

商品描述

Have you ever felt frustrated working with someone else’s code? Difficult-to-maintain source code is a big problem in software development today, leading to costly delays and defects. Be part of the solution. With this practical book, you’ll learn 10 easy-to-follow guidelines for delivering Java software that’s easy to maintain and adapt. These guidelines have been derived from analyzing hundreds of real-world systems.

Written by consultants from the Software Improvement Group (SIG), this book provides clear and concise explanations, with advice for turning the guidelines into practice. Examples for this edition are written in Java, while our companion C# book provides workable examples in that language.

  • Write short units of code: limit the length of methods and constructors
  • Write simple units of code: limit the number of branch points per method
  • Write code once, rather than risk copying buggy code
  • Keep unit interfaces small by extracting parameters into objects
  • Separate concerns to avoid building large classes
  • Couple architecture components loosely
  • Balance the number and size of top-level components in your code
  • Keep your codebase as small as possible
  • Automate tests for your codebase
  • Write clean code, avoiding "code smells" that indicate deeper problems

商品描述(中文翻譯)

有沒有曾經因為與他人的程式碼合作而感到沮喪?難以維護的原始碼在當今軟體開發中是一個大問題,導致昂貴的延遲和缺陷。成為解決方案的一部分。透過這本實用的書籍,您將學習到10個易於遵循的指導方針,以交付易於維護和適應的Java軟體。這些指導方針是從分析數百個真實系統中得出的。

本書由軟體改進小組(Software Improvement Group, SIG)的顧問撰寫,提供清晰且簡明的解釋,並提供將指導方針付諸實踐的建議。本版的範例使用Java撰寫,而我們的C#伴隨書籍則提供該語言的可行範例。

- 撰寫短小的程式碼單元:限制方法和建構子的長度
- 撰寫簡單的程式碼單元:限制每個方法的分支點數量
- 只撰寫一次程式碼,避免複製有缺陷的程式碼
- 透過將參數提取到物件中來保持單元介面的簡潔
- 分離關注點以避免建立大型類別
- 寬鬆耦合架構元件
- 平衡程式碼中頂層元件的數量和大小
- 盡可能保持程式碼庫的小型化
- 自動化測試您的程式碼庫
- 撰寫乾淨的程式碼,避免出現顯示更深層問題的「程式碼異味」