Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries
暫譯: 框架設計指南:可重用 .NET 函式庫的約定、慣用法與模式
Krzysztof Cwalina, Brad Abrams
- 出版商: Addison Wesley
- 出版日期: 2005-09-29
- 售價: $2,050
- 貴賓價: 9.5 折 $1,948
- 語言: 英文
- 頁數: 384
- 裝訂: Hardcover
- ISBN: 0321246756
- ISBN-13: 9780321246752
-
相關分類:
.NET
已過版
買這商品的人也買了...
-
$680$537 -
$980$774 -
$680$537 -
$890$703 -
$650$507 -
$680$646 -
$580$458 -
$350$277 -
$490$382 -
$880$695 -
$750$585 -
$580$458 -
$650$514 -
$390$308 -
$580$458 -
$650$507 -
$890$757 -
$580$458 -
$780$663 -
$680$537 -
$580$458 -
$650$507 -
$720$569 -
$880$695 -
$600$480
商品描述
Table of Contents:
Figures.
Acknowledgments.
About the Authors.
Tables.
Foreword.
Preface.
1. Introduction.
Qualities of a Well-Designed Framework
Well-Designed Frameworks Are Simple
Well-Designed Frameworks Are Expensive to Design
Well-Designed Frameworks Are Full of Trade-Offs
Well-Designed Frameworks Borrow from the Past
Well-Designed Frameworks Are Designed to Evolve
Well-Designed Frameworks Are Integrated
Well-Designed Frameworks Are Consistent
2. Framework Design Fundamentals.
Progressive Frameworks
Fundamental Principles of Framework Design
The Principle of Scenario-Driven Design
The Principle of Low Barrier to Entry
The Principle of Self-Documenting Object Models
The Principle of Layered Architecture
Summary
3. Naming Guidelines.
Capitalization Conventions
Capitalization Rules for Identifiers
Capitalizing Acronyms
Capitalizing Compound Words and Common Terms
Case Sensitivity
General Naming Conventions
Word Choice
Using Abbreviations and Acronyms
Avoiding Language-Specific Names
Naming New Versions of Existing APIs
Names of Assemblies and DLLs
Names of Namespaces
Namespaces and Type Name Conflicts
Names of Classes, Structs, and Interfaces
Names of Generic Type Parameters
Names of Common Types
Naming Enumerations
Names of Type Members
Names of Methods
Names of Properties
Names of Events
Naming Fields
Naming Parameters
Naming Resources
Summary
4. Type Design Guidelines.
Types and Namespaces
Standard Subnamespace Names
Choosing Between Class and Struct
Choosing Between Class and Interface
Abstract Class Design
Static Class Design
Interface Design
Struct Design
Enum Design
Designing Flag Enums
Adding Values to Enums
Nested Types
Summary
5. Member Design.
General Member Design Guidelines
Member Overloading
Implementing Interface Members Explicitly
Choosing Between Properties and Methods
Property Design
Indexed Property Design
Property Change Notification Events
Constructor Design
Type Constructor Guidelines
Event Design
Custom Event Handler Design
Field Design
Operator Overloads
Overloading Operator ==
Conversion Operators
Parameter Design
Choosing Between Enum and Boolean Parameters
Validating Arguments
Parameter Passing
Members with Variable Number of Parameters
Pointer Parameters
Summary
6. Designing for Extensibility.
Extensibility Mechanisms
Unsealed Classes
Protected Members
Events and Callbacks
Virtual Members
Abstractions (Abstract Types and Interfaces)
Base Classes
Sealing
Summary
7. Exceptions.
Exception Throwing
Choosing the Right Type of Exception to Throw
Error Message Design
Exception Handling
Wrapping Exceptions
Using Standard Exception Types
Exception and SystemException
ApplicationException
InvalidOperationException
ArgumentException, ArgumentNullException, and ArgumentOutOfRangeException
NullReferenceException, IndexOutOfRangeException, and AccessViolationException
StackOverflowException
OutOfMemoryException
ComException, SEHException, and other CLR Exceptions
ExecutionEngineException
Designing Custom Exceptions
Exceptions and Performance
Tester-Doer Pattern
Try-Parse Pattern
Summary
8. Usage Guidelines.
Arrays
Attributes
Collections
Collection Parameters
Collection Properties and Return Values
Choosing Between Arrays and Collections
Implementing Custom Collections
ICloneable
IComparable and IEquatable
IDisposable
Object
Object.Equals
Object.GetHashCode
Object.ToString
Uri
System.Uri Implementation Guidelines
System.Xml Usage
Equality Operators
Equality Operators on Value Types
Equality Operators on Reference Types
9. Common Design Patterns.
Aggregate Components
Component-Oriented Design
Factored Types
Aggregate Component Guidelines
The Async Pattern
Async Pattern Basic Implementation Example
Dispose Pattern
Basic Dispose Pattern
Finalizable Types
Factories
Optional Feature Pattern
Template Method
Timeouts
And in the End ...
Appendix A: C# Coding Style Conventions.
General Style Conventions
Brace Usage
Space Usage
Indent Usage
Naming Conventions
Comments
File Organization
Appendix B: Using FxCop to Enforce the Design Guidelines.
What Is FxCop?
The Evolution of FxCop
How Does It Work?
FxCop Guideline Coverage
FxCop Rules for the Naming Guidelines
FxCop Rules for the Type Design Guidelines
FxCop Rules for Member Design
FxCop Rules for Designing for Extensibility
FxCop Rules for Exceptions
FxCop Rules for Usage Guidelines
FxCop Rules for Design Patterns
Appendix C: Sample API Specification.
Glossary.
Suggested Reading List.
Index.
商品描述(中文翻譯)
目錄:
圖表。
致謝。
關於作者。
表格。
前言。
序言。
1. 介紹。
具備良好設計的框架特質
良好設計的框架是簡單的
良好設計的框架設計成本高
良好設計的框架充滿取捨
良好設計的框架借鑒過去
良好設計的框架旨在演變
良好設計的框架是整合的
良好設計的框架是一致的
2. 框架設計基礎。
漸進式框架
框架設計的基本原則
情境驅動設計原則
低進入門檻原則
自我文檔化物件模型原則
分層架構原則
總結
3. 命名指導方針。
大寫慣例
標識符的大寫規則
大寫縮寫
大寫複合詞和常用術語
大小寫敏感性
一般命名慣例
單字選擇
使用縮寫和首字母縮略詞
避免語言特定名稱
命名現有API的新版本
程式集和DLL的名稱
命名空間的名稱
命名空間和類型名稱衝突
類、結構和介面的名稱
泛型類型參數的名稱
常見類型的名稱
命名列舉
類型成員的名稱
方法的名稱
屬性的名稱
事件的名稱
命名欄位
命名參數
命名資源
總結
4. 類型設計指導方針。
類型和命名空間
標準子命名空間名稱
在類和結構之間的選擇
在類和介面之間的選擇
抽象類設計
靜態類設計
介面設計
結構設計
列舉設計
設計標誌列舉
向列舉添加值
嵌套類型
總結
5. 成員設計。
一般成員設計指導方針
成員重載
明確實現介面成員
在屬性和方法之間的選擇
屬性設計
索引屬性設計
屬性變更通知事件
建構子設計
類型建構子指導方針
事件設計
自定義事件處理程序設計
欄位設計
運算子重載
重載運算子 ==
轉換運算子
參數設計
在列舉和布林參數之間的選擇
驗證參數
參數傳遞
具有可變數量參數的成員
指標參數
總結
6. 設計可擴展性。
可擴展性機制
未密封類
受保護成員
事件和回調
虛擬成員
抽象(抽象類型和介面)
基類
密封
總結