Adobe® Digital Editions software.This eBook requires the free
Before downloading this DRM-encrypted PDF, be sure to:
Written by a world-renowned expert on programming methodology, and the winner of the 2008 Turing Award, this book shows how to build production-quality programs--programs that are reliable, easy to maintain, and quick to modify. Its emphasis is on modular program construction: how to get the modules right and how to organize a program as a collection of modules. The book presents a methodology effective for either an individual programmer, who may be writing a small program or a single module in a larger one; or a software engineer, who may be part of a team developing a complex program comprised of many modules. Both audiences will acquire a solid foundation for object-oriented program design and component-based software development from this methodology.
Because each module in a program corresponds to an abstraction, such as a collection of documents or a routine to search the collection for documents of interest, the book first explains the kinds of abstractions most useful to programmers: procedures; iteration abstractions; and, most critically, data abstractions. Indeed, the author treats data abstraction as the central paradigm in object-oriented program design and implementation. The author also shows, with numerous examples, how to develop informal specifications that define these abstractions--specifications that describe what the modules do--and then discusses how to implement the modules so that they do what they are supposed to do with acceptable performance.
Other topics discussed include:
The Java programming language is used for the book's examples. However, the techniques presented are language independent, and an introduction to key Java concepts is included for programmers who may not be familiar with the language.
Decomposition and Abstraction.
Abstraction by Parameterization.
Abstraction by Specification.
Kinds of Abstractions.
The Remainder of the Book.
Objects and Variables.
Method Call Semantics.
Conversions and Overloading.
Primitive Object Types.
The Benefits of Abstraction.
Specifications of Procedural Abstractions.
Designing Procedural Abstractions.
The Java Exception Mechanism.
Defining Exception Types.
Coping with Unchecked Exceptions.
Programming with Exceptions.
Reflecting and Masking.
When to Use Exceptions.
Checked versus Unchecked Exceptions.
Specifications for Data Abstractions.
Specification of IntSet.
The Poly Abstraction.
Using Data Abstractions.
Implementing Data Abstractions.
Implementing Data Abstractions in Java.
Implementation of IntSet.
Implementation of Poly.
Aids to Understanding Implementations.
The Abstraction Function.
The Representation Invariant.
Implementing the Abstraction Function and Rep Invariant.
Properties of Data Abstraction Implementations.
Benevolent Side Effects.
Exposing the Rep.
Reasoning about Data Abstractions.
Preserving the Rep Invariant.
Reasoning about Operations.
Reasoning at the Abstract Level.
Locality and Modifiability.
Iteration in Java.
Rep Invariants and Abstraction Functions for Generators.
Assignment and Dispatching.
Defining a Type Hierarchy.
Defining Hierarchies in Java.
A Simple Example.
The Meaning of Subtypes.
The Methods Rule.
The Properties Rule.
Discussion of Type Hierarchy.
Polymorphic Data Abstractions.
Using Polymorphic Data Abstractions.
Specifications and Specificand Sets.
Some Criteria for Specifications.
Testing Data Abstractions.
Testing Polymorphic Abstractions.
Testing a Type Hierarchy.
Unit and Integration Testing.
Tools for Testing.
The Software Life Cycle.
Requirements Analysis Overview.
The Stock Tracker.
Requirements Specification for Stock Tracker.
The Data Model.
Stock Tracker Specification.
Requirements Specification for a Search Engine.
An Overview of the Design Process.
The Design Notebook.
The Introductory Section.
The Abstraction Sections.
The Structure of Interactive Programs.
Starting the Design.
Discussion of the Method.
Continuing the Design.
The Query Abstraction.
The WorldTable Abstraction.
Interaction between FP and UI.
Module Dependency Diagrams versus Data Models.
Review and Discussion.
Continuing the Design.
The Design Notebook.
Evaluating a Design.
Correctness and Performance.
Ordering the Program Development Process.
Hiding Object Creation.
The State Pattern.
The Bridge Pattern.
Procedures Should Be Objects Too.
Traversing the Tree.
The Power of Indirection.