分享
 
 
 

.NET设计规范——约定、惯用法与模式(第2版·英文版)(附光盘)(图灵程序设计丛书·微软技术系列)(Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, Second E)

  点此进入淘宝搜索页搜索
  特别声明:本站仅为商品信息简介,并不出售商品,您可点击文中链接进入淘宝网搜索页搜索该商品,有任何问题请与具体淘宝商家联系。
  參考價格: 点此进入淘宝搜索页搜索
  分類: 图书,计算机与互联网,程序语言与软件开发,语言与开发工具,.net,
  品牌: Krzysztof Cwalina

基本信息·出版社:人民邮电出版社

·出版日期:2010年01月

·ISBN:9787115214454

·条形码:9787115214454

·版本:第1版

·装帧:平装

·开本:16

·正文语种:英语

·丛书名:图灵程序设计丛书·微软技术系列

·外文书名:Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, Second E

产品信息有问题吗?请帮我们更新产品信息。

内容简介本书关注直接影响框架可编程能力的设计问题,为框架设计师和广大开发人员设计高质量的软件提供了权威的指南,这一版更新至.NET 3.5。书中内容涉及框架设计的基本原则和规范,常用设计惯用法,为命名空间、类型、成员等框架各部分命名的规范,框架中常用设计模式的规范等。同时,书中添加了来自经验丰富的框架设计师、业界专家及用户给出的评注,为书中的许多规范增色不少。

本书为框架设计师必读之作,也可用作.NET开发人员的技术参考书。

目录

Contents

1Introduction1

1.1Qualities of a Well-Designed Framework3

1.1.1Well-Designed Frameworks Are Simple3

1.1.2Well-Designed Frameworks Are Expensive to Design4

1.1.3Well-Designed Frameworks Are Full of Trade-Offs5

1.1.4Well-Designed Frameworks Borrow from the Past5

1.1.5Well-Designed Frameworks Are Designed to Evolve5

1.1.6Well-Designed Frameworks Are Integrated6

1.1.7Well-Designed Frameworks Are Consistent6

2Framework Design Fundamentals9

2.1Progressive Frameworks11

2.2Fundamental Principles of Framework Design14

2.2.1The Principle of Scenario-Driven Design15

2.2.2The Principle of Low Barrier to Entry21

2.2.3The Principle of Self-Documenting Object Models26

2.2.4The Principle of Layered Architecture33

3Naming Guidelines37

3.1Capitalization Conventions38

3.1.1Capitalization Rules for Identifiers38

3.1.2Capitalizing Acronyms40

3.1.3Capitalizing Compound Words and Common Terms43

3.1.4Case Sensitivity45

3.2General Naming Conventions46

3.2.1WordChoice46

3.2.2Using Abbreviations and Acronyms48

3.2.3Avoiding Language-Specific Names49

3.2.4Naming New Versions of Existing APIs51

3.3Names of Assemblies and DLLs54

3.4Names of Namespaces56

3.4.1Namespaces and Type Name Conflicts58

3.5Names of Classes, Structs, and Interfaces60

3.5.1Names of Generic Type Parameters64

3.5.2Names of Common Types64

3.5.3Naming Enumerations66

3.6Names of Type Members68

3.6.1Names of Methods68

3.6.2Names of Properties68

3.6.3Names of Events70

3.6.4Naming Fields72

3.7Naming Parameters73

3.7.1Naming Operator Overload Parameters74

3.8Naming Resources74

4Type Design Guidelines77

4.1 Types and Namespaces79

4.1.1Standard Subnamespace Names83

4.2Choosing Between Class and Struct84

4.3Choosing Between Class and Interface88

4.4Abstract Class Design95

4.5Static Class Design97

4.6Interface Design98

4.7Struct Design101

4.8EnumDesign103

4.8.1Designing Flag Enums110

4.8.2Adding Values to Enums114

4.9Nested Types115

4.10Types and Assembly Metadata118

5MemberDesign121

5.1General Member Design Guidelines121

5.1.1Member Overloading121

5.1.2Implementing Interface Members Explicitly128

5.1.3Choosing Between Properties and Methods132

5.2Property Design138

5.2.1Indexed Property Design140

5.2.2Property Change Notification Events142

5.3Constructor Design144

5.3.1Type Constructor Guidelines151

5.4Event Design153

5.4.1Custom Event Handler Design159

5.5Field Design159

5.6Extension Methods162

5.7Operator Overloads168

5.7.1Overloading Operator ==173

5.7.2Conversion Operators173

5.8Parameter Design175

5.8.1Choosing Between Enum and Boolean Parameters177

5.8.2Validating Arguments179

5.8.3Parameter Passing183

5.8.4Members with Variable Number of Parameters186

5.8.5Pointer Parameters190

6Designing for Extensibility193

6.1Extensibility Mechanisms193

6.1.1Unsealed Classes194

6.1.2Protected Members196

6.1.3Events and Callbacks197

6.1.4Virtual Members201

6.1.5Abstractions (Abstract Types and Interfaces)203

6.2Base Classes206

6.3Sealing207

7Exceptions211

7.1Exception Throwing216

7.2Choosing the Right Type of Exception to Throw221

7.2.1Error Message Design225

7.2.2Exception Handling227

7.2.3Wrapping Exceptions232

7.3Using Standard Exception Types234

7.3.1ExceptCon and SystemException234

7.3.2ApplicationException234

7.3.3InvalidOperationExceptCon235

7.3.4ArgumentException, ArgumentNullException, and ArgumentOutOfRangeException235

7.3.5NullReferenceException, IndexOutOfRangeException, and AccessViolationException237

7.3.6StackOverflowException237

7.3.70utOfMemoryException238

7.3.8ComException, SEHException, and ExecutionEngineException239

7.4Designing Custom Exceptions239

7.5Exceptions and Performance240

7.5.1Tester-Doer Pattern241

7.5.2Try-Parse Pattern242

8Usage Guidelines245

8.1Arrays245

8.2Attributes247

8.3Collections250

8.3.1Collection Parameters252

8.3.2Collection Properties and Return Values253

8.3.3Choosing Between Arrays and Collections258

8.3.4Implementing Custom Collections259

8.4DateTime and DateTimeOffset261

8.5ICloneable263

8.6IComparableand IEquatable264

8.7IDisposable266

8.8Nuiiable266

8.9Object268

8.9.1Object.EquaLs268

8.9.2Object.GetHashCode270

8.9.3Object.ToStrlng271

8.10Serialization274

8.10.1Choosing the Right Serialization Technology to Support275

8.10.2Supporting Data Contract Serialization276

8.10.3Supporting XML Serialization280

8.10.4Supporting Runtime Serialization281

8.11UrL 283

8.11.1System. Uri Implementation Guidelines284

8,12System.Xml Usage284

8.13Equality Operators286

8.13.1Equality Operators on Value Types287

8.13.2Equality Operators on Reference Types287

9Common Design Patterns289

9.1Aggregate Components289

9.1.1Component-Oriented Design291

9.1.2FactoredTypes294

9.1.3Aggregate Component Guidelines295

9.2The Async Patterns298

9.2.1Choosing Between the Async Patterns298

9.2.2Classic Async Pattern300

9.2.3Classic Async Pattern Basic Implementation Example304

9.2.4Event-Based Async Pattern305

9.2.5Supporting Out and Ref Parameters307

9.2.6Supporting Cancellation308

9.2.7Supporting Progress Reporting309

9.2.8Supporting Incremental Results311

9.3Dependency Properties312

9.3.1Dependency Property Design313

9.3.2Attached Dependency Property Design315

9.3.3Dependency Property Validation316

9.3.4Dependency Property Change Notifications317

9.3.5Dependency Property Value Coercion318

9.4Dispose Pattern319

9.4.1Basic Dispose Pattern322

9.4.2Finalizable Types328

9.5Factories332

9.6LINQ Support337

9.6.1Overview of LINQ337

9.6.2Ways of Implementing LINQ Support339

9.6.3Supporting LINQ through IEnumerabLe339

9.6.4Supporting LINQ through IOueryabLe340

9.6.5Supporting LINQ through the Query Pattern341

9.7Optional Feature Pattern344

9.8Simulating Covariance348

9.9Template Method354

9.10Timeouts356

9.11XAML Readable Types358

9.12And in the End...361

AC# Coding Style Conventions363

A.1General Style Conventions364

A.1.1Brace Usage364

A.1.2Space Usage365

A.1.3Indent Usage367

A.1.4Other 367

A.2Naming Conventions367

A.3Comments368

A.4File Organization369

BUsing FxCop to Enforce the Framework Design Guidelines371

B.1What Is FxCop?371

B.2The Evolution of FxCop372

B.3How Does It Work?373

B.4FxCop Guideline Coverage374

B.4.1FxCop Rules for the Naming Guidelines374

B.4.2FxCop Rules for the Type Design Guidelines384

B.4.3FxCop Rules for Member Design387

B.4.4FxCop Rules for Designing for Extensibility394

B.4,5FxCop Rules for Exceptions395

B.4.6FxCop Rules for Usage Guidelines397

B.4.7FxCop Rules for Design Patterns402

CSample API Specification405

Glossary413

Suggested Reading List419

Index423

……[看更多目录]

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
>>返回首頁<<
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有