Thinking in Java - Object-oriented logical thinking

This is a summary of their recent look at the java programming ideas in a book, record

什么是面向对象的设计思想?也许有不少初学者对这个概念还有许多不明白的地方,特别是这个处于新旧思想交替的时代,许多人刚刚学完现在看来是快要淘汰的只是面向过程的语言。他们的脑子还没有脱离面向过程思想的束缚,抬头却发现,“面向对象”早已经流

Line open, this strange word filled the air. Casually picked up a popular computer technology books, there will be no "object-oriented" words! So it bewildered the mind: What is "object-oriented"? Those who are not interested in, in passing; interested in the development in this area, in a hurry to find a book about to chew on what is "object-oriented." However, to break the shackles of thinking, that is difficult is not difficult, but when it comes to a profound understanding is not easy. After I was doing some light weight work, rather that a little experience, not afraid of laughable, has written for the majority of peer criticism.

“对象(Object)”一词,早在十九世纪就有现象学大师胡塞尔提出并定义。对象是世界中的物体在人脑中的映象,是人的意识之所以为意识的反映,是做为一种概念而存在的先念的东西,它还包括了人的意愿。举例说明吧。当我们认识到一种新的物体,它叫树,于是在我们的意识当中就形成了树的概念。这个概念会一直存在于我们的思维当中,并不会因为这棵树被砍掉而消失。这个概念就是现实当中的物体在我们意识当中的映象。我们对它还可以有我们自己的意愿,虽然我们并不需要付诸实现——只要在你的脑中想着把这棵树砍掉做成桌子、凳子等——我们就把它叫做意向。于是,对象就是客观世界中物体在人

Mappings and human intention brain. As long as the object exists among our conscious mind, we can take this thing kind of judge. For example, when we see another tree is, and will not be seen the first tree is gone lost without reference template for understanding the tree. When we touch something new, our consciousness will establish a target for these things. Of course, this process is how the formation, it is not a problem we can discuss.

上面所说的对象研究的是一般意义上的问题,因而它可以外推到一切事物。我们经常所说的“对象”,一班指的是解决信息领域内所遇到问题的方法。特别是应用软件技术来决问题的方法。如我们经常碰到的面向对象的编程(Object-Oriented Programming)、面向对象的分析(Object-Oriented Analysis)、面向对象的设计(Object-Oriented Design)等。应用前面所介绍的关于对象的概念,可以对这些问题做进一步的分析。在面对较复杂的系统,我们可以将它作为一个对象来进行分析。一个系统(解决某个问题的全套解决方案)作为一个对象,可以由多个部分组成。同样,这个对象也可以由多个对象组成。对于同类的事物,可以由一个对象来表示。这样做的益处是显而易见的,它灵活而高效,可以大大减轻设计人员的工作量,简化实际的模型。举一个例子。在关系型数据库的设计当中,我们可以把一个元组当作对象,给它定义一组操作方法。这些方法将适用于所有元组,从而我们不必在更大的范围内去细致的考虑不同的元组(如判断一个元素是否合法):因为它们有一组公共的面向本身的方法,它们“自己”可以“解决”自己的问题。更上一层的对象可以是一个表、视图等。表对象在元组对象的基础上又有它们自己的方法,如增加、删除等。从这个层面上讲,它也只需要做“自己”的事情,因为有元组对象的支持,它无须去考虑像元素是否合法这类的事情。甚至,有时为了满足我们还可以将元素或表群当作时对象并定义它们自己的方法。这样,更能显示面向对象的优势。上面所讨论的可以说是面向对象的分析方法。在具体的设计过程当中,还应该采用适当的方式。因为面向对象的思想固然很先进,如果做得不好的话,同样不能达到预期的效果。这主要表现在处理对象与对象的关系上没有做好,对象与对象的层次不分明。如上面所举得关系型数据库得例子,如果在元组层面上得对象过多得考虑一个表对象得因素,或一个表层面上对象过多地考虑一个元组对象的因素,甚至去考虑元素层面上的因素,这些都不是好的面向对象的设计方法。这一点,在语言实现方面,Java 比 C++更有优势,因为它不允许多重继承,从而使对象之间的关系更明确。谁也不会否认 C++的功能>    更强大,但是它也要由次付出巨大代价——当现在代码库发展到一定程度、一定规模时,个对象之间的层次关系将变得异常复杂,给后继使用者得学习、理解带来很大的困难,应用上很难把握。另外,虽

However, object-oriented C ++ with the processing power, but it still retains a lot of process-oriented. You can not use C ++ object-oriented programming ideas to, of course, people do not do so - except for those just C ++ as a C expansion beginners, which planted a hidden danger for the future development. On the one hand who, Java limits a little more.
It's a little far from enough. Engage in the development of a human, by a human development approach is determined. To apply object-oriented approach to develop good software, it must require developers to have a good object-oriented thinking. Good engineers can utilize the proper
tools to develop good software - but not with his use of language tools --Java, C ++, Object Pascal, Ada , etc.

Guess you like

Origin www.cnblogs.com/blogzcc/p/11077276.html