https://refactoring.guru/smells/feature-envy

https://stackoverflow.com/questions/1242994/effective-c-sharp-tips

Inversion of control   <= https://en.wikipedia.org/wiki/Inversion_of_control

<= https://en.wikipedia.org/wiki/Template_method_pattern

如何创建一个对象?  采用多层的办法,可以获得更强的对象 => 1. new class;

2. Create() {   ...     }

public SimpleSamepleEntity Create()
ProxyGenerator generator = new ProxyGenerator();
            CallingLogInterceptor interceptor = new CallingLogInterceptor();
            SimpleSamepleEntity entity = generator.CreateClassProxy<SimpleSamepleEntity>(interceptor);

            return entity ;

}
ProxyGenerator generator = new ProxyGenerator();
            var options = new ProxyGenerationOptions(new InterceptorFilter()) { Selector = new InterceptorSelector() };
            SimpleSamepleEntity entity = generator.CreateClassProxy<SimpleSamepleEntity>(
                options,
                new SimpleLogInterceptor(), new CallingLogInterceptor());
            entity.Name = "Richie";
            entity.Age = ;

3. Object factor =>

Template of Define a class  ?? => virtual, interface, delegate. 有些工具,像AOP,MOQ 只适用于virtual, interface. 因此,写类时要考虑。

c#-回调callback是什么原理,机制? C#   =>

调用者(Caller)向回调函数(Callee)发出调用,被调用函数启动后,不等被调函数执行完毕,程序执行流立即返回到调用者继续执行。此时,程序中至少有两个执行流,一个是调用者执行流;另一个是被调用函数执行流同时执行。当被调函数所执行处理完毕时,被调函数反过来调用一个指定的函数(称为回调函数)向调用者返回处理结果或通知调用者处理结束。这个过程称为回调(Callback)。通常,调用者发出调用时,以函数参数方式将回调函数传递给被调函数。
在C#中,回调过程与其他语言没有区别,只是回调函数是以委托方式传递的。

4. Sort

5. Debug information,

6. Event  => standard Event Pattern

7. Testable ? How

8. Readability ?

9. Maintainance ?

END

Design Principle, Design Patterns And Refactoring的更多相关文章

  1. Design Principle vs Design Pattern 设计原则 vs 设计模式

    Design Principle vs Design Pattern设计原则 vs 设计模式 来源:https://www.tutorialsteacher.com/articles/differen ...

  2. 设计原则 Design Principle

    Design Principle设计原则 最近由于碰到要参与设计一个音频处理系统,有人提议用一个大的全局变量结构体来做状态信息交流的地方,引起了我对设计一个系统的思考,于是找到了如下资料,当然,关于这 ...

  3. design principle:java 回调与委派/委托机制

    博客 design principle:模拟 android Button 控件点击事件 主要说了一下模拟 android 的 Listener 模式,其实这就是一种委派与回调机制的体现. 委派,也可 ...

  4. [Design Patterns] 2. Design principle

    Single Responsibility Principle 类的设计趋向于:Use Case Diagram --> (derived) --> Detail Open-Closed ...

  5. Design Principle

    原文地址:面向对象设计模式原则详解 http://blog.csdn.net/hguisu/article/details/7571617 程序员必备的七大面向对象设计原则(一) http://www ...

  6. [Arch] 02. Design principle and Software Pattern

    Ref: 软件设计的七大原则 有时间的话,还需进一步深入理解. Figure, 重要的前五个原则 单一职责原则 (Simple responsibility pinciple SRP) 类的设计趋向于 ...

  7. 设计模式-设计原则(Design Principle)

    本文由@呆代待殆原创,转载请注明出处. 写在前面:所谓设计原则并不是一定要遵守的法则,只是一种建议,因为保持这些原则本身会有一定代价,若是这些代价超过了带来的好处就得不偿失了,所以一切还是以简单为准. ...

  8. [读书笔记]设计原本[The Design of Design]

    第1章 设计之命题 1.设计首先诞生于脑海里,再慢慢逐步成形(实现) 2.好的设计具有概念完整性:统一.经济.清晰.优雅.利落.漂亮... 第2章 工程师怎样进行设计思维——理性模型 1.有序模型的有 ...

  9. BookNote: Refactoring - Improving the Design of Existing Code

    BookNote: Refactoring - Improving the Design of Existing Code From "Refactoring - Improving the ...

随机推荐

  1. mysql 以数组的形式插入更新表

    在项目中用php+mysql,需要插入数据,但是数据库表字段又很长,如果用常规的insert into table (c) values ('dd')的话,将是很长的sql语句,而且一不小心,就弄错了 ...

  2. CF1153D Serval and Rooted Tree(树形DP)

      题目链接: https://www.luogu.org/problemnew/show/CF1153D (cf崩了,贴了个落谷的) 题目大意:给你n个点,然后n-1条边,构成一棵树,每个点是子节点 ...

  3. BootStrap分页教程

    https://www.cnblogs.com/laowangc/p/8875526.html https://www.cnblogs.com/yinglunstory/p/6092834.html ...

  4. tmux 后台训练

    参考链接:https://blog.csdn.net/u014381600/article/details/54588531

  5. AUTOCAD参数约束功能

    概要:http://through-the-interface.typepad.com/through_the_interface/2011/08/a-simplified-net-api-for-a ...

  6. Solidity属性和方法的访问权限

    属性:默认是internal的类型,外部是不可以访问调用的,如果加上public的话,那么是会自动为这个属性加上一个get的方法的,比如uint   public _age; => functi ...

  7. 25)django-form使用

    目录 1)django form作用 2)django form使用 一:django form 作用 django form有两个作用:一是用户输入数据验证:二是生成html 1)用户输入数据验证, ...

  8. rsyslog队列说明文档

    常规队列参数 用法 队列参数可与以下语句一起使用: 行动() 规则集() main_queue() 需要在应该影响的操作或规则集中配置队列.如果未配置任何内容,则将使用默认值.因此,默认规则集仅具有默 ...

  9. 七天开发进度(六)(微信小程序版(一))

    1. 今天主要根据网上教程学习了微信小程序的代码结构,和代码编写-Tabbar配置, 学习了app.js的App和Page方法, 认识了view组件,button组件,input组件,但是还没怎么应用 ...

  10. 八.nginx网站服务实践应用

    期中集群架构-第八章-期中架构nginx章节====================================================================== 01. web ...