《軟體預構藝術》是2010年06月東南大學出版社出版的書籍,作者是Ken Pugh。本書運用眾多開發人員的豐富經驗,展示推衍而得的各項實踐方針。
基本介紹
- 中文名:軟體預構藝術
- 作者:Ken Pugh
- 出版時間:2006年5月1日
- 出版社:東南大學出版社
- 頁數:220 頁
- ISBN:9787564103651, 7564103655
- 開本:16 開
- 裝幀:平裝
- 版次:1
- 條形碼:9787564103651
- 尺寸:23.3 x 17.9 x 1.1 cm
- 重量:381 g
作者簡介,內容簡介,目錄,
作者簡介
Ken Pugh是Puge-Killen協會主席之一。Ken擔任顧問、從事教育培訓、擔任教師以及出庭提供證詞,涉足的科技領域有面向對象設計、Linux/unix、網路以及系統開發實踐。他參與過的項目包括山羊血清流程控制、擔保抵押處理軟體以及攝影分級。Ken時常在全國會議和區域會議發表演講,從倫敦到悉尼都有他的客戶。不工作時,他喜歡滑雪、衝浪、騎腳踏車以及到阿帕拉契山徑徒步旅行。
內容簡介
利用經驗累積而得的洞察力開發新的解決方案被稱為預構。透過重構而獲得的專業知識也屬於這類經驗,而預構的詞源即重構。重構是修改程式或軟體系統內部結構的實踐,以此在保留其現有行為的基礎上改良設計。重構的原因有多種:方便後期增加功能、提高可維護性、提升性能。
本書作者是經驗老道的軟體開發人員。這些方針把優秀的開發人員在設計時隱而未顯的考慮細節如實地呈現出來。許多方針都圍繞著極致抽象化、極致隔離以及極致可讀性這幾個概念。在假想的軟體項目和實際項目的介紹中,作者把實踐方針呈現在讀者面前。其中幾條於稍後列出。
把作者的方針套用到你的軟體項目,有助於寫出可讀性、可維護性更棒的程式。這些方針可以協助你前期決策,以減少後期重構的工作量。在這樣的前提下,你可以預測未來,減少修改。簡言之,就是程式預構會使你更有效率。
目錄
PREFACE
1 INTRODUCTION TO PREFACTORING
What Is Prefactoring?
The Three Extremes
The Guidelines Explored
The Context for This Book
2 THE SYSTEM IN SO MANY WORDS
Meet Sam
Reinvention Avoidance
What's in a Name?
Splitters Versus Lumpers
Clumping
Abstracting
Prototypes Are Worth a Thousand Words
3 GENERAL DEVELOPMENT ISSUES
Start with the Big Picture
Interface Contracts
Validation
Code Communicates
Consistency Is Simplicity
A Prefactoring Attitude
Don't Repeat Yourself
Documentation of Assumptions and Decisions
Dealing with Deuiations and Errors
Speeding
The Spreadsheet Conundrum
Tools Are Tools--Use Them Wisely
4 GETTING THE BIG PICTURE
The Rest of the Story
Process
The Initial Design
Global Planning, Local Designing
Testing Functionality
Testing quality
Security
5 GOT CLASS ?
Categories and Classes
Declaration Versus Execution
Appropriate Inheritance
Communicate withext
More Than One
6 A FEW WORDS ON CLASSES
Honor the Class Maxims
Three Laws of Objects
Need Determines Class
Polymorphism
One Little.lob
Policy Versus Implementation
Extreme Naming
Overloading Functions
7 GETTING THERE
Where We Are
Separating Concerns
Migrating to the New System
8 THE FIRSTRELEASE
The Proof Is in the Puddin.~
Relrospective Time
The System as It Stands Now
Operations Interface
Abstract Data Types
Configuration
Testing
Dealing with Deuiations and Errors
A Little Prefactofing
The First Released Iteration
Sometimes Practice Does Not Match Theory
The Rest of the Classes
9 ASSOCIATIONS AND STATES
Sam's Neuw Requirement
Who's in Charge?
The State of an Object
10 INTERFACES AND ADAPTATION
The Catalog Search Use Case
Designinn the Interface
Interface Development
Interface Testing
Interface Splitting
Something Worlking
11 ZIP CODES AND INTERFACES
Adaptation
Pass the Buck
Unwritten Code
Indirection
Logging
Paradigm Mismatch
12 MORE REPORTS
Fancy Reports
Change Happens
Exports
13 INVOICES, CREDIT CARDS, AND DISCOUNTS
The Next Step
The Language of the Client
Security and Priuacy
14 SAM IS EXPANDING
The Second Store
A New Development
The Third Store
Goodbye Sam
Generality
15 A PRINTSERVER EXAMPLE
Introduction
The System
The Message
Testing
Logging
Still More Separation
Epilogue
16 ANTISPAM EXAMPLE
The Context
Spare Checking
The ReceivingMailServer
ReceivedMailExaminer
The Full Flow
17 EPILOGUE
A GUIDELINES AND PRINCIPLES
B SOURCE CODE
INDEX