Reading [The Object-Oriented Thought Process] Introduction

// 写在前面 TimeStamp: 2005-3-27

在developer.com上看到Matt Weisfeld关于OO的帖子,觉得不错
其中提到:

This is the fifth installment in a series of articles about fundamental object-oriented (OO) concepts. The material presented in these articles is partially excerpted from the second edition of my book, The Object-Oriented Thought Process, 2nd edition. The Object-Oriented Thought Process is intended for anyone who needs to understand the basic object-oriented concepts before jumping into the code.

于是顺藤摸瓜找到那本书
发现中国也有人译了这本书,不过看封面和译者就不敢奢望什么了
还是自己看看原版吧,一来比较地道,二来锻炼一下英语,嘿嘿
我会将一些精彩重要的段落以中英对照的形式blog出来

// 写在前面 TimeStamp: 2005-3-28

Table of Contents

     Copyright

     Developer's Library

     About the Author

     Acknowledgments

     We Want to Hear from You!

     Introduction

        This Book's Scope

        What's New in the Second Edition

        The Intended Audience

        This Book's Scope

        This Book's Conventions

        Source Code Used in this Book

这是书的起始部分,来了解一下作者本人和作者写这本书的意图

我会给出比较重要的原文,然后给出概括以及我的一些想法。

About the Author

Matt Weisfeld is an assistant professor at Cuyahoga Community College (Tri-C) in Cleveland, Ohio. Matt is a member of the information technology faculty, teaching programming languages such as C++, Java, and C# .NET. Prior to joining Tri-C, Matt spent 20 years in the information technology industry gaining experience in software development, project management, business development, corporate training, and part-time teaching. Matt holds an M.S. in computer science and an MBA in project management. Besides the first edition of The Object-Oriented Thought Process, Matt has published two other computer books, and more than a dozen articles in magazines and journals such as Dr. Dobb's Journal, The C/C++ Users Journal, Software Development Magazine, Java Report, and the international journal Project Management. Matt has presented at conferences throughout the United States and Canada.

关于作者

可见,老大Matt Weisfeld还是很强的,拥有丰富的理论实践经验,并在教育方面也颇有心得。在Dr. Dobb's JournalThe C/C++ Users JournalSoftware Development MagazineJava Report the international journal Project Management上发表了more than a dozen的文章,多次出席美国和加拿大研讨会。

This Book's Scope

As the title suggests, this book is about the object-oriented (OO) thought process. Obviously, choosing the theme and title of the book are important decisions; however, these decisions were not all that simple. Numerous books deal with one level or another of object orientation. Several popular books deal with topics including OO analysis, OO design, OO programming, design patterns, OO databases, the Unified Modeling Language (UML), various OO programming languages, and many other topics related to OO programming.

 

However, while poring over all of these books, many people forget that each one of these topics are built on a single foundation: how you think in OO ways. It is unfortunate, but often software professionals dive into these books without taking the appropriate time and effort to really understand the concepts in them.

I contend that learning OO concepts is not accomplished by learning a specific development method or a set of tools. Doing things in an OO manner is, simply put, a way of thinking. This book is all about the OO thought process.

Separating the methods and tools from the OO thought process is not easy. Many people are introduced to OO concepts via one of these methods or tools. Many C programmers were first introduced to object orientation by migrating directly to C++—before they were even remotely exposed to OO concepts. Some software professionals were first introduced to object orientation by presentations that included object models using UML—again, before they were even exposed directly to OO concepts.

It is important to understand the significant difference between learning OO concepts and using the methods and tools that support the paradigm. In his article "What the UML Is—and Isn't," Craig Larman states

Unfortunately, in the context of software engineering and the UML diagramming language, acquiring the skills to read and write UML notation seems to sometimes be equated with skill in object-oriented analysis and design. Of course, this is not so, and the latter is much more important than the former. Therefore, I recommend seeking education and educational materials in which intellectual skill in object-oriented analysis and design is paramount rather than UML notation or the use of a case tool. 

Although learning a modeling language is an important step, it is much more important to learn OO skills first. Learning UML before OO concepts is similar to learning how to read an electrical diagram without first knowing anything about electricity.

 

The same problem occurs with programming languages. As stated earlier, many C programmers moved into the realm of object orientation by migrating to C++ before being directly exposed to OO concepts. Many times developers who claim to be C++ programmers are simply C programmers using C++ compilers.

 

This problem is even more of an issue now that object-oriented languages like Java, C# .NET, Visual Basic .NET, and so on have become so popular. There are many Visual Basic programmers who now must make the leap to Visual Basic .NET. Likewise, many C++ programmers, who might not be conforming to strict OO practices, are being asked to migrate to Java or C#, where they have no choice but to think in OO ways.

Early versions of Visual Basic are not OO. C is not OO, and C++ was developed to be backward compatible with C. Because of this, it is quite possible to use a C++ compiler writing only C syntax while forsaking all of C++'s OO features. Even worse, a programmer can use just enough OO features to make a program incomprehensible to OO and non-OO programmers alike.

Thus, it is of vital importance that while you're on the road to OO development, you first learn the fundamental OO concepts. Resist the temptation to jump directly into a programming language (such as C++, C# or Java) or a modeling language (such as UML), and take the time to learn the object-oriented thought process.

This book is a concepts book intended to introduce programmers to object-oriented technologies. One of these audiences is, of course, structured programmers making the leap to O-O. Thus, I have included some material that is, in fact, a bridge between structured and object-oriented technologies. Chapter 6 is a good example of this approach - I have included techniques that will be familiar to structured programmers. It is important to understand that Object-oriented and structured practices are not mutually exclusive. Structured techniques are used throughout O-O designs (just consider a for loop or if statement).

In my first class in Smalltalk in the late 1980s, the instructor told the class that the new OO paradigm was a totally new way of thinking. He went on to say that although all of us were most likely very good programmers, about 10%–20% of us would never really grasp the OO way of doing things. If this statement is indeed true, it is most likely because some people never really take the time to make the paradigm shift and learn the underlying OO concepts.

 本书范围

// 这一段挺重要的,所以我把原文全部贴出来了,作者阐述了他写本书的原由和动机。

概括一下就是说老大认为我们学习OOA/OOD/OOP/UML/DesignPattern是建立在 [如何用OO的方法去思考]这一基础上的。但不幸的是书里没说清楚很多人也不懂,事实也的确如此。我们总以为会用UML画图,会用类,继承,接口就是在面向对象了。

其中说到UML类似于电路图,在看电路图之前你总得应该了解一些电学知识。

在通往OO开发的路上,直接学编程语言(C++/JAVA)或是辅助语言类似UML是不正确的。在这之前必须静下心来花些时间学习一下面向对象思考方法。

补充一些我的想法:

其实老大所说的和我想的方向还是一致的,我写C++也快3年了,我相信会有很多人和我一样认为用了C++/JAVA就已经走上面向对象的康庄大道了,用的都是类,继承,接口,哪一样不都是面向对象所提倡的,时不时还用个模式,画画UML图,侃起来一套一套的,不错啦!我们已经很OO了。还需要理论吗?那都是象牙塔里的东东吧,哪有时间学,项目都来不及做。我曾经看到有人把全局函数和全局变量放到一个类中,将全局函数改为这个类的方法,将全局变量改为成员就算把一个类写成了。Uups,这怎么行啊,还是跟着老大学学OO的思考方法吧。

Let's Go!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值