免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3417 | 回复: 9
打印 上一主题 下一主题

OOP 概念的编程基础思想----我的感想(The essential of OOP conc [复制链接]

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2001-11-15 07:41 |只看该作者 |倒序浏览
OOP 概念的编程基础思想----我的感想
(The essential of OOP concept Thought)

Actually the philosofy of object oriented programming is very simple. What is an object actually? Do you know? Don't think it to complicated,keep it simple. I think you do know, yet you don't realize it when you are perfroming OO programming job. Or Who know you know.

Like in the nature, object is actual what we call "THING". A car is a thing, a bird is a thing, you are a thing too!!!! Don't forget. Object, the thing, is madeup by its parts/components, just like you have a head,a body, two hands and two legs and your tiny thing to make baby. Ha Ha Ha Ha. To be a thing, one has character/propery, has a mean to perform actions,right? Since you have your character and you can move to do some things right. So I think now you get to realize something I want to tell you.

So just like in the nature,object oriented programming(OOP)is all this about like in the nature. An object instant has its propery and its methods to perform jobs to be done.An object belong to some kind, this is so call CLASS. The class is like a kind of group of things with similar propery and methods.

Like in the nature, object,thing can multiplicate themselves. Like you can make babies with the woman you "love" right. Your baby has something in common with you,yet not quite the same, he/she has its own character/propery and he/she growup to be someone with its own behaviour right. So this come to the essential, the foundation of object oriented programming:

1. Inheritant
2. Incaptulation
3. Polymorphism

This is the beauty of Object Oriented Software Engineering,the simulation of the nature, the world we are living. The simplcity of it, and actually we all know about. But unfortunately many C++ and other OO programmers seem to forget some what it is actually very natural and simple!!!! They think in the terms of technique, the syntax, the construction of loop statement,the selection,the branching of code,the constructor, the destroyer, memories allocation,and all kind of tricks in order to get his/her program done.

This is stupib,wrong attitude to become an object oriented programmers. They simply forget the essential,the thought,the foundation of Object Oriented Engineering!!!! So my advice is, keep it simple yet perform it accordingly with correctness. Think and imagine like in the nature.

Just like thing happen and behave in the nature. Nothing secret,nothing complicated. Think like the way it happen in the nature. If a C++ or OO programmer doing his/her programming the way I tell you as above. It will become much and much easier to create even very advanced sophisticated software based on C++ or other OO programming language. This is the way,I think the proper way to perform ones OO programming job. The simplicity,the nature is the beauty!!!!

Bernardus160 于荷兰 2001-11-12

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2001-11-15 07:46 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

OOP 概念的编程基础思想----我的感想
(The essential of OOP concept Thought)

事实上,面向对象(物体)编程的哲学是非常简单的。究竟什么是对象(物体)呢?你知道吗?不用(要)把它想的太过复杂,其实它很简单。我想你应该知道的,只是你在从事面向对象(物体)编程的工作还未意识到它,否则,天晓得你知道什么!

同自然界一样,对象(物体)就是那些被我们称为“东西”的东西。汽车是个东西,小鸟是个东西,你也一样是个东西!!!!这一点你可不能忘记哦(雨飞谓: 除非你自己承认自己不是东西。^v^嘿嘿~~)。对象(物体)这个东西,是由它的各个部分(被称为组件)组合而成,就好像你是有头,身体,双手,双腿,和你的那个生小孩的“小东西”(雨飞谓:俗称“鸡巴”)一样。哈哈哈哈。作为一个对象(物体),当然要有自己的特性(被称为属性),还意味着会有动作的功能,不是吗?就像你有你的独特性格和你会以你的性格去做一些事情一样。我想现在你应该意识到我想对你说些什么了吧。

类比与自然界,面向对象(物体)编程同自然界几是完全相似的。一个对象(物体)实例有它自己的属性和完成他自己工作的方法。一个对象(物体)属于某种类型,它被称为CLASS(类)。类就像是具有相似属性和方法的一组事物(物体)。

形同自然界,对象(物体)具有繁殖与多种表现形式。就像你和你“爱”过的女人生的小贝贝一样,你的小贝贝会有一些和你相同的地方,但是也不完全一样,它还有他自己的个性特征(属性)和他自己的特有行为。所以所有这些才是面向对象(物体)编程的本质和基础:

1、继承(遗传性)
2、封装(涵存)
3、多态(一体多样化)

这就是与我们所生活的自然界非常相似的出色(美丽)的面向对象(物体)软件工程。事实上这个相似点地球人都知道的。但是不幸的是许多从事C++编程和其它面向对象(物体)语言编程的程序员们好像都忘记了这个实际上非常简单而自然的东西!!!!他们所想的是有限的技术,语法,循环、选择、分支结构的代码,构造,析构,内存分配,和各种各样为了他们完成代码的技巧。

作为面向对象(物体)的程序员们这种做法是相当愚蠢和错误的。他们完全忘记了面向对象(物体)软件工程的本质、思想和基础!!!!所以我想忠告大家,保持简单作法思想性的原则且在进行编程时相应地正确行事,以使自己能够从错误中纠正过来。一切以自然为样去思考,想象和行事。

就像自然界中的事物发生与演变一样,没有神秘的事物,也没有复杂的事物。对事物的思考就像它在自然界中发生那样想像演变就可以了。如果一个从事C++或者其他面向对象(物体)语言程序设计的程序员能够像我以上所说的那样去编制他们的程序,那么将会更加容易的去构建基于C++或者其他面向对象(物体)程序设计语言的高水平先进的软件,而且会做得更快更好。这只是一条路,一条我认为对从事面向对象程序设计工作比较合适的路。简单而自然是最好,最美丽的!!!!

Bernardus160 于荷兰 2001-11-12

译者:雨飞 于中国 2001-11-13,Bernardus160 再改 于荷兰 2001-11-14

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
3 [报告]
发表于 2001-11-15 07:55 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

你们好,
你们能否对我所发表的这篇基于我本人编程经验激发感想的文章作出你们宝贵的意见吗?
多谢了。
I wish you have a good time and be happy all the time

With kind regards,

Bernardus160 from Holland 2001-11-14

论坛徽章:
0
4 [报告]
发表于 2001-11-15 09:25 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

我的感觉是,面向对象的方法是一种非常好的方法,尤其是在系统分析、设计阶段,非常的自然,可以很容易的与客户和同事沟通,可以使你设计的系统结构非常合理,而且不会漏掉客户的需求;
但是,在一个项目相对比较细节的阶段,我指的是详细设计的后期和编码阶段,尤其是编码阶段,你不能还要求程序员总是想着汽车、小鸟这些对象,毕竟这些还是有些抽象,这时候的主要工作是为了完成功能,而不是为了面向对象,因为如果程序员在写一个对象的方法,那么使用面向过程的方法在所难免。
所以,我同意另一位专家的意见,究竟是不是面向对象的方法是理论家们研究的问题,我们没有必要深究。

不过,总的来说,面向对象的方法的确有着传统方法无法相比的优点!

论坛徽章:
0
5 [报告]
发表于 2001-11-22 20:48 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

精彩!!!

论坛徽章:
0
6 [报告]
发表于 2001-11-29 09:16 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

但是如果一个人一点都不懂C++语言,又怎么会理解这些思想呢?还是要学到一定的高度后才能理解其中的妙处吧

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
7 [报告]
发表于 2001-12-09 07:16 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

是的。只有在经过许多 OOP 的经验后才能抽象化升华成思想。

论坛徽章:
0
8 [报告]
发表于 2001-12-25 16:06 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

mygod的观点很精彩

论坛徽章:
0
9 [报告]
发表于 2002-02-01 12:51 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

***** 版主模式 *****

<a href=topic.cgi?forum=16&topic=27>该贴子已被管理员转移,请点击这里查看</a>

论坛徽章:
0
10 [报告]
发表于 2004-01-24 16:53 |只看该作者

OOP 概念的编程基础思想----我的感想(The essential of OOP conc

好东西!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP