Book description
While most developers today use object-oriented languages, the full power of objects is available only to those with a deep understanding of the object paradigm. How to Use Objects will help you gain that understanding, so you can write code that works exceptionally well in the real world.
Author Holger Gast focuses on the concepts that have repeatedly proven most valuable and shows how to render those concepts in concrete code. Rather than settling for minimal examples, he explores crucial intricacies, clarifies easily misunderstood ideas, and helps you avoid subtle errors that could have disastrous consequences.
Gast addresses the technical aspects of working with languages, libraries, and frameworks, as well as the strategic decisions associated with patterns, contracts, design, and system architecture. He explains the roles of individual objects in a complete application, how they react to events and fulfill service requests, and how to transform excellent designs into excellent code. Using practical examples based on Eclipse, he also shows how tools can help you work more efficiently, save you time, and sometimes even write high-quality code for you.
Gast writes for developers who have at least basic experience: those who’ve finished an introductory programming course, a university computer science curriculum, or a first or second job assignment.
Coverage includes
• Understanding what a professionally designed object really looks like
• Writing code that reflects your true intentions—and testing to make sure it does
• Applying language idioms and connotations to write more readable and maintainable code
• Using design-by-contract to write code that consistently does what it’s supposed to do
• Coding and architecting effective event-driven software
• Separating model and view, and avoiding common mistakes
• Mastering strategies and patterns for efficient, flexible design
• Ensuring predictable object collaboration via responsibility-driven design
Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.
Table of contents
- About This E-Book
- Title Page
- Copyright Page
- Dedication Page
- Contents
- Preface
- Acknowledgments
- About the Author
- Introduction
-
Part I: Language Usage
-
Chapter 1. Basic Usage of Objects
- 1.1 The Core: Objects as Small and Active Entities
- 1.2 Developing with Objects
- 1.3 Fields
-
1.4 Methods
- 1.4.1 An Object-Oriented View on Methods
- 1.4.2 Method Overloading
- 1.4.3 Service Provider
- 1.4.4 Convenience Method
- 1.4.5 Processing Step
- 1.4.6 Explanatory Methods
- 1.4.7 Events and Callbacks
- 1.4.8 Reused Functionality
- 1.4.9 Template Method
- 1.4.10 Delegated to Subclass
- 1.4.11 Extending Inherited Behavior
- 1.4.12 Factory Methods
- 1.4.13 Identity, Equality, and Hashing
- 1.4.14 Refused Bequest
- 1.5 Exceptions
- 1.6 Constructors
- 1.7 Packages
- 1.8 Basics of Using Classes and Objects
- Chapter 2. Fundamental Object Structures
-
Chapter 3. Abstraction and Hierarchy
-
3.1 Inheritance
- 3.1.1 The Liskov Substitution Principle
- 3.1.2 Interface Between the Base Class and Subclasses
- 3.1.3 Factoring Out Common Behavior
- 3.1.4 Base Classes for Reusable Infrastructure
- 3.1.5 Base Classes for Abstraction
- 3.1.6 Reifying Case Distinctions
- 3.1.7 Adapting Behavior
- 3.1.8 Inheritance Versus Delegation
- 3.1.9 Downcasts and instanceof
- 3.1.10 Implementation Inheritance
- 3.1.11 The Fragile Base Class Problem
-
3.2 Interfaces
- 3.2.1 Behavioral Abstraction
- 3.2.2 Client-Specific Classification and Abstraction
- 3.2.3 Abstraction Hierarchies
- 3.2.4 Multiple Classification
- 3.2.5 Extension Interface
- 3.2.6 Specifying Callbacks
- 3.2.7 Decoupling Subsystems
- 3.2.8 Tagging Interfaces
- 3.2.9 Management of Constants
- 3.2.10 Inheritance Versus Interfaces
-
3.1 Inheritance
-
Chapter 1. Basic Usage of Objects
-
Part II: Contracts
- Chapter 4. Contracts for Objects
-
Chapter 5. Testing
- 5.1 The Core: Unit Testing
- 5.2 The Test First Principle
- 5.3 Writing and Running Unit Tests
-
5.4 Applications and Motivations for Testing
- 5.4.1 Testing to Fix Bugs
- 5.4.2 Testing to Capture the Contracts
- 5.4.3 Testing to Design the Interface
- 5.4.4 Testing to Find and Document the Requirements
- 5.4.5 Testing to Drive the Design
- 5.4.6 Testing to Document Progress
- 5.4.7 Testing for Safety
- 5.4.8 Testing to Enable Change
- 5.4.9 Testing to Understand an API
- 5.4.10 Testing for a Better Work–Life Balance
- Chapter 6. Fine Print in Contracts
-
Part III: Events
-
Chapter 7. Introduction to the Standard Widget Toolkit
- 7.1 The Core: Widgets, Layouts, and Events
- 7.2 The WindowBuilder: A Graphical Editor for UIs
- 7.3 Developing with Frameworks
- 7.4 SWT and the Native Interface
- 7.5 Compound Widgets
- 7.6 Dialogs
- 7.7 Mediator Pattern
- 7.8 Custom Painting for Widgets
- 7.9 Timers
- 7.10 Background Jobs
- 7.11 Review: Events and Contracts
- Chapter 8. A Brief Introduction to Threads
- Chapter 9. Structuring Applications with Graphical Interfaces
- Chapter 10. State Machines
-
Chapter 7. Introduction to the Standard Widget Toolkit
-
Part IV: Responsibility-Driven Design
- Chapter 11. Responsibility-Driven Design
- Chapter 12. Design Strategies
- Part V: Appendix
- Bibliography
- Index
- Code Snippets
Product information
- Title: How to Use Objects: Code and Concepts
- Author(s):
- Release date: December 2015
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780133840100
You might also like
book
Java™ for Programmers: Deitel
PRACTICAL, EXAMPLE-RICH COVERAGE OF: Classes, Objects, Encapsulation, Inheritance, Polymorphism, Interfaces, Nested Classes Integrated OOP Case Studies: …
book
Seriously Good Software
Serious developers know that code can always be improved. With each iteration, you make optimizations—small and …
book
Write Great Code, Volume 3
The field of software engineering may value team productivity over individual growth, but legendary computer scientist …
book
Designing Software Product Lines with UML: From Use Cases to Pattern-Based Software Architectures
"Designing Software Product Lines with UML is well-written, informative, and addresses a very important topic. It …