请问面向对象和面向过程的区别

来源:互联网 发布:美容连锁店测试软件 编辑:程序博客网 时间:2024/05/17 07:39

efang:
现在很多人在采用OO的开发工具,但往往大多还局限在面向过程开发软件。
这两种的思维很难区分。请哪为大侠指点一二。

spide:
需求是千变万化的,而设计是相对比较稳定的(因此,由于适应范围完全相反,即使“纯粹分解需求得到设计模型”的方法可行,它也是“象牙塔”里边闭门造车的直接原因)。在需求变化时,不能随便打破或者改写原来已经写好、测试好的代码,而应该采用组件继承的机制暂时保留原有的代码并扩展系统(仅仅“覆盖”或者说“升级”部分流程),使得不论是基于原来代码之上的应用系统还是基于新的组件的系统都能稳定、合理地实现,几乎不需重复测试。面向对象的设计者,思维中总是优先考虑每一个组件“将来”如何被复用和增强,在项目中更习惯里程碑式的、敏捷的开发方式。而面向过程的设计者,喜欢“大而全”不喜欢“小而精”,由于不承认某些相当简练的开发技巧(主要在设计方面,与开发语言以及运行平台无关)的积极方面的作用,则根本无力为将来考虑,能拼凑地实现现在的系统功能就不错了。

efang:
面向对象的思维能力能力确是很难形成,对象的设计往往感到很不边界.
在系统的数据库设计成功后在去设计对象的类似乎很是没有作用,请问你有没有
采用OOA--OOD--OOP 的项目成功案例?

frankwoo:
that is a funny question.
actually , people usually say object-oriented design, instead of process:)
process belongs to softwareengineer, in essense, there is no object-oriented process or procedure-oriented process, but since some amigoes like to nudge UML into a Process, so does it:)
I think people much more like to fond of object-oriented design using UML, with the process of RUP/,,....,XP,....etc:)

smilemac:
you misunderstood the term 面向过程. it is PROCEDURE-oriented rather
than PROCESS-oriented. normally the procedure-oriented is named functional programming (abr. fp), which was popular before the oop took over it as main-stream technology. oo think the world is made up of objects, but the fp think it is procedure. i think they are all wrong. :)

顺便看看:
sometimes, we also say "object-orientied software engineer".
 
--------------------------------------------------------------------------------
 
It's not different viewing from high level. but sepecial details lie in the concrete process.

frankwoo:
sorry, I made a terrible mistake :)
u are right.

原创粉丝点击