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. 使用tablayout和recyclerview的时候,报重复添加Fragment错误

    原因: 在添加的子Fragment报错了, 出现了空值错误, 此时报出来错误是前一个Fragment重复添加

  2. 一些日期的计算方式 PHP

    一些日期的计算 某个月内的所有天数: public function getMonthDay ($date) { $stattime = strtotime(date('Ym01',strtotime ...

  3. Linux centos系统安装后的基本配置,Linux命令

    一.centos系统安装后的基本配置 .常用软件安装 yum install -y bash-completion vim lrzsz wget expect net-tools nc nmap tr ...

  4. 【原创】大数据基础之Marathon(1)简介、安装、使用

    marathon 1.6.322 官方:https://mesosphere.github.io/marathon/ 一 简介 Marathon is a production-grade conta ...

  5. 调用脚本的方式自动的创建或者是更新oracle数据库自带的Seq序列号的值

    执行脚本: CREATE OR REPLACE PACKAGE PKG_QUERY IS -- Author : ADMINISTRATOR -- Created : 2016/12/8 星期四 10 ...

  6. vs2017 winform打包

    如果没有Visual Studio Installer 说明没有安装打包插件 安装打包插件:Microsoft Visual Studio 2017 Installer Projects 工具 --& ...

  7. [原创]基于Zynq Linux环境搭建资源

    链接: https://pan.baidu.com/s/1JwNfLY50eoMr2_UO3lAfZw 密码: j8ex 链接: https://pan.baidu.com/s/1JwNfLY50eo ...

  8. kettle使用文件导入到Postgresql出现如下几种问题的总结

    1.kettle使用文件导入到Postgresql出现如下几种问题的总结: kettle使用文件导入到Postgresql出现如下几种问题的总结: .第一种错误,报错如ERROR: extra dat ...

  9. CodeSmith Generator 7.0.2的激活流程

    学过三层的人应该认识CodeSmith Generator吧,今天我就跟大家一起探讨下CodeSmith Generator 7.0.2的激活,这最新版本破解的难度也是超越以往......具体看这篇日 ...

  10. python模拟鼠标键盘操作 GhostMouse tinytask 调用外部脚本或程序 autopy右键另存为

    0.关键实现:程序窗口前置 python 通过js控制滚动条拉取全文 通过psutil获取pid窗口句柄,通过win32gui使程序窗口前置 通过pyauto实现右键菜单和另存为操作 1.参考 aut ...