什么是最好的面向对象的设计实践? [英] What are some best object-oriented design practices?

查看:112
本文介绍了什么是最好的面向对象的设计实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有发现任何这样的问题。

I didn't find any question that would be this general.

请发表任何您认为是面向对象设计的有用规则。

Please post whatever you find to be a useful rule for oject-oriented design.

推荐答案

有很多很多OOD做法(Google it!)如果你不得不选择别人,我会用 SOLID 为首字母缩略词;

There are many, many OOD practices (Google it!) if you had to pick over others I would go with SOLID an acronym for;


  1. 单一责任主体

  2. 开放/封闭原则

  3. Liskov替代原则

  4. 界面隔离原则

  5. 依赖反转原则

  1. Single Responsibility Principal
  2. Open/closed principle
  3. Liskov substitution principle
  4. Interface segregation principle
  5. Dependency inversion principle

这篇关于什么是最好的面向对象的设计实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆