基本信息
源码名称:Hands-On Design Patterns with Java.pdf
源码大小:10.95M
文件格式:.pdf
开发语言:Java
更新时间:2020-06-18
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
java设计模式书籍
java设计模式书籍
Table of Contents Preface 1 Section 1: Section 1: Introducing Design Patterns Chapter 1: Unified Modeling Language Primer 7 Technical requirements 7 Introducing UML 8 Understanding behavioral UML diagrams 8 Activity diagrams 9 Interaction diagrams 10 Sequence diagrams 11 Communication diagrams 12 Timing diagrams 12 State machine diagrams 13 Use case diagrams 14 Understanding structural UML diagrams 15 Class diagrams 16 Component diagrams 17 Composite structure diagrams 17 Deployment diagrams 18 Object diagrams 19 Package diagrams 20 Summary 20 Questions 21 Further reading 21 Chapter 2: Object-Oriented Design Patterns 22 Technical requirements 22 Introduction to object-oriented programming 23 Primary benefits of OOP 23 Portability 23 Inheritance 24 Encapsulation 25 Polymorphism 25 Sample OOP class 27 Instance variables 29 The this reference 29 Object-oriented programming approaches 29 Accessors and mutators 30 Driver class 31 Constructors 31 Table of Contents [ ii ] Overloading constructors and methods 32 Method call chaining 35 Principles of design patterns 37 Creating concise objects 37 Encapsulating to protect 37 Being purposeful with inheritance 38 Learning the complete OOP class 41 Summary 48 Questions 48 Further reading 48 Section 2: Section 2: Original Design Patterns Chapter 3: Behavioral Design Patterns 50 Technical requirements 51 Introducing behavioral design patterns 51 Understanding the chain of responsibility pattern 52 Use case 53 UML class diagram 54 Programming the design pattern 54 University email handler interface 55 Main email handler 55 Academic email handler 57 Alumni email handler 58 Advising email handler 58 Finance email handler 59 HR email handler 59 Admin email handler 60 Exploring the command pattern 61 Use case 61 UML class diagram 62 Programming the design pattern 62 Class variables 63 Constructor 63 Accessor methods 63 Power-related methods 64 Slider-related methods 64 Using the interpreter pattern 65 Use case 65 UML class diagram 66 Programming the design pattern 66 The Expression interface 67 The MapIntToCharacters class 67 The Conversion class 68 InterpreterDriver class 69 Using the iterator pattern 71 Use case 71 Table of Contents [ iii ] UML class diagram 72 Programming the design pattern 72 Understanding the mediator pattern 74 Use case 74 UML class diagram 75 Programming the design pattern 76 Starter 76 AssemblySystem 77 Hopper 78 The SystemAccelerator class 79 EmergencyBreak 80 WidgetProductionSystem 82 Examining the memento pattern 85 Use case 85 UML class diagram 86 Programming the design pattern 86 Using the null object pattern 88 Use case 88 UML class diagram 89 Programming the design pattern 89 Observing the observer pattern 91 Use case 91 UML class diagram 91 Programming the design pattern 92 Understanding the state pattern 93 Use case 93 UML class diagram 93 Programming the design pattern 94 PrinterOnLine 94 PrinterOffLine 95 Printer 95 PrinterController 96 Driver 96 Application output 97 Strategizing with the strategy pattern 97 UML class diagram 97 Understanding the template method pattern 98 Understanding the visitor pattern 98 Summary 99 Questions 99 Further reading 100 Chapter 4: Creational Design Patterns 101 Technical requirements 101 Introducing creational design patterns 102 Understanding the abstract factory design pattern 102 Table of Contents [ iv ] Use case 104 UML class diagram 104 Programming the design pattern 106 Interfaces 106 Abstract Factory class 107 TypeA classes 107 TypeB classes 108 Type-C classes 110 Driver class 111 Building with the builder design pattern 113 Use case 113 UML class diagram 114 Programming the design pattern 114 Roaster class 115 Interface 115 Builder classes 116 Director class 119 Driver class 119 Exploring the factory method design pattern 121 Use case 121 UML class diagram 121 Programming the design pattern 122 Using the prototype design pattern 124 Use case 125 UML class diagram 125 Programming the design pattern 126 Examining the simple factory design pattern 129 Use case 130 UML class diagram 130 Programming the design pattern 131 Implementing the singleton design pattern 133 Use case 133 UML class diagram 133 Programming the design pattern 134 Summary 135 Questions 135 Further reading 136 Chapter 5: Structural Design Patterns 137 Technical requirements 137 Introduction to structural design patterns 138 Understanding the adapter design pattern 138 Use case 139 UML class diagram 139 Programming the design pattern 140 Crossing the bridge design pattern 142 Table of Contents [ v ] Learning about abstraction 142 Implementing the abstraction example 143 Use case 146 UML class diagram 146 Programming the design pattern 147 Combining objects with the composite design pattern 151 Use case 151 UML class diagram 151 Programming the design pattern 152 Understanding the decorator design pattern 156 Use case 157 UML class diagram 157 Programming the design pattern 158 Implementing the facade design pattern 160 Use case 161 UML class diagram 162 Programming the design pattern 162 Soaring with the flyweight design pattern 166 Use case 166 UML class diagram 166 Programming the design pattern 167 Implementing the proxy design pattern 170 Use case 171 UML class diagram 171 Programming the design pattern 172 Summary 174 Questions 174 Further reading 175 Section 3: Section 3: New Design Patterns Chapter 6: Architectural Patterns - Part I 177 Introducing architectural patterns 178 Understanding the blackboard pattern 178 Coffee shop automation example 178 Warehouse security bot example 181 Understanding the broker pattern 182 University enterprise information system example 183 Luxury cruise reservation system example 184 Understanding the client-server pattern 185 Coffee shop example 185 Three-tier example 186 Understanding the event-driven pattern 187 Event-driven architectural pattern – broker 187 Event-driven architectural pattern – mediator 188 Table of Contents [ vi ] Understanding the extract-transform-load pattern 189 Extract 190 Transform 190 Load 191 Understanding the layered pattern 192 Traditional operating system layers example 194 Mobile operating system layers example 194 Business application layers example 195 Understanding the master–slave pattern 196 Single client example 198 Cloud storage example 199 Understanding the microkernel pattern 200 Construction quote example 201 Optical disc player example 202 Summary 203 Questions 203 Further reading 204 Chapter 7: Architectural Patterns - Part II 205 Technical requirements 205 Understanding the microservices pattern 206 Logistics example 207 eCommerce example implementation 208 Understanding the model-view-controller pattern 209 Book model-view-controller example implementation 210 Book class 210 BookView class 211 The BookController class 211 The MVCArchitecturalPattern class 213 Understanding the naked object pattern 214 Understanding the peer-to-peer pattern 215 File sharing example implementation 216 Networking example implementation 217 Understanding the pipe-filter pattern 218 Simple transformation example implementation 219 Complex transformation example implementation 220 Understanding the serverless pattern 221 IaaS implementation 222 PaaS implementation 223 SaaS implementation 223 BaaS implementation 224 MBaaS implementation 224 FaaS implementation 225 Understanding the service-oriented pattern 225 Understanding the space-based pattern 227 Table of Contents [ vii ] Summary 228 Questions 229 Further reading 229 Chapter 8: Functional Design Patterns 230 Technical requirements 230 Introducing functional design patterns 231 Understanding the execute around design pattern 232 Demonstrated implementation 232 Understanding the lambda design pattern 233 Accessing variables 234 Implementing lambda with a single parameter 234 Implementing lambda with multiple parameters 236 Understanding the loan design pattern 239 Implementing file processing 239 Understanding the MapReduce design pattern 243 Input-Map-Output 244 Input 244 Map 245 Output 245 Input-Map-Reduce-Output 245 Input 246 Map 247 Reduce 247 Output 247 Input-Multiple Maps-Reduce-Output 248 Input 248 Multiple maps 249 Input-Map-Combiner-Reduce-Output 249 Understanding the memoization design pattern 250 Understanding the streams design pattern 254 Stream intermediate operations 255 Stream terminal operations 256 Programming the streams design pattern 256 Understanding the tail call design pattern 257 Programming the tail call design pattern 257 Summary 260 Questions 261 Further reading 261 Chapter 9: Reactive Design Patterns 262 Technical requirements 263 Introducing reactive design patterns 263 Responsive 264 Resilient 264 Elastic 264 Table of Contents [ viii ] Message-driven 265 Understanding the asynchronous communication design pattern 266 Implementing the asynchronous communication design pattern 267 Understanding the autoscaling design pattern 272 Horizontal scaling 274 Vertical scaling 275 Implementing autoscaling 275 Understanding the bounded queue design pattern 275 Understanding the bulkhead design pattern 278 Understanding the caching design pattern 280 Implementing the caching design pattern in Java 281 Understanding the circuit-breaker design pattern 285 Use case 286 Understanding the event-driven communication design pattern 286 Understanding the fail-fast design pattern 287 Programming the design pattern 287 Introducing a fail event 289 Understanding the failure-handling design pattern 291 Failure isolation 291 Controlled failure 292 Understanding the fan-out and quickest-reply design pattern 294 Understanding the idempotency design pattern 295 Programming the design pattern 296 Understanding the monitoring design pattern 299 Understanding the publisher-subscriber design pattern 300 Understanding the self-containment design pattern 301 Understanding the stateless design pattern 302 Use case 303 UML class diagram 303 Programming the design pattern 304 Summary 316 Questions 316 Further reading 317 Appendix A: Assessments 318 Chapter 1 318 Chapter 2 318 Chapter 3 319 Chapter 4 319 Chapter 5 320 Chapter 6 320 Chapter 7 321 Chapter 8 321 Chapter 9 322 Table of Contents [ ix ] Other Books You May Enjoy 323 Index 326