Objective C # Chapter 3: Use C # to express your design)

Source: Internet
Author: User

Chapter 3: Use C # to express your design
Chapter 3. Expressing designs with C #

C # Language introduces a new syntax for your design. You can choose this technology to allow your design to communicate with other developers, which can be maintained by these developers, extend or use the software you designed. All types of C # are stored in the. NET environment, which makes some good assumptions about the compatibility of all types. However, if you violate these assumptions, you will increase the possibility that the type cannot work correctly.

These principles are not an overview of published software design technologies. On the contrary, these principles clearly show how to express the best software design intent with different C # language features. C # Language designers have added some language features to better express modern software design habits. What is special about specific language features is very subtle, And you often have many optional methods. More options may be a better solution at the beginning, but the outstanding language features will be shown later, and you will find it necessary to enhance the existingProgram. Make sure that you understand these principles well and apply them with caution. When creating your own system, pay attention to the opportunities that are most likely to be enhanced (designed.

Some syntactic changes will give you some new words to describe some of your daily habits. Attributes, indexers, events, and proxies are examples. They are different from classes and interfaces: class definition type, interface declaration behavior. The base class declares the type and defines some common behaviors for some associated types. Because of the garbage collector, other design habits have also been changed; there are also some changes because most variables are of reference type.

The Recommended Principles in this chapter will help you select some of the most natural expressions for your design. This allows you to design software that is easier to maintain, easier to scale, and easier to use.
====================

Chapter 3. expressing designs with C #
the C # language introduced new syntax to describe your designs. the techniques you choose communicate your design intent to the developers who maintain, extend, or use the software you develop. C # types all live inside. NET environment. the environment makes some assumptions about the capabilities of all types as well. if you violate those assumptions, you increase the likelihood that your types won't function correctly.

these items are not a compendium of software design techniquesentire volumes have been written about software design. instead, these items highlight how different C # language features can best express the intent of your software design. the C # Language designers added language features to more clearly express modern design idioms. the distinctions among certain language features are subtle, And you often have alternatives to choose from. more than one alternative might seem "best" at first; the distinctions show up only later, when you find that you must enhance an existing program. make sure you understand these items well, and apply them carefully with an eye toward the most likely enhancements to the systems you are building.

Some syntax changes give you new vocabulary to describe the idioms you use everyday. properties, indexers, events, and delegates are examples, as is the difference between classes and interfaces: Classes define types. interfaces declare behavior. base classes declare types and define common behavior for a related set of types. other design idioms have changed because of the garbage collector. still others have changed because most variables are reference types.

The recommendations in this chapter will help you pick the most natural expression for your designs. This will enable you to create software that is easier to maintain, easier to extend, and easier to use.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.