Adaptive Code Via C # reading notes (1)

Source: Internet
Author: User

Original book Link: http://www.amazon.com/Adaptive-Code-via-principles-Developer-ebook/dp/B00OCLLYTY/ref=dp_kinw_strp_1

The title of the book is extremely unsuccessful: it is not about C # but about agility. Do not know is because agile this word with too much, or how, get a adaptive in the title, subtitle is agile, but too inconspicuous. If I were to translate it, I think the title could be: The Agile Way of code (described in the C # language). It may be a bit long, but after all, it gives a glimpse of what the book really wants to say.

First four chapters
  • In the sprint, the story's pattern is best: As a xx, I want XX, so. You can clearly show who the demand is, what the specific content is, and what the purpose is.
  • Sprint Best Tuesday Wednesday Thursday start and end, do not choose a day like this in Monday Friday
  • Sprint evaluation is often used to rate Fibonacci numbers and can use a bubble-like sort if time is tight.
  • All development team members should participate in the demo.
  • Sprint should review, each review is not a one-time, the next Review should look at the last review of the issues summarized in the unresolved.
  • for build, it should fail when the code coverage drops
  • Ladder mode to place interfaces and implementations in different assembly
  • Fusion log can check assembly bind failed , need to modify registry to open Fusion log, have special tool assembly binding Log Viewer
  • Chocolaty tool that can download and manage other tools , such as FileZilla
  • postsharp et Aop library attribute implementation transaction, log< Span lang= "en-us" > et logic detach

  • command/query Separation Mode . command return empty , always let the system do something , can change the system state . query returns data to the system and does not change the state of the system . architecture level : command/query Responsibility seperation. Qqquery can access the DAL directly.
  • A Null object pattern can reduce the number of unit tests

  • The adapter pattern is divided into class Adaptrt and object adapter, which are more common.
  • Impromptu can implement a type conversion actlike<t> method like dynamic , using reflection to automatically implement the object adapter mode

  • Re-motion or re-mix can be dynamically generated to implement multiple interfaces.
  • The AAA mode for unit tests is also called given when and then mode.

Unit testing part of the beginning is too thin , too elementary , minus points .

If a test knows the implementation details of the test object rather than the expected behavior , then the test is over-specified

Disappointed with the unit Test chapter

Fifth Chapter

If you can find multiple reasons to change a class that usually means that the class has multiple resopnsibility, which is not in accordance with the single responsibility principle

Adapter Mode and strategy can be a good way to achieve single responsibility principle

Sixth chapter

Open/close principle has two definitions ,1988 years Meyer , is the most commonly quoted .

Software entities should is open for extention and closed for modification.

Robot C. Martin has an extended definition

"Open for extension." This means, the behavior of the module can be extended. As the requirements of the application change, we is able to extend the module with new behaviors that satisfy those Chan Ges. In other words, we is able to change what the module does.
"Closed for modification." Extending the behavior of a module does not result in changes to the source or binary code of the module. The binary executable version of the module, whether in a linkable library, a DLL, or a Java. jar, remains untouched.
-robert C. Martin, Agile software development:principles, Patterns, and practices
(Prentice Hall, 2003)

Seventh Chapter

Do not use decimal to represent currency , consider using the money type

Http://moneytype.codeplex.com

Adaptive Code Via C # reading notes (1)

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.