
| 《.NET设计规范:约定、惯用法与模式(第2版·英文版)》:数千名微软精锐开发人员的经验和智慧。最终浓缩在这本设计规范之中。与上一版相比。书中新增了许多评注。解释了相应规范的背景和历史,从中你能聆听到微软技术大师Andem Hejlsberg、Jeffrey Richter和Paul Vick等的声音。读来令人兴趣盎然.欲罢不能。《.NET设计规范:约定、惯用法与模式(第2版·英文版)》虽然是针对.NET平台上的框架设计的。但对其他平台的框架设计同样具有借鉴意义。新版根据.NET Framework 3.0和3.5的新特性做了全面更新,主要关注的是直接影响框架可编程能力的设计问题。遵守这些规范对于使用.NET Framework创建高质量的应用程序至关重要。微软.N ET Framework设计组的智慧结晶洞悉.NET技术内幕.N ET开发者的必备图书《.NET设计规范:约定、惯用法与模式(第2版·英文版)》提供配套光盘。内含Designing.NET Class Librarides等13个演讲视频(时长近13小时)。此外.光盘还包括.NETFramework类和组件设计指南、API规范样例以及其他有用的资源和工具。 |
| 克瓦琳娜(Krzysztof Cwalina),微软公司.NET Franmwork开发组项目经理。他为.NET Framework设计了多个API。还开发了FxCop等框架开发工具。目前,他正致力于在微软内部开发推广设计规范。将其应用到.NET Framework中。同时负责核心.NET Framework API的交付。 艾布拉姆斯(Brad Abrams),微软公司CLR开发组和.NET Framework开发组的创始人之一,目前是项目经理主管。他参与制定了CLS、.NET Framework设计规范以及ECMA/ISOCLI标准中程序库标准。著有Programming in the.NET Environment、.NET Framework StandardLibrary Annotated Reference(卷1和卷2)等书。读者可以从他的博客http://blogs.msdn.com/bradA/中了解他的最新想法。 |
| 1 introduction 1.1 qualities of a well-designed framework 1.1.1 well-designed frameworks are simple 1.1.2 well-designed frameworks are expensive to design 1.1.3 well-designed frameworks are full of trade-offs 1.1.4 well-designed frameworks borrow from the past 1.1.5 well-designed frameworks are designed to evolve 1.1.6 well-designed frameworks are integrated 1.1.7 well-designed frameworks are consistent 2 framework design fundamentals 2.1 progressive frameworks 2.2 fundamental principles of framework design 2.2.1 the principle of scenario-driven design 2.2.2 the principle of low barrier to entry 2.2.3 the principle of self-documenting object models 2.2.4 the principle of layered architecture 3 naming guidelines 3.1 capitalization conventions 3.1.1 capitalization rules for identifiers 3.1.2 capitalizing acronyms 3.1.3 capitalizing compound words and common terms 3.1.4 case sensitivity 3.2 general naming conventions 3.2.1 wordchoice 3.2.2 using abbreviations and acronyms 3.2.3 avoiding language-specific names 3.2.4 naming new versions of existing apis 3.3 names of assemblies and dlls 3.4 names of namespaces 3.4.1 namespaces and type name conflicts 3.5 names of classes, structs, and interfaces 3.5.1 names of generic type parameters 3.5.2 names of common types 3.5.3 naming enumerations 3.6 names of type members 3.6.1 names of methods 3.6.2 names of properties 3.6.3 names of events 3.6.4 naming fields 3.7 naming parameters 3.7.1 naming operator overload parameters 3.8 naming resources 4 type design guidelines 4.1 types and namespaces 4.1.1 standard subnamespace names 4.2 choosing between class and struct 4.3 choosing between class and interface 4.4 abstract class design 4.5 static class design 4.6 interface design 4.7 struct design 4.8 enumdesign 4.8.1 designing flag enums 4.8.2 adding values to enums 4.9 nested types 4.10 types and assembly metadata 5 memberdesign 5.1 general member design guidelines 5.1.1 member overloading 5.1.2 implementing interface members explicitly 5.1.3 choosing between properties and methods 5.2 property design 5.2.1 indexed property design 5.2.2 property change notification events 5.3 constructor design 5.3.1 type constructor guidelines 5.4 event design 5.4.1 custom event handler design 5.5 field design 5.6 extension methods 5.7 operator overloads 5.7.1 overloading operator== 5.7.2 conversion operators 5.8 parameter design 5.8.1 choosing between enum and boolean parameters 5.8.2 validating arguments 5.8.3 parameter passing 5.8.4 members with variable number of parameters 5.8.5 pointer parameters 6 designing for extensibility 6.1 extensibility mechanisms 6.1.1 unsealed classes 6.1.2 protected members 6.1.3 events and callbacks 6.1.4 virtual members 6.1.5 abstractions (abstract types and interfaces) 6.2 base classes 6.3 sealing 7 exceptions 7.1 exception throwing 7.2 choosing the right type of exception to throw 7.2.1 error message design 7.2.2 exception handling 7.2.3 wrapping exceptions 7.3 using standard exception types 7.3.1 exceptcon and systemexcept~on 7.3.2 appl ~cat~onexcept~on 7.3.3 inval ~doperat~onexceptcon 7.3.4 argumentexcept~on, argumentnul lexcept~on, and argumentoutofrangeexcept~on 7.3.5 nul lreferenceexcept~on, indexoutofrangeexcept~on, and accessvcolatconexcept~on 7.3.6 stackoverflowexcept~on 7.3.7 utofmemoryexcept~on 7.3.8 comexcept~on, sehexceptcon, and execut~oneng~ne-exception 7.4 designing custom exceptions 7.5 exceptions and performance 7.5.1 tester-doer pattern 7.5.2 try-parse pattern 8 usage guidelines 8.1 arrays 8.2 attributes 8.3 collections 8.3.1 collection parameters 8.3.2 collection properties and return values 8.3.3 choosing between arrays and collections 8.3.4 implementing custom collections 8.4 datetime and datetimeoffset 8.5 icloneable 8.6 icomparable 8.7 idisposable 8.8 nuiiable 8.9 object 8.9.1 object. equals 8.9.2 object. gethashcode 8.9.3 object. tostrlng271 8.10 serialization 8.10.1 choosing the right serialization technology to support 8.10.2 supporting data contract serialization 8.10.3 supporting xml serialization 8.10.4 supporting runtime serialization 8.11 url 283 8.11.1 system. urn. implementation guidelines 8.12 system.xml usage 8.13 equality operators 8.13.1 equality operators on value types 8.13.2 equality operators on reference types 9 common design patterns 9.1 aggregate components 9.1.1 component-oriented design 9.1.2 factoredtypes 9.1.3 aggregate component guidelines 9.2 the async patterns 9.2.1 choosing between the async patterns 9.2.2 classic async pattern 9.2.3 classic async pattern basic implementation example 9.2.4 event-based async pattern 9.2.5 supporting out and ref parameters 9.2.6 supporting cancellation 9.2.7 supporting progress reporting 9.2.8 supporting incremental results 9.3 dependency properties 9.3.1 dependency property design 9.3.2 attached dependency property design 9.3.3 dependency property validation 9.3.4 dependency property change notifications 9.3.5 dependency property value coercion 9.4 dispose pattern 9.4.1 basic dispose pattern 9.4.2 finalizable types 9.5 factories 9.6 linq support 9.6.1 overview of linq 9.6.2 ways of implementing linq support 9.6.3 supporting linq through ienumerable 9.6.4 supporting linq through ioueryable~t~ 9.6.5 supporting linq through the query pattern 9.7 optional feature pattern 9.8 simulating covariance 9.9 template method 9.10 timeouts 9.11 xaml readable types 9.12 and in the end... a c# coding style conventions a.1 general style conventions a.1.1 brace usage a.1.2 space usage a.1.3 indent usage a.1.4 other 367 a.2 naming conventions a.3 comments a.4 file organization b using fxcop to enforce the framework design guidelines b.1 what is fxcop? b.2 the evolution of fxcop b.3 how does it work? b.4 fxcop guideline coverage b.4.1 fxcop rules for the naming guidelines b.4.2 fxcop rules for the type design guidelines b.4.3 fxcop rules for member design b.4.4 fxcop rules for designing for extensibility b.4.5 fxcop rules for exceptions b.4.6 fxcop rules for usage guidelines b.4.7 fxcop rules for design patterns c sample api specification glossary suggested reading list index |
商品评论(0条)