Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 339 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
339
Dung lượng
6,2 MB
Nội dung
[...]... for short And those 23 designpatterns became known as the GoF design patterns 2 DesignPatterns For Dummies You see all 23 of those standard patterns in this book, and some additional ones as well I explain what each pattern does and when you should use the pattern You also see a programming problem that the design pattern solves, implemented in code In other words, every design pattern is put to... you want to get the full patterns story from the beginning, jump into Chapter 1 first — that’s where all the action starts Also, for your convenience, all the code I provide in the book is available for downloading at www .dummies. com/go/designpatternsfd1e Part I Getting to Know Patterns I In this part n this part, your guided tour of designpatterns begins Here, you see what patterns are all about... solution and refer back to it as needed? That’s what designpatterns are all about A design pattern represents a solution to a problem or class of problems that you can put to work at once in your own code In fact, designpatterns go one step further — they also let you share in the solutions found by other programmers, and expert programmers at that The designpatterns you see in this book represent insightful... one sitting in front of the debugger all day? Put designpatterns to work for you and just slip the solution into place About This Book There are plenty of designpatterns floating around the programming world, and in time, a particular set of 23 of them has become accepted as the standard set These patterns were first corralled in a book named Design Patterns: Elements of Reusable Object-Oriented Software... that have been well tested Through the use of patterns, they share their solutions with you, saving you lots of time and effort Chapter 1 Congratulations, Your Problem Has Already Been Solved In This Chapter ᮣ Introducing designpatterns ᮣ Knowing how design patterns can help ᮣ Extending object-oriented programming ᮣ Taking a look at some specific designpatterns A s a programmer, you know how easy... process of code design and maintenance 8 Part I: Getting to Know Patterns The idea behind this book is to familiarize you with a set of designpatterns to simplify the programming process automatically The plan is to get you some overview automatically, no additional effort required A design pattern is a tested solution to a standard programming problem When you’re familiar with the designpatterns presented... familiar with design patterns can make the design process all but automatic for you How do you turn into a software design expert, the envy of all, with hardly any work on your part? Easy You read this book and get familiar with the patterns I cover in depth You don’t have to memorize anything; you just get to know those patterns Then when you encounter a real-world issue that matches one of those patterns, ... handle object collections with the Iterator and Composite patterns, how to coordinate objects with the Command and Mediator patterns, and a great deal more in this part After you read this part, you’ll be an accomplished OOP meister 3 4 DesignPatterns For Dummies Part III: The Part of Tens Chapter 11 tells you about the remainder of the standard patterns, some of which are not in common use anymore,... of the original 23 patterns were not used as much as some of the others You see them all in this book, but I emphasize the patterns that are used the most — and that includes some new, non-GoF patterns in Chapter 11 that have appeared since the GoF book debuted It’s important to realize that there is more going on here than just memorizing designpatterns There are also specific design insights about... attempt at designing the new cars 23 Handling Change with “has-a” Instead of “is-a” 27 Drawing Up Your Plans 29 Creating your algorithms 29 Using your algorithms 30 Selecting algorithms at runtime 33 Making Your Move with the Strategy Pattern 35 xiv DesignPatterns For Dummies Chapter 3: Creating and Extending Objects with the Decorator and Factory Patterns . alt="" by Steve Holzner, PhD Design Patterns FOR DUMmIES ‰ 01_798541 ffirs.qxp 3/27/06 2:19 PM Page iii 01_798541 ffirs.qxp 3/27/06 2:19 PM Page ii Design Patterns FOR DUMmIES ‰ 01_798541 ffirs.qxp. ffirs.qxp 3/27/06 2:19 PM Page ii by Steve Holzner, PhD Design Patterns FOR DUMmIES ‰ 01_798541 ffirs.qxp 3/27/06 2:19 PM Page iii Design Patterns For Dummies ® Published by Wiley Publishing, Inc. 111. Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies. com, and related trade dress