The Object-Oriented Thought Process Third Edition Matt Weisfeld An introduction to object-oriented concepts for developers looking to master modern application practices. Object-oriented programming (OOP) is the foundation of modern programming languages, including C++, Java, C#, and Visual Basic .NET. By designing with objects rather than treating the code and data as separate entities, OOP allows objects to fully utilize other objects’ services as well as inherit their functionality. OOP promotes code portability and reuse, but requires a shift in thinking to be fully understood. Before jumping into the world of object-oriented programming languages, you must first master The Object-Oriented Thought Process . Written by a developer for developers who want to make the leap to object-oriented technologies as well as managers who simply want to understand what they are managing, The Object-Oriented Thought Process provides a solution-oriented approach to object-oriented programming. Readers will learn to understand object-oriented design with inheritance or composition, object aggregation and association, and the difference between interfaces and implementations. Readers will also become more efficient and better thinkers in terms of object-oriented development. This revised edition focuses on interoperability across various technologies, primarily using XML as the communication mechanism. A more detailed focus is placed on how business objects operate over networks, including client/server architectures and web services. “Programmers who aim to create high quality software–as all programmers should–must learn the varied subtleties of the familiar yet not so familiar beasts called objects and classes. Doing so entails careful study of books such as Matt Weisfeld’s The Object-Oriented Thought Process .” –Bill McCarty, author of Java Distributed Objects , and Object-Oriented Design in Java Matt Weisfeld is an associate professor in business and technology at Cuyahoga Community College in Cleveland, Ohio. He has more than 20 years of experience as a professional software developer, project manager, and corporate trainer using C++, Smalltalk, .NET, and Java. He holds a BS in systems analysis, an MS in computer science, and an MBA in project management. Weisfeld has published many articles in major computer trade magazines and professional journals. The Object-Oriented Thought Process, Third Edition......Page 1 Table of Contents......Page 7 Introduction......Page 18 1 Introduction to Object-Oriented Concepts......Page 22 Procedural Versus OO Programming......Page 23 Procedural Programming......Page 26 Object Data......Page 27 Object Behaviors......Page 28 What Exactly Is a Class?......Page 31 Classes Are Object Templates......Page 32 Messages......Page 34 Using UML to Model a Class Diagram......Page 35 Interfaces......Page 36 A Real-World Example of the Interface/Implementation Paradigm......Page 37 A Model of the Interface/Implementation Paradigm......Page 38 Inheritance......Page 39 Abstraction......Page 40 Polymorphism......Page 42 Composition......Page 45 Conclusion......Page 46 Example Code Used in This Chapter......Page 47 2 How to Think in Terms of Objects......Page 54 Knowing the Difference Between the Interface and the Implementation......Page 55 The Implementation......Page 57 An Interface/Implementation Example......Page 58 Using Abstract Thinking When Designing Interfaces......Page 62 Giving the User the Minimal Interface Possible......Page 64 Environmental Constraints......Page 65 Identifying the Public Interfaces......Page 66 Conclusion......Page 67 References......Page 68 Constructors......Page 70 The Default Constructor......Page 71 Using Multiple Constructors......Page 72 The Design of Constructors......Page 76 Checking for Problems and Aborting the Application......Page 77 Throwing an Exception......Page 78 The Concept of Scope......Page 80 Local Attributes......Page 81 Object Attributes......Page 82 Class Attributes......Page 84 Operator Overloading......Page 85 Multiple Inheritance......Page 86 Object Operations......Page 87 References......Page 88 Example Code Used in This Chapter......Page 89 The Name of the Class......Page 92 Attributes......Page 94 Constructors......Page 96 Accessors......Page 97 Private Implementation Methods......Page 100 Example Code Used in This Chapter......Page 101 Modeling Real World Systems......Page 104 The Minimum Public Interface......Page 105 Designing Robust Constructors (and Perhaps Destructors)......Page 106 Designing Error Handling into a Class......Page 107 Documenting a Class and Using Comments......Page 108 Making Names Descriptive......Page 109 Providing a Way to Copy and Compare Objects......Page 110 Keeping the Scope as Small as Possible......Page 111 A Class Should Be Responsible for Itself......Page 112 Designing with Maintainability in Mind......Page 113 Testing the Interface......Page 114 Using Object Persistence......Page 116 Conclusion......Page 117 Example Code Used in This Chapter......Page 118 Design Guidelines......Page 120 Gathering the Requirements......Page 124 Determining the Responsibilities of Each Class......Page 125 Case Study: A Blackjack Example......Page 126 Using CRC Cards......Page 128 Identifying the Blackjack Classes......Page 129 Identifying the Classes’ Responsibilities......Page 132 UML Use-Cases: Identifying the Collaborations......Page 137 First Pass at CRC Cards......Page 141 UML Class Diagrams: The Object Model......Page 143 Conclusion......Page 144 References......Page 145 Reusing Objects......Page 146 Inheritance......Page 147 Generalization and Specialization......Page 150 Design Decisions......Page 151 Composition......Page 152 Representing Composition with UML......Page 153 Why Encapsulation Is Fundamental to OO......Page 155 How Inheritance Weakens Encapsulation......Page 156 Object Responsibility......Page 158 Conclusion......Page 162 Example Code Used in This Chapter......Page 163 Code: To Reuse or Not to Reuse?......Page 168 What Is a Framework?......Page 169 What Is a Contract?......Page 170 Abstract Classes......Page 171 Interfaces......Page 174 Tying It All Together......Page 176 The Compiler Proof......Page 178 Making a Contract......Page 179 An E-Business Problem......Page 182 The Non-Reuse Approach......Page 183 The UML Object Model......Page 185 Example Code Used in This Chapter......Page 190 Composition Relationships......Page 196 Building in Phases......Page 198 Aggregations......Page 200 Associations......Page 201 Using Associations and Aggregations Together......Page 202 Cardinality......Page 203 Multiple Object Associations......Page 206 Optional Associations......Page 207 Tying It All Together: An Example......Page 208 References......Page 209 What Is UML?......Page 210 The Structure of a Class Diagram......Page 211 Attributes......Page 213 Access Designations......Page 214 Inheritance......Page 215 Interfaces......Page 217 Associations......Page 218 Cardinality......Page 221 References......Page 222 Portable Data......Page 224 XML Versus HTML......Page 226 XML and Object-Oriented Languages......Page 227 Sharing Data Between Two Companies......Page 228 Validating the Document with the Document Type Definition (DTD)......Page 229 Integrating the DTD into the XML Document......Page 230 Using Cascading Style Sheets......Page 237 References......Page 240 Persistent Objects Basics......Page 242 Serializing a File......Page 244 Implementation and Interface Revisited......Page 246 Using XML in the Serialization Process......Page 248 Writing to a Relational Database......Page 251 Accessing a Relational Database......Page 253 Making the Connection......Page 255 The SQL Statements......Page 256 Example Code Used in This Chapter......Page 259 Evolution of Distributed Computing......Page 264 Object-Based Scripting Languages......Page 265 A JavaScript Validation Example......Page 267 Objects in a Web Page......Page 270 JavaScript Objects......Page 271 Web Page Controls......Page 272 Movie Players......Page 274 Distributed Objects and the Enterprise......Page 275 The Common Object Request Broker Architecture (CORBA)......Page 276 Web Services Definition......Page 280 Invoice.cs......Page 284 Invoice.vb......Page 285 References......Page 287 Client/Server Approaches......Page 288 Serialized Object Code......Page 289 Client Code......Page 290 Server Code......Page 292 Running the Proprietary Client/Server Example......Page 293 Object Definition Code......Page 295 Client Code......Page 297 Server Code......Page 298 Conclusion......Page 300 Example Code Used in This Chapter......Page 301 15 Design Patterns......Page 304 Why Design Patterns?......Page 305 Smalltalk’s Model/View/Controller......Page 306 Types of Design Patterns......Page 307 Creational Patterns......Page 308 Structural Patterns......Page 312 Behavioral Patterns......Page 315 Antipatterns......Page 316 References......Page 317 Example Code Used in This Chapter......Page 318 A......Page 326 B......Page 327 C......Page 328 D......Page 333 F......Page 335 I......Page 336 J......Page 337 M......Page 338 N......Page 339 O......Page 340 P-Q......Page 343 S......Page 344 U......Page 346 X-Y-Z......Page 347 This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version. The Object-Oriented Thought Process Third Edition Matt Weisfeld An introduction to object-oriented concepts for developers looking to master modern application practices. Object-oriented programming (OOP) is the foundation of modern programming languages, including C++, Java, C#, and Visual Basic.NET. By designing with objects rather than treating the code and data as separate entities, OOP allows objects to fully utilize other objects'services as well as inherit their functionality. OOP promotes code portability and reuse, but requires a shift in thinking to be fully understood. Before jumping into the world of object-oriented programming languages, you must first master The Object-Oriented Thought Process. Written by a developer for developers who want to make the leap to object-oriented technologies as well as managers who simply want to understand what they are managing, The Object-Oriented Thought Process provides a solution-oriented approach to object-oriented programming. Readers will learn to understand object-oriented design with inheritance or composition, object aggregation and association, and the difference between interfaces and implementations. Readers will also become more efficient and better thinkers in terms of object-oriented development. This revised edition focuses on interoperability across various technologies, primarily using XML as the communication mechanism. A more detailed focus is placed on how business objects operate over networks, including client/server architectures and web services. “Programmers who aim to create high quality software–as all programmers should–must learn the varied subtleties of the familiar yet not so familiar beasts called objects and classes. Doing so entails careful study of books such as Matt Weisfeld's The Object-Oriented Thought Process.” –Bill McCarty, author of Java Distributed Objects, and Object-Oriented Design in Java Matt Weisfeld is an associate professor in business and technology at Cuyahoga Community College in Cleveland, Ohio. He has more than 20 years of experience as a professional software developer, project manager, and corporate trainer using C++, Smalltalk,.NET, and Java. He holds a BS in systems analysis, an MS in computer science, and an MBA in project management. Weisfeld has published many articles in major computer trade magazines and professional journals.
the Object-oriented Thought Process Is A Concise And Readable Primer. Matt Weisfeld's Years Of Programming, Teaching, And Writing Have Given Him A Flair For Presenting Highly Technical Topics In A Clear And Interesting Manner. He Is Able To Blend Abstract Concepts With Ingenious Examples And Clear Illustrations To Quickly Teach Powerful Oop Techniques. The Code Examples Are Written In Java And Uml But Are Designed In Such A Way That A Reader With No Previous Experience Will Still Understand Them. The Object-oriented Thought Process Is A Clear And Accessible Alternative To The Often Dry And Overly Dense Books Available On The Market Today.
- a Concise But Complete Introduction To Object-oriented Concepts With Code Examples In Java And Uml
- excellent Primer For Professional Developers Moving To Object-oriented Languages, As Well As Cs Students
booknews
introduces The Fundamental Object-oriented Concepts To Experienced Programmers Interested In Learning Object-oriented Programming Languages. Class Design, Inheritance, Composition, Interfaces, And Abstract Classes Are Covered. Annotation C. Book News, Inc., Portland, Or (booknews.com)
"Written by a developer for developers who want to make the leap to object-oriented technologies as well as managers who simply want to understand what they are managing, the Object Oriented Thought Process provides a solution-oriented approach to object-oriented programming. Readers will learn to understand object-oriented design with inheritance or composition, object aggregation and association, and the difference between interfaces and implementations. Readers will also become more efficient and better thinkers in terms of object-oriented development." This revised edition focuses on interoperability across various technologies, primarily using XML as the communication mechanism. A more detailed focus is placed on how business objects operate over networks, including client/server architectures and web services. The Object-Oriented Thought Process, Second Edition will lay the foundation in object-oriented concepts and then explain how various object technologies are used. Author Matt Weisfeld introduces object-oriented concepts, then covers abstraction, public and private classes, reusing code, and devloping frameworks. Later chapters cover building objects that work with XML, databases, and distributed systems (including EJBs, .NET, Web Services and more).Throughout the book Matt uses UML, the standard language for modeling objects, to provide illustration and examples of each concept. This work is an introduction to object-oriented concepts for developers looking to master modern application practices. Readers will learn to understand object-oriented design with inheritance or composition, object aggregation and association, and the difference between interfaces and implementations