did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780596007126

Head First Design Patterns

by
  • ISBN13:

    9780596007126

  • ISBN10:

    0596007124

  • Format: Paperback
  • Copyright: 2004-11-01
  • Publisher: Oreilly & Associates Inc
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
  • Buyback Icon We Buy This Book Back!
    In-Store Credit: $4.28
    Check/Direct Deposit: $4.08
    PayPal: $4.08
List Price: $69.99 Save up to $12.63
  • Digital
    $57.36
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

Head First Design Patterns introduces software design patterns using the unique and highly effective Head First learning approach made popular in our bestselling Head First Java. This book teaches underlying concepts so that beginner- and intermediate-level developers really understand the implications of applying a particular pattern for application design and performance. They'll learn how patterns are built using Object Oriented design fundamentals, so they can construct their own "elegant" design solutions. Plenty of examples show how design patterns are used.

Author Biography

Eric Freeman is a computer scientist with a passion for media and software architectures and coauthor of Head First Design Patterns. He just wrapped up four years at a dream job-- directing internet broadband and wireless efforts at Disney--and is now back to writing, creating cool software, and hacking Java and Macs. Eric spent a lot of the '90s working on alternatives to the desktop metaphor with David Gelernter (and they're both still asking the question, "Why do I have to give a file a name?"). Based on this work, Eric landed a Ph.D. at Yale University in 1997. He also co-founded Mirror Worlds Technologies (now acquired) to create a commercial version of his thesis work, Lifestreams.

In a previous life, Eric built software for networks and supercomputers. You might know him from such books as JavaSpaces Principles Patterns and Practice. Eric has fond memories of implementing tuple-space systems on Thinking Machine CM-5s and creating some of the first internet information systems for NASA in the late 1980s.

When he's not writing text or code you'll find him spending more time tweaking than watching his home theater and trying to restore a circa 1980s Dragon's Lair video game. He also wouldn't mind moonlighting as an electronica DJ.

Write to him at eric at wickedlysmart dot com or visit him at http://www.ericfreeman.com .

Elisabeth Robson (formerly Freeman) is coauthor of O'Reilly's Head First Design Patterns and Head First HTML with CSS & XHTML. She is currently Special Projects Director at O'Reilly where she is developing new brain-friendly learning ideas and products.

Bert Bates is a 20-year software developer, a Java instructor, and a co-developer of Sun's upcoming EJB exam (Sun Certified Business Component Developer). His background features a long stint in artificial intelligence, with clients like the Weather Channel, A&E Network, Rockwell, and Timken.

Kathy Sierra has been interested in learning theory since her days as a game developer (Virgin, MGM, Amblin'). More recently, she's been a master trainer for Sun Microsystems, teaching Sun's Java instructors how to teach the latest technologies to customers, and a lead developer of several Sun certification exams. Along with her partner Bert Bates, Kathy created the Head First series. She's also the original founder of the Software Development/Jolt Productivity Award-winning javaranch.com, the largest (and friendliest) all-volunteer Java community.

Table of Contents

Intro to Design Patterns
Welcome to Design Patterns: Someone has already solved your problems
The SimUDuck appp. 2
Joe thinks about inheritance...p. 5
How about an interface?p. 6
The one constant in software developmentp. 8
Separating what changes from what stays the samep. 10
Designing the Duck Behaviorsp. 11
Testing the Duck codep. 18
Setting behavior dynamicallyp. 20
The Big Picture on encapsulated behaviorsp. 22
HAS-A can be better than IS-Ap. 23
The Strategy Patternp. 24
The power of a shared pattern vocabularyp. 28
How do I use Design Patterns?p. 29
Tools for your Design Toolboxp. 32
Exercise Solutionsp. 34
The Observer Pattern
Keeping your Objects in the Know: Don't miss out when something interesting happens!
The Weather Monitoring applicationp. 39
Meet the Observer Patternp. 44
Publishers + Subscribers = Observer Patternp. 45
Five minute drama: a subject for observationp. 48
The Observer Pattern definedp. 51
The power of Loose Couplingp. 53
Designing the Weather Stationp. 56
Implementing the Weather Stationp. 57
Using Java's built-in Observer Patternp. 64
The dark side of java.util. Observablep. 71
Tools for your Design Toolboxp. 74
Exercise Solutionsp. 78
The Decorator Pattern
Decorating Objects: Just call this chapter "Design Eye for the Inheritance Guy."
Welcome to Starbuzz Coffeep. 80
The Open-Closed Principlep. 86
Meet the Decorator Patternp. 88
Constructing a Drink Order with Decoratorsp. 89
The Decorator Pattern Definedp. 91
Decorating our Beveragesp. 92
Writing the Starbuzz codep. 95
Real World Decorators: Java I/Op. 100
Writing your own Java I/O Decoratorp. 102
Tools for your Design Toolboxp. 105
Exercise Solutionsp. 106
The Factory Pattern
Baking with OO Goodness: Get ready to cook some loosely coupled OO designs
When you see "new", think "concrete"p. 110
Objectville Pizzap. 112
Encapsulating object creationp. 114
Building a simple pizza factoryp. 115
The Simple Factory definedp. 117
A Framework for the pizza storep. 120
Allowing the subclasses to decidep. 121
Let's make a PizzaStorep. 123
Declaring a factory methodp. 125
Meet the Factory Method Patternp. 131
Parallel class hierarchiesp. 132
Factory Method Pattern definedp. 134
A very dependent PizzaStorep. 137
Looking at object dependenciesp. 138
The Dependency Inversion Principlep. 139
Meanwhile, back at the PizzaStore...p. 144
Families of ingredients...p. 145
Building our ingredient factoriesp. 146
Looking at the Abstract Factoryp. 153
Behind the scenesp. 154
Abstract Factory Pattern definedp. 156
Factory Method and Abstract Factory comparedp. 160
Tools for your Design Toolboxp. 162
Exercise Solutionsp. 164
The Singleton Pattern
One of a Kind Objects: The Singleton Pattern: your ticket to creating one-of-a-kind objects, for which there is only one instance
One and only one objectp. 170
The Little Singletonp. 171
Dissecting the classic Singleton Patternp. 173
Confessions of a Singletonp. 174
The Chocolate Factoryp. 175
Singleton Pattern definedp. 177
Hershey, PA, we have a problem...p. 178
BE the JVMp. 179
Dealing with multithreadingp. 180
Singleton Q&Ap. 184
Tools for your Design Toolboxp. 186
Exercise Solutionsp. 188
The Command Pattern
Encapsulating Invocation: In this chapter we take encapsulation to a whole new level: we're going to encapsulate method invocation
Home Automation or Bustp. 192
The Remote Controlp. 193
Taking a look at the vendor classesp. 194
Meanwhile, back at the Diner...p. 197
Let's study the Diner interactionp. 198
The Objectville Diner Roles and Responsibilitiesp. 199
From the Diner to the Command Patternp. 201
Our first command objectp. 203
The Command Pattern definedp. 206
The Command Pattern and the Remote Controlp. 208
Implementing the Remote Controlp. 210
Putting the Remote Control through its pacesp. 212
Time to write that documentationp. 215
Using state to implement Undop. 220
Every remote needs a Party Mode!p. 224
Using a Macro Commandp. 225
More uses of the Command Pattern: Queuing requestsp. 228
More uses of the Command Pattern: Logging requestsp. 229
Tools for your Design Toolboxp. 230
Exercise Solutionsp. 232
The Adapter and Facade Patterns
Being Adaptive: In this chapter we're going to attempt such impossible feats as putting a square peg in a round hole
Adapters all around usp. 236
Object Oriented Adaptersp. 237
The Adapter Pattern explainedp. 241
Adapter Pattern definedp. 243
Object and Class Adaptersp. 244
Tonight's talk: The Object Adapter and Class Adapterp. 247
Real World Adaptersp. 248
Adapting an Enumeration to an Iteratorp. 249
Tonight's talk: The Decorator Pattern and the Adapter Patternp. 252
Home Sweet Home Theaterp. 255
Lights, Camera, Facade!p. 258
Constructing your Home Theater Facadep. 261
Facade Pattern definedp. 264
The Principle of Least Knowledgep. 265
Tools for your Design Toolboxp. 270
Exercise Solutionsp. 272
The Template Method Pattern
Encapsulating Algorithms: We've encapsulated object creation, method invocation, complex interfaces, ducks, pizzas...what could be next?
Whipping up some coffee and tea classesp. 277
Abstracting Coffee and Teap. 280
Taking the design furtherp. 281
Abstracting prepareRecipe()p. 282
What have we done?p. 285
Meet the Template Methodp. 286
Let's make some teap. 287
What did the Template Method get us?p. 288
Template Method Pattern definedp. 289
Code up closep. 290
Hooked on Template Method...p. 292
Using the hookp. 293
Coffee? Tea? Nah, let's run the TestDrivep. 294
The Hollywood Principlep. 296
The Hollywood Principle and the Template Methodp. 297
Template Methods in the Wildp. 299
Sorting with Template Methodp. 300
We've got some ducks to sortp. 301
Comparing ducks and ducksp. 302
The making of the sorting duck machinep. 304
Swingin' with Framesp. 306
Appletsp. 307
Tonight's talk: Template Method and Strategyp. 308
Tools for your Design Toolboxp. 311
Exercise Solutionsp. 312
The Iterator and Composite Patterns
Well-Managed Collections: There are lots of ways to stuff objects into a collection
Objectville Diner and Pancake House mergep. 316
Comparing Menu implementationsp. 318
Can we encapsulate the iteration?p. 323
Meet the Iterator Patternp. 325
Adding an Iterator to DinerMenup. 326
Looking at the designp. 331
Cleaning things up with java.util.Iteratorp. 333
What does this get us?p. 335
Iterator Pattern definedp. 336
Single Responsibilityp. 339
Iterators and Collectionsp. 348
Iterators and Collections in Java 5p. 349
Just when we thought it was safe...p. 353
The Composite Pattern definedp. 356
Designing Menus with Compositep. 359
Implementing the Composite Menup. 362
Flashback to Iteratorp. 368
The Null Iteratorp. 372
The magic of Iterator & Composite together...p. 374
Tools for your Design Toolboxp. 380
Exercise Solutionsp. 381
The State Pattern
The State of Things: A little known fact: the Strategy and State Patterns were twins separated at birth
How do we implement state?p. 387
State Machines 101p. 388
A first attempt at a state machinep. 390
You knew it was coming...a change request!p. 394
The messy STATE of things...p. 396
Defining the State interfaces and classesp. 399
Implementing our State Classesp. 401
Reworking the Gumball Machinep. 402
The State Pattern definedp. 410
State versus Strategyp. 411
State sanity checkp. 417
We almost forgot!p. 420
Tools for your Design Toolboxp. 423
Exercise Solutionsp. 424
The Proxy Pattern
Controlling Object Access: Every play good cop, bad cop?
Monitoring the gumball machinesp. 430
The role of the 'remote proxy'p. 434
RMI detourp. 437
GumballMachine remote proxyp. 450
Remote proxy behind the scenesp. 458
The Proxy Pattern definedp. 460
Get Ready for virtual proxyp. 462
Designing the CD cover virtual proxyp. 464
Virtual proxy behind the scenesp. 470
Using the Java API's proxyp. 474
Five minute drama: protecting subjectsp. 478
Creating a dynamic proxyp. 479
The Proxy Zoop. 488
Tools for your Design Toolboxp. 491
Exercise Solutionsp. 492
Compound Patterns
Patterns of Patterns: Who would have ever guessed that Patterns could work together?
Compound Patternsp. 500
Duck reunionp. 501
Adding an adapterp. 504
Adding a decoratorp. 506
Adding a factoryp. 508
Adding a composite, and iteratorp. 513
Adding an observerp. 516
Patterns summaryp. 523
A duck's eye view: the class diagramp. 524
Model-View-Controller, the songp. 526
Design Patterns are your key to the MVCp. 528
Looking at MVC through patterns-colored glassesp. 532
Using MVC to control the beat...p. 534
The Modelp. 537
The Viewp. 539
The Controllerp. 542
Exploring strategyp. 545
Adapting the modelp. 546
Now we're ready for a HeartControllerp. 547
MVC and the Webp. 549
Design Patterns and Model 2p. 557
Tools for your Design Toolboxp. 560
Exercise Solutionsp. 561
Better Living with Patterns
Patterns in the Real World: Ahhhh, now you're ready for a bright new world filled with Design Patterns
Your Objectville guidep. 578
Design Pattern definedp. 579
Looking more closely at the Design Pattern definitionp. 581
May the force be with youp. 582
Pattern catalogsp. 583
How to create patternsp. 586
So you wanna be a Design Patterns writer?p. 587
Organizing Design Patternsp. 589
Thinking in patternsp. 594
Your mind on patternsp. 597
Don't forget the power of the shared vocabularyp. 599
Top five ways to share your vocabularyp. 600
Cruisin' Objectville with the Gang of Fourp. 601
Your journey has just begun...p. 602
Other Design Pattern resourcesp. 603
The Patterns Zoop. 604
Annihilating evil with Anti-Patternsp. 606
Tools for your Design Toolboxp. 608
Leaving Objectville...p. 609
Appendix: Leftover Patterns: Not everyone can be the most popular
Bridgep. 612
Builderp. 614
Chain of Responsibilityp. 616
Flyweightp. 618
Interpreterp. 620
Mediatorp. 622
Mementop. 624
Prototypep. 626
Visitorp. 628
Indexp. 631
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program