zoukankan      html  css  js  c++  java
  • Clean Architecture 读书笔记

    看了youtube上bob大叔在yale的演讲,和想象中的标准闷骚码农不同,bob叔是个很风趣的人,还有点毒舌,哈哈,内容大体就是这本书前几章的内容

    (链接:https://www.youtube.com/watch?v=TMuno5RZNeE&t=2880s)

    一些观点很有参考价值:

    In a statically typed language, like Java, this means that the use, import, and include statements should refer only to source modules containing interfaces, abstract classes, or some other kind of abstract declaration. Nothing concrete should be depended on.

    Part of the art of developing a software architecture is carefully separating those policies from one another, and regrouping them based on the ways that they change.Policies that change for the same reasons, and at the same times, are at the same level and belong together in the same component. Policies that change for different reasons, or at different times, are at different levels and should be separated into different components.

    Divide our application into business rules and plugins.

    Rigidity: What is bad code:If you modify something, you break something else; You must modify massive amounts of other code to come back to consistency with this modification.That is rigid code that has dependencies that snake out in so many directions that you cannot make isolated change without change everything around it;

    Fragility:Change one thing leads to error in another spot. good code are copuled with bad code and cannot be reused.

    吐槽OO:

    OO did not give us encapsulation; OO weaken encapsulation; OO = Moudling the real world? nonsense, OO is about managing dependencies by selectively inverting certain key dependencies in your architecture so that you can prevent rigility,fragility,nonusablility;

    =====原文作者博客园----dustyhope,转载请注明出处,谢谢
  • 相关阅读:
    简单下拉列表的实现
    App Store 加急审核解析
    iOS 封装一个带复制功能的UILabel
    Xcode 控制台打印Unicode字符串转换为中文
    修改系统UITableViewCell的ImageView大小
    iOS SDWebImage实现原理详解
    Mac电脑用终端生成SSH key 访问自己的Github
    MVC与MVVM之间在IOS中的区别
    iOS TabBarItem设置红点(未读消息)
    virtualenv 创建python虚拟环境
  • 原文地址:https://www.cnblogs.com/liwanping/p/11147151.html
Copyright © 2011-2022 走看看