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
《大话数据结构》内容简介:本书为超级畅销书《大话设计模式》作者程杰潜心三年推出的扛鼎之作!以一个计算机教师教学为场景,讲解
计算机绘图AutoCAD2005-2007中文版 内容简介 本书以AutoCAD 2005中文版为基础,详细介绍了AutoCAD平面绘图、三维立体建模和灯光、材...
《机电设备维护与管理》内容简介:本书列入“十三五”江苏省高等学校重点教材,分为上下两篇,上篇为设备维护部分,下篇为设备管理
深入理解SOA与Web服务,对SOA进行全面介绍的实践指南:简化基础设施,发挥最大的机动性这是一本关于使用面向服务的架构(SOA,Se
mongodb如何帮你管理通过web应用收集的海量数据呢?通过本书的权威解读,你会了解面向文档数据库的诸多优点,会发现mongodb如此稳
《21天学通JavaWeb开发》是JavaWeb开发的基础教程,针对没有接触过或还不是特别熟悉JavaWeb开发的读者,详细介绍了JavaWeb开发的
《从零开始学Android开发》内容简介:本书从基本的Java语法开始讲解,通过具体的实例介绍Android开发的全过程,从零基础到进阶全覆
本书详细地介绍使用TurboGears的丰富特殊性来实现更加快速的Web应用程序开发。主要内容包括TurboGears基础知识、SQLObject与Turb
《住宅精细化设计》为作者针对住宅设计要点的长期研究的总结。书中就住宅精细化设计过程中的方法、意义和建议等问题,围绕我国住
《曹操传》内容简介:曹操是个历史评价非常复杂的人物,他战黄巾,讨董卓,剿灭吕布、袁术、公孙瓒,击败袁绍,收降刘琮、张绣等,
四级网络工程师-全国计算机等级考试实用应试教程-最新版-含光盘1张 本书特色 本书紧扣*新版考试大纲,以高教版教程为基础,结合编者多年从事命题、阅卷及培...
《马克思主义异化理论的当代诠释》内容简介:异化概念贯穿马克思思想体系发展的始终,马克思的异化理论对于社会现象和问题一直具有
《光线跟踪算法技术》详细阐述了与光线跟踪问题相关的高效解决方案及相应的数据结构和算法,主要包括采样技术、投影视图、视见系
2010年編輯最愛商業書籍。──財富雜誌2010年書評最愛書籍。──紐約客雜誌2010年度商業與投資類十大好書。──亞馬遜書店2010年
《成长比成功更重要(增订本)》内容简介:微软亚洲研究院聚集着计算机领域许多世界一流的科学家,他们每一个人都被称为天才,但是
远程接入网络疑难解析 本书特色 本书适用面向日常工作需要的网络管理者或者管理员、网络或咨询工程师以及远程接入咨询师。同时本书适合为希望获得CCNP和CCIE证书...
《白孔雀》内容简介:“劳伦斯经典系列”由《儿子与情人》《恋爱中的女人》《骑马出走的女人》《白孔雀》四本组成,由国内劳伦斯研
奈良美智出生於1959年12月5日,日本青森縣弘前市人。是日本現代美術界極具影響力的畫家。1981~1988年在愛知縣立藝術大學和研究所
《JavaEE6权威指南:基础篇(第4版)》是任务导向、示例驱动的JavaEE6基础教程,讲述如何开发企业应用,并作为第4版加入了很多新内容
3ds MAX三维效果图制作案例教程 内容简介 本书是一本面向3DS MAX效果图制作初学者的书,本书根据3ds Max 9软件和效果图制作的特点,,由优秀效果...