Product Description
Here is the first object-oriented development book to provide specific experience-based guidelines to help developers make the right design decisions. This book offers the next step for readers that know the basics of object-oriented development and now need to know if they are doing it right and making the right choices.
From the Inside Flap
In the process of teaching object-oriented analysis, design, and implementation to several thousand students, it became clear to me that the industry was in serious need of guidelines to help developers make proper decisions. Since 1987 I have scoured the literature in search of productivity and complexity metrics that can be applied at different levels of development to improve an object-oriented application. I added my own "homemade" guidelines to those found in the literature and came up with approximately 60 guidelines, several of which are tongue-in-cheek yet no less important than any others. I briefly considered calling them the "Sixty Golden Rules of OOA/D," but I recalled Dykstra's legendary "Goto Considered Harmful" paper, which branded users of goto statements heretics who should be burned at the stake in the company courtyard. That paper was important in that it provided an industry rule that stopped the users of goto statements who were destroying, wittingly or unwittingly, the maintainability of their systems. Unfortunately, the side effect of such a rule was the breeding of a group of pathological authors who, for the past 25 years, have published articles stating that the judicious use of a goto statement in some picky little piece of an application is more readable than a corresponding piece of structured code. Of course, these papers were followed up by a half-dozen rebuttal papers, which were themselves rebutted ad nauseam.
In order to prevent the same pathology from occurring, I refer to these 60 guidelines as "heuristics," or rules of thumb. They are not hard and fast rules that must be followed under penalty of heresy. Instead, they should be thought of as a series of warning bells that will ring when violated. The warning should be examined, and if warranted, a change should be enacted to remove the violation of the heuristic. It is perfectly valid to state that the heuristic does not apply in a given example for one reason or another. In fact, in many cases, two heuristics will be at odds with one another in a particular area of an object-oriented design. The developer is required to decide which heuristic plays the more important role.
This book does not invent yet another object-oriented analysis or design methodology, though the idea of creating "Riel's OOA/D Methodology" was tempting. The industry already has enough methodologies offering similar or overlapping advice, using a completely different vocabulary for common concepts. The typical problem of the object-oriented developer - which has not been seriously addressed - occurs once a design has been completed, regardless of the methodology used. The developer's main question is, "Now that I have my design, is it good, bad, or somewhere in between?" In asking an object-oriented guru, the developer is often told that a design is good when "it feels right." While this is of little use to the developer, there is a kernel of truth to such an answer. The guru runs through a subconscious list of heuristics, built up through his or her design experience, over the design. If the heuristics pass, then the design feels right, and if they do not pass, then the design does not feel right.
This book attempts to capture that subconscious list of heuristics in a concrete list backed up by real-world examples. The reader will become immediately aware that some heuristics are much stronger than others. The strength of a heuristic comes from the ramifications of violating it. The reader does not get a prioritized ordering of the heuristics. It is my feeling that in many cases the sense of priority is defined by a combination of the application domain and the user's needs and cannot be quantified here. For example, a common area of design where two heuristics might request opposite directions are those that trade complexity with flexibility. Ask yourself which attribute a software designer desires most, increased flexibility or decreased complexity, and you begin to see the problem of prioritizing heuristics.
The design heuristics are defined on a backdrop of real-world examples focusing on the area of design to which each heuristic belongs. The foundation of real-world examples provides an ideal vehicle for explaining the concepts of object-oriented technology to the novice. The end result is that this book is appropriate to the newcomer who would like a fast track to understanding the concepts of object-oriented programming without having to muddle through the proliferation of buzzwords that permeates the field. Yet, at the same time, it appeals to the experienced object-oriented developer who is looking for some good analysis and design heuristics to help in his or her development efforts.
The first chapter looks at the motivation for object-oriented programming, starting with several issues which Frederick Brooks argued in his "No Silver Bullet" paper published in 1987 (see reference 1). My perspective on object-oriented programming is that it is a natural progression or evolution from action-oriented development. As software has become more complex, we are required to remove ourselves one more level away from the machine in order to maintain the same grasp we have on the software development process. Just as structured methodologies removed one level from bottom-up programming, object-oriented technology removes one level from structured methodologies. It is not that bottom-up programming or structured methodologies are wrong and object-oriented programming is right. Bottom-up programming is perfectly valid when there exists only 4K of memory to develop, just as structured methodologies are perfectly valid when only 256K of memory exists. With the advent of increasingly cheaper and more powerful hardware, the complexity of software has skyrocketed. Developers of the early 1980s did not have to consider the complexity of graphical user interfaces and multithreaded applications; simpler menu-driven, single-threaded systems were the norm. In the very near future, no one will buy a software product unless it incorporates multimedia with moving video and voice recognition. The more complex systems require a greater level of abstraction, which the object-oriented paradigm provides. This is no revolution in software development; it is simply an evolution.
Chapter 2 discusses the concepts of class and object, the basic building blocks of object-oriented technology. They are viewed as the encapsulation of data and its related behavior in a bidirectional relationship. The notion of sending messages, defining methods, and inventing protocols are explored through real-world examples. This is the first chapter to list heuristics. Given the small subset of the object paradigm with which to work, these heuristics are fairly simple but no less useful than the more complex heuristics of subsequent chapters.
The third chapter examines the difference between an action-oriented topology and an object-oriented topology. The different topologies of these methodologies contain the kernel of truth behind object-oriented development. Action-oriented development focuses largely on a centralized control mechanism controlling a functionally decomposed set of tasks, while object-oriented development focuses on a decentralized collection of cooperating entities. I am convinced that the notion of a paradigm shift is the change in thinking required to move from a centralized to a decentralized control model. The learning curve of object-oriented development is an equally large unlearning curve for those of us reared in the world of action-oriented development. The real world in which we live is more attuned to the object model than to a centralized control mechanism. The lack of a paradigm shift manifests itself in systems that consist of a central godlike object that sits in the middle of a collection of trivial classes. These systems are built by developers stuck in the mindset of an action-oriented topology. This chapter proposes numerous heuristics for developing optimal application topologies.
Chapters 4 through 7 examine each of the five main object-oriented relationships: uses (Chapter 4); containment (Chapter 4); single inheritance (Chapter 5); multiple inheritance (Chapter 6); and association (Chapter 7) through a series of real-world examples. Most of the heuristics of interest to the object-oriented designer can be found in these chapters. The chapters on inheritance include many examples of the common misuses of the inheritance relationship. This information is vital in reducing the proliferation of classes problem, such as designing too many classes for a given application. The class proliferation problem is a major cause of failure in object-oriented development.
Chapter 8 examines the role of class-specific data and behavior, as opposed to object-specific data and behavior. The invoice class is used as an example of an abstraction that requires class-specific data and behavior. Both the SmallTalk metaclass and the C++ keyword mechanisms are illustrated. In addition, the notion of C++ metaclasses (i.e., templates) is compared and contrasted to the SmallTalk notion
《文化翻译与经典阐释(增订本)》内容简介:本书是作者的一部专题研究文集,分为上中下三编:上编“翻译的文化学反思”,首次在中
《建筑师与设计师视觉笔记》旨在鼓励视觉表达,其理念基于这样一种观点,即视觉修养与文字修养同等重要。为了开拓表达视觉信息的
《Java面向对象编程》内容由浅入深,紧密结合实际,利用大量典型实例,详细讲解Java面向对象的编程思想、编程语法和设计模式,介
《建筑计划学》是作者基于多年来从事建筑计划学研究的成果及教学、工作实践的经验,同时广泛参考国内外建筑计划学专著、教材和相
《微课设计与制作一本通》内容简介:本书分为“微课视频的设计和制作”“微课视频制作软件”上下两篇,上篇介绍微课设计的基本概念
《中国布衣(精编本)》内容简介:中国民间社会,有一种布衣精神。它指的是那些特立独行于帝阙与儒林之外者,无名有品,无位有尊。
EXCEL应用大全 本书特色 《Excel应用大全》一书适合各个层次的Excel用户,即可作为初学者的入门指南,又可作为中、高级用户的参考手册。书中大量的实例还...
《语文课超有趣:部编本语文教材同步学(五年级·下册)》内容简介:从小学到初中,每个年级、每一篇课文都配有若干拓展阅读的文章
《Processing开发实战》内容简介:Processing简单易学的界面和编程风格,使很多机器人爱好者或电子制作爱好者,可以借助它完成机器
《日志管理与分析(第2版)》内容简介:本书基于主流日志管理与分析系统的设计理念,完善、透彻地对日志分析各流程模块的原理与实现
《无穷的远方,无数的人们,都和我有关》内容简介:《无穷的远方,无数的人们,都和我有关:鲁迅散文随笔精选》由著名学者、鲁迅研
本书深入阐述了能使UNIX操作系统发挥出量大功效的软件设计方法,对UNIX编程的精髓进行了清晰易懂的介绍。两位作者具有多年教学与
The Adobe Illustrator CS2 Wow!Book 内容简介 本书由基础、提示、练习、技巧、画廊和参考资料等六个部分融合而成,每部分都是Ill...
《数据库基础与应用》内容简介:本书以Access 2010中文版为平台,从实际操作和应用的角度出发,以培养职业能力为目标,通过具体的应
《gRPC与云原生应用开发:以Go和Java为例》内容简介:本书全面介绍了gRPC,可作为终极指南,用于gRPC应用程序开发周期的各个阶段。
《科学哲学(中文版)》内容简介:何为科学?科学是否客观?科学能否解释一切?本书为当代科学哲学中的主要问题提供了一幅清晰准确
《以兴趣为职业的“记”者:方汉奇传》内容简介:方汉奇是中国人民大学荣誉一级教授,是中国新闻学最早的三位博士生导师之一,在中
《去台北》内容简介:一本极具实用性、权威性、审美性和文化性的台北旅游导览。一本令人充分领略台北文艺之美、美食之美、茶道之美
《HTML+CSS+JavaScript网页设计与布局实用教程》紧密围绕网页设计师在制作网页过程中实际需要掌握的技术,全面介绍了使用html、c
《Excel VBA应用与技巧大全》内容简介:Excel是应用最广泛的办公软件之一,它大大提高了办公人员的工作效率。但是各行各业的办公需