面向对象的思考过程的评论
None
我看的是英文版,这是我在英文版下的评论,在这儿再复制一下~~
这本书是我在Kindle上看的第一本书~~,买了Kindle后将上个世纪出版的一些OO著作都download下来了,准备好好补充一下OO的基础知识。刚看完OO启思录,然后看这本比较薄,然后就开始看这本。现在还没看完,不过有些话想说说。 这本书名为面向对象的思考过程,作者是提出了很多思考的方法,比如如何进行封装,比如如何做到复用程度高,要想更好的复用,就要提取更抽 象的接口,接口越“抽象”(当然,这里不是指的abstract关键字),复用程度就越高,越具体复用程度就越低,这个看法我是认同的,但是作者稍候举了 一个例子,我却觉得这个例子举的不太合适: 开发一个计程车对象,如果你提供一个“去机场”的接口将要比“向左转,向右转”等接口有更好的复用性,因为“去机场”这个接口更抽象。 我之所以说这个示例不合适,是因为这又涉及接口的粒度的问题,相比“去机场”而言,“向左转,向右转”粒度更细,更细的接口一般复用程度更高。 还有,作者在第一章一直强调封装的重要性,要做到数据隐藏,我们就要少暴露对象的内部信息。但是作者的代码示例却是getter和 setter,难道以一个public的getter和setter封装对数据的访问就是所谓的封装么?我并不这样认为。我写了一篇博客讨论这个问 题:http://www.cnblogs.c 随意的使用getter和setter并不能达到封装的目的,仅仅是为了遮人耳目而已。 总体上来说,本书的思维讨论过程还是好的,但是示例却不怎么样,先就谈论这么多吧,继续阅读。 Of these more advanced books, one of my favorites remains Object-Oriented Design in Java by Stephen Gilbert and Bill McCarty. I really like the approach of the book, and have used it as a textbook in classes I have taught on OO concepts. I cite O bject-Oriented De- sign in Java often throughout this book, and I recommend that you graduate to it after you complete this one. Other books that I have found very helpful include Effective C++by Scott Meyers, Classical and Object-Oriented Software Engineering by Stephen R. Schach, Thinking in C++ by Bruce Eckel, UML Distilled by Martin Flower, and Java Design by Peter Coad and Mark Mayfield. The conceptual nature of this book provides a unique perspective in regards to other computer technology books.While books that focus on specific technologies, such as programming languages, struggle with the pace of change, this book has the luxury of presenting established concepts that, while certainly being fine-tuned, do not experience radical changes.With this in mind, many of the books that were referenced several years ago, are still referenced because the concepts are still fundamentally the same. |
|