Cantitate/Preț
Produs

The Object-Oriented Thought Process: Developer's Library

Autor Matt A. Weisfeld
en Limba Engleză Paperback – 31 mar 2013
The Object-Oriented Thought Process, Fourth Edition With added coverage of Objective-C and new material on the use of objects in portable data, web services, and mobile app development Object-oriented programming (OOP) is the foundation of modern programming languages, including C , Java, C#, Visual Basic .NET, Ruby and Objective-C. Objects also form the basis for many web technologies such as JavaScript, Python, and PHP. It is of vital importance to learn the fundamental concepts of object orientation before starting to use object-oriented development environments. OOP promotes good design practices, code portability, and reuse. But it requires a shift in thinking to be fully understood. Programmers new to OOP should resist the temptation to jump directly into a particular programming language (such as Objective-C, VB .NET, C , C# .NET, or Java) or a modeling language (such as UML), and instead first take the time to learn what author Matt Weisfeld calls "the object-oriented thought process."Written by a developer for developers who want to make the leap to object-oriented technologies, The Object-Oriented Thought Process provides a solutions-oriented approach to object-oriented programming. Readers will learn to understand the proper uses of inheritance and composition, the difference between aggregation and association, and the important distinction between interfaces and implementations. While programming technologies have been changing and evolving over the years, object-oriented concepts remain a constant - no matter what the platform. This revised edition focuses on the interoperability across programming technologies, whether you are using objects in traditional application design, in XML-based data transactions, in web page development, in mobile apps, or in any modern programming environment.
Citește tot Restrânge

Din seria Developer's Library

Preț: 23939 lei

Preț vechi: 29924 lei
-20% Nou

Puncte Express: 359

Preț estimativ în valută:
4581 4754$ 3829£

Carte indisponibilă temporar

Doresc să fiu notificat când acest titlu va fi disponibil:

Preluare comenzi: 021 569.72.76

Specificații

ISBN-13: 9780321861276
ISBN-10: 0321861272
Pagini: 336
Ilustrații: Illustrations
Dimensiuni: 175 x 226 x 20 mm
Greutate: 0.52 kg
Ediția:Revised
Editura: Addison-Wesley Professional
Seria Developer's Library


Cuprins

In> This Book's Scope 1 What's New in the Fourth Edition 2 The Intended Audience 3 The Book's Approach 3 This Book's Conventions 4 Source Code Used in This Book 4 1 Introduction to Object-Oriented Concepts 5 The Fundamental Concepts 5 Objects and Legacy Systems 6 Procedural Versus OO Programming 7 Moving from Procedural to Object-Oriented Development 11 Procedural Programming 11 OO Programming 12 What Exactly Is an Object? 12 Object Data 12 Object Behaviors 13 What Exactly Is a Class? 17 Creating Objects 18 Attributes 19 Methods 20 Messages 20 Using Class Diagrams as a Visual Tool 20 Encapsulation and Data Hiding 21 Interfaces 21 Implementations 22 A Real-World Example of the Interface/Implementation Paradigm 23 A Model of the Interface/Implementation Paradigm 23 Inheritance 25 Superclasses and Subclasses 26 Abstraction 26 Is-a Relationships 27 Polymorphism 28 Composition 31 Abstraction 32 Has-a Relationships 32 Conclusion 32 Example Code Used in This Chapter 33 The TestPerson Example: C# .NET 33 The TestShape Example: C# .NET 34 2 How to Think in Terms of Objects 37 Knowing the Difference Between the Interface and the Implementation 38 The Interface 40 The Implementation 40 An Interface/Implementation Example 41 Using Abstract Thinking When Designing Interfaces 45 Providing the Absolute Minimal User Interface Possible 47 Determining the Users 48 Object Behavior 49 Environmental Constraints 49 Identifying the Public Interfaces 49 Identifying the Implementation 50 Conclusion 51 References 51 3 Advanced Object-Oriented Concepts 53 Constructors 53 When Is a Constructor Called? 54 What's Inside a Constructor? 54 The Default Constructor 55 Using Multiple Constructors 55 The Design of Constructors 60 Error Handling 60 Ignoring the Problem 60 Checking for Problems and Aborting the Application 61 Checking for Problems and Attempting to Recover 61 Throwing an Exception 61 The Importance of Scope 64 Local Attributes 64 Object Attributes 65 Class Attributes 67 Operator Overloading 69 Multiple Inheritance 70 Object Operations 70 Conclusion 72 References 72 Example Code Used in This Chapter 72 The TestNumber Example: C# .NET 72 4 The Anatomy of a Class 75 The Name of the Class 75 Comments 77 Attributes 77 Constructors 79 Accessors 81 Public Interface Methods 83 Private Implementation Methods 84 Conclusion 84 References 85 Example Code Used in This Chapter 85 The TestCab Example: C# .NET 85 5 Class Design Guidelines 87 Modeling Real-World Systems 87 Identifying the Public Interfaces 88 The Minimum Public Interface 88 Hiding the Implementation 89 Designing Robust Constructors (and Perhaps Destructors) 90 Designing Error Handling into a Class 91 Documenting a Class and Using Comments 91 Building Objects with the Intent to Cooperate 92 Designing with Reuse in Mind 92 Designing with Extensibility in Mind 93 Making Names Descriptive 93 Abstracting Out Nonportable Code 94 Providing a Way to Copy and Compare Objects 94 Keeping the Scope as Small as Possible 94 A Class Should Be Responsible for Itself 96 Designing with Maintainability in Mind 97 Using Iteration in the Development Process 98 Testing the Interface 98 Using Object Persistence 100 Serializing and Marshaling Objects 101 Conclusion 102 References 102 Example Code Used in This Chapter 102 The TestMath Example: C# .NET 102 6 Designing with Objects 105 Design Guidelines 105 Performing the Proper Analysis 109 Developing a Statement of Work 109 Gathering the Requirements 109 Developing a Prototype of the User Interface 110 Identifying the Classes 110 Determining the Responsibilities of Each Class 110 Determining How the Classes Collaborate with Each Other 110 Creating a Class Model to Describe the System 111 Prototyping the User Interface 111 Object Wrappers 111 Structured Code 112 Wrapping Structured Code 113 Wrapping Nonportable Code 115 Wrapping Existing Classes 116 Conclusion 117 References 117 7 Mastering Inheritance and Composition 119 Reusing Objects 119 Inheritance 120 Generalization and Specialization 124 Design Decisions 124 Composition 126 Representing Composition with UML 127 Why Encapsulation Is Fundamental to OO 129 How Inheritance Weakens Encapsulation 130 A Detailed Example of Polymorphism 132 Object Responsibility 132 Abstract Classes, Virtual Methods, and Protocols 136 Conclusion 138 References 138 Example Code Used in This Chapter 138 8 Frameworks and Reuse: Designing with Interfaces and Abstract Classes 141 Code: To Reuse or Not to Reuse? 141 What Is a Framework? 142 What Is a Contract? 144 Abstract Classes 145 Interfaces 147 Tying It All Together 149 The Compiler Proof 152 Making a Contract 153 System Plug-in Points 155 An E-Business Example 155 An E-Business Problem 155 The Non-Reuse Approach 156 An E-Business Solution 158 The UML Object Model 158 Conclusion 163 References 163 Example Code Used in This Chapter 163 The TestShop Example: C# .NET 164 9 Building Objects and Object-Oriented Design 167 Composition Relationships 168 Building in Phases 169 Types of Composition 171 Aggregations 172 Associations 172 Using Associations and Aggregations Together 174 Avoiding Dependencies 174 Cardinality 175 Multiple Object Associations 178 Optional Associations 178 Tying It All Together: An Example 179 Conclusion 181 References 181 10 Creating Object Models 183 What Is UML? 183 The Structure of a Class Diagram 184 Attributes and Methods 186 Attributes 186 Methods 186 Access Designations 187 Inheritance 188 Interfaces 190 Composition 191 Aggregations 191 Associations 192 Cardinality 194 Conclusion 195 References 196 11 Objects and Portable Data: XML and JSON 197 Portable Data 197 The Extensible Markup Language (XML) 199 XML Versus HTML 199 XML and Object-Oriented Languages 200 Sharing Data Between Two Companies 202 Validating the Document with the Document Type Definition (DTD) 202 Integrating the DTD into the XML Document 204 Using Cascading Style Sheets 210 JavaScript Object Notation (JSON) 212 Conclusion 217 References 217 12 Persistent Objects: Serialization, Marshaling, and Relational Databases 219 Persistent Objects Basics 219 Saving the Object to a Flat File 221 Serializing a File 222 Implementation and Interface Revisited 224 What About the Methods? 225 Using XML in the Serialization Process 226 Writing to a Relational Database 228 Accessing a Relational Database 230 Conclusion 232 References 232 Example Code Used in This Chapter 233 The Person Class Example: C# .NET 233 13 Objects in Web Services, Mobile Apps, and Hybrids 237 Evolution of Distributed Computing 237 Object-Based Scripting Languages 238 A JavaScript Validation Example 241 Objects in a Web Page 244 JavaScript Objects 245 Web Page Controls 247 Sound Players 248 Movie Player 248 Flash 249 Distributed Objects and the Enterprise 249 The Common Object Request Broker Architecture (CORBA) 251 Web Services Definition 254 Web Services Code 258 Representational State Transfer (ReST) 260 Conclusion 261 References 261 14 Objects and Client/Server Applications 263 Client/Server Approaches 263 Proprietary Approach 264 Serialized Object Code 264 Client Code 265 Server Code 267 Running the Proprietary Client/Server Example 268 Nonproprietary Approach 270 Object Definition Code 271 Client Code 272 Server Code 273 Running the Nonproprietary Client/Server Example 275 Conclusion 276 References 276 Example Code Used in This Chapter 276 15 Design Patterns 277 Why Design Patterns? 278 Smalltalk's Model/View/Controller 279 Types of Design Patterns 280 Creational Patterns 281 Structural Patterns 286 Behavioral Patterns 288 Antipatterns 290 Conclusion 290 References 291 Example Code Used in This Chapter 291 C# .NET 291 Index 297

Notă biografică

Matt Weisfeld is a college professor, software developer, and author based in Cleveland, Ohio. Prior to teaching college full time, he spent 20 years in the information technology industry as a software developer, entrepreneur, and adjunct professor. Weisfeld holds an MS in computer science and an MBA. Besides the first three editions of The Object-Oriented Thought Process, he has authored two other software development books and published many articles in magazines and journals, such as developer.com, Dr. Dobb's Journal, The C/C++ Users Journal, Software Development Magazine, Java Report, and the international journal Project Management.