| help | account  


Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries
View Larger Image
Krzysztof Cwalina, Brad Abrams
Addison-Wesley, Hardcover, Bk&CD edition, Published September 2005, 384 pages, ISBN 0321246756
List Price: $49.99
Our Price: $38.95
You Save: $11.04 (22% Off)


FREE Shipping on Orders over $40!*
Availability: Out-Of-Stock
Read an excerpt:
Chapter 4: Type Design Guidelines

     

Excerpt provided courtesy of Addison-Wesley Professional. Copyright © Pearson Education, Addison-Wesley Professional. Written permission from the publisher is required for any use of this material.

Be the First to Write a Review and tell the world about this title!

People who purchase this book frequently purchase:

Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:

Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries teaches developers the best practices for designing system frameworks and reusable libraries for use with the Microsoft .NET Framework and WinFX. This book focuses on the design issues that directly affect the programmability of a framework, specifically its publicly accessible APIs.

This book can improve the work of any .NET developer producing code that other developers will use. An added benefit is a collection of annotations to the guidelines by various members of the .NET Framework and WinFX teams, which provide a lively discussion of the reasons for the guidelines, along with examples of good reasons for breaking the guidelines.

Microsoft architects Krzysztof Cwalina and Brad Abrams offer guidelines for framework design from the top down. From their long experience and deep insight, you will learn

  • The general philosophy of framework design
  • Principles and guidelines that are fundamental to overall framework design
  • Naming guidelines for the various parts of a framework, such as namespaces, types, members, common design idioms
  • Guidelines for the design of types and members of types
  • Issues and guidelines that are important to ensure appropriate extensibility in your framework
  • Guidelines for working with exceptions, the preferred error reporting mechanism in the .NET Framework and WinFX
  • Guidelines for extending and using types that commonly appear in frameworks
  • Guidelines for and examples of common framework design patterns

Guidelines in this book come in four major forms: Do, Consider, Avoid, and Do not. In general, a Do guideline should almost always be followed, a Consider guideline should generally be followed, an Avoid guideline indicates that something is generally not a good idea, and a Do not guideline indicates something you should almost never do. Every guideline includes a discussion of its applicability, and almost every guideline includes an example written in C#.

 

Table of Contents

Foreword.

Preface.

Acknowledgments.

About the Authors.

1. Introduction.

2. Framework Design Fundamentals.

    Progressive Frameworks

    Fundamental Principles of Framework Design

    Summary

3. Naming Guidelines.

    Capitalization Conventions

      Capitalization Rules for Identifiers

    General Naming Conventions

    Names of Assemblies and DLLs

    Names of Namespaces

    Names of Classes, Structs, and Interfaces

    Names of Type Members

    Naming Parameters

    Naming Resources

    Summary

4. Type Design Guidelines.

    Types and Namespaces

    Choosing Between Class and Struct

    Choosing Between Class and Interface

    Abstract Class Design

    Static Class Design

    Interface Design

    Struct Design

    Enum Design

    Nested Types

    Summary

5. Member Design.

    General Member Design Guidelines

    Property Design

    Constructor Design

    Event Design

    Field Design

    Operator Overloads

    Parameter Design

    Summary

6. Designing For Extensibility.

    Extensibility Mechanisms

    Base Classes

    Sealing

    Summary

7. Exceptions.

    Exception Throwing

    Choosing the Right Type of Exception to Throw

    Using Standard Exception Types

    Designing Custom Exceptions

    Exceptions and Performance

8. Usage Guidelines.

    Arrays

    Attributes

    Collections

    ICloneable

    IComparable and IEquatable

    IDisposable

    Object

    Uri

    System.Xml Usage

    Equality Operators

9. Common Design Patterns.

    Aggregate Component

    The Async Pattern

    Dispose Pattern

    Factories

    Optional Feature Pattern

    Template Method

    Timeouts

    And In the End...

Appendix A: C# Coding Style Conventions.

    General Style Conventions

    Naming Conventions

    Comments

    File Organization

Appendix B: Using FxCop to Enforce the Design Guidelines (by Sheridan Harrison).

Appendix C: Sample API Specification.

Glossary.

Bibliography.

Index.

About the Authors

Brad Abrams is a Program Manager on the .NET Framework team at Microsoft, where he has been designing the Framework Class Libraries for the past five years. He is the primary author of the .NET Framework Design Guidelines, the Common Language Specification, and the class libraries for the ECMA CLI specification.

Brad Abrams is a Lead Program Manager on the .NET Framework team at Microsoft Corporation, where he has been designing the Framework Class Libraries since 1997. He is the primary author of the .NET Framework Design Guidelines, the Common Language Specification, and the class libraries for the ECMA\ISO CLI and C# Language Standards.


Forgot your password?
FAQs
Shipping Options
Returns
Your Orders
Your Account