Atjaunināt sīkdatņu piekrišanu

E-grāmata: Java Design Patterns: A Hands-On Experience with Real-World Examples

3.40/5 (10 ratings by Goodreads)
  • Formāts: EPUB+DRM
  • Izdošanas datums: 19-May-2022
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484279717
Citas grāmatas par šo tēmu:
  • Formāts - EPUB+DRM
  • Cena: 65,42 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: EPUB+DRM
  • Izdošanas datums: 19-May-2022
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484279717
Citas grāmatas par šo tēmu:

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

Use the step-by-step approach of this book to learn and implement design patterns in real-world applications. It focuses on classical design patterns with Java 17 and Eclipse (2021-09). In addition to Gang of Four (GoF) design patterns, the book covers popular and alternative design patterns and includes criticisms of design patterns in a chapter on anti-patterns. 

The book is divided into four parts. Part one covers the SOLID design principles and the Simple Factory pattern. Part two covers the 23 (GoF) design patterns, including the creational patterns, structural patterns, and behavioral patterns. Part three covers alternative design patterns, including the Null Object pattern, and the model-view-controller (MVC) pattern. Part four covers criticisms of design patterns with a quick overview of anti-patterns. It also includes a chapter on FAQs on design patterns.

The book also includes a chapter on FAQs on design patterns. Each pattern is explained with real-world examples and the pros and cons of each of the design patterns are discussed. The book concludes with FAQs that can help you prepare for a job interview.


What You Will Learn

  • Know the SOLID design principles in depth
  • Implement the 23 design patterns from the GoF
  • Apply the Null Object pattern, Simple Factory pattern, and the MVC pattern
  • Know the criticism of design patterns 
  • Understand the anti-patterns
  • Verify your understanding through Q&A sessions
  • Select an alternative to these patterns by comparing their pros and cons




Who This Book Is For

Software developers, architects, and programmers


Intermediate-Advanced user level
About the Author xxi
About the Technical Reviewers xxiii
Acknowledgments xxv
Introduction xxvii
Part I Foundation
1(76)
Chapter 1 Understanding SOLID Principles
3(62)
Single Responsibility Principle
5(7)
Initial Program
5(1)
Demonstration 1
6(2)
Output
8(1)
Analysis
8(1)
Better Program
9(1)
Demonstration 2
9(2)
Output
11(1)
Open/Closed Principle
12(17)
Initial Program
14(2)
Demonstration 3
16(3)
Output
19(1)
Analysis
20(1)
Better Program
20(3)
Demonstration 4
23(4)
Output
27(1)
Analysis
28(1)
Liskov Substitution Principle
29(14)
Initial Program
31(2)
Demonstrations
33(2)
Output
35(2)
Better Program
37(1)
Demonstration 6
38(4)
Output
42(1)
Analysis
42(1)
Interface Segregation Principle
43(11)
Initial Program
44(4)
Demonstration 7
48(2)
Output
50(1)
Analysis
50(1)
Better Program
51(1)
Demonstrations
51(2)
Output
53(1)
Analysis
53(1)
Dependency Inversion Principle
54(9)
Initial Program
55(1)
Demonstration 9
56(1)
Output
57(1)
Analysis
57(1)
Better Program
58(1)
Demonstration 10
59(2)
Output
61(1)
Analysis
61(2)
Summary
63(2)
Chapter 2 Simple Factory Pattern
65(12)
Definition
65(1)
Concept
65(1)
Real-Life Example
65(1)
Computer World Example
66(1)
Implementation
66(7)
Class Diagram
68(1)
Package Explorer View
69(1)
Demonstration
69(3)
Output
72(1)
Analysis
72(1)
Q&A Session
73(4)
Final Comment
76(1)
Part II The Gang of Four (GoF) Design Patterns
77(498)
Chapter 3 Factory Method Pattern
79(18)
GoF Definition
79(1)
Concept
79(1)
Real-Life Example
79(1)
Computer World Example
80(1)
Implementation
80(7)
Class Diagram
83(1)
Package Explorer View
83(1)
Demonstration 1
84(3)
Output
87(1)
Modified Implementation
87(4)
Demonstration 2
88(3)
Output
91(1)
Analysis
91(1)
Q&A Session
91(6)
Chapter 4 Abstract Factory Pattern
97(22)
GoF Definition
97(1)
Concept
97(1)
Real-Life Example
98(1)
Computer World Example
99(1)
Implementation
99(11)
Class Diagram
102(1)
Package Explorer View
102(2)
Demonstration 1
104(5)
Output
109(1)
Analysis
110(1)
The Client Code Variations
110(3)
Demonstration 2
110(2)
Demonstration 3
112(1)
Q&A Session
113(6)
Chapter 5 Prototype Pattern
119(30)
GoF Definition
119(1)
Concept
119(1)
Real-Life Example
120(1)
Computer World Example
120(1)
Implementation
121(7)
Class Diagram
123(1)
Package Explorer View
124(1)
Demonstration 1
124(4)
Output
128(1)
Modified Implementation
128(6)
Class Diagram
129(1)
Demonstration 2
129(2)
Output
131(1)
Analysis
132(1)
Further Improvements
133(1)
Q&A Session
134(1)
Shallow Copy vs. Deep Copy
135(7)
Demonstration 3
136(4)
Output From Shallow Copy Implementation
140(1)
Analysis
140(1)
Output From Deep Copy Implementation
141(1)
Analysis
142(1)
Q&A Session Continued
142(7)
Demonstration 4
143(3)
Output
146(1)
Analysis
147(2)
Chapter 6 Builder Pattern
149(26)
GoF Definition
149(1)
Concept
149(2)
Real-Life Example
151(1)
Computer World Example
151(1)
Implementation
152(11)
Class Diagram
155(1)
Package Explorer View
155(2)
Demonstration 1
157(6)
Output
163(1)
Q&A Session
163(3)
Alternative Implementation
166(7)
Demonstration 2
168(5)
Output
173(1)
Analysis
173(1)
Q&A Session Continued
173(2)
Chapter 7 Singleton Pattern
175(16)
GoF Definition
175(1)
Concept
175(1)
Real-Life Example
175(1)
Computer World Example
176(1)
Implementation
176(4)
Class Diagram
177(1)
Package Explorer View
177(1)
Demonstration 1
178(1)
Output
179(1)
Analysis
180(1)
Q&A Session
180(4)
Alternative Implementations
184(5)
Demonstration 2 Eager Initialization
184(1)
Analysis
184(2)
Demonstration 3 Bill Pugh's Solution
186(1)
Analysis
187(1)
Demonstration 4 Enum Singleton
187(1)
Analysis
188(1)
Q&A Session Continued
189(2)
Chapter 8 Proxy Pattern
191(14)
GoF Definition
191(1)
Concept
191(1)
Real-Life Example
191(1)
Computer World Example
192(1)
Implementation
192(6)
Class Diagram
194(1)
Package Explorer View
195(1)
Demonstration 1
195(3)
Output
198(1)
Q&A Session
198(7)
Demonstration 2
200(3)
Output
203(2)
Chapter 9 Decorator Pattern
205(22)
GoF Definition
205(1)
Concept
205(1)
Real-Life Example
206(1)
Computer World Example
206(1)
Implementation
207(15)
Using Subclassing
207(3)
Using Object Composition
210(4)
Class Diagram
214(1)
Package Explorer View
215(1)
Demonstration
216(4)
Output
220(2)
Q&A Session
222(5)
Chapter 10 Adapter Pattern
227(22)
GoF Definition
227(1)
Concept
227(1)
Real-Life Example
228(1)
Computer World Example
229(1)
Implementation
229(10)
Class Diagram
233(1)
Package Explorer View
234(1)
Demonstration 1
235(3)
Output
238(1)
Analysis
238(1)
Types of Adapters
239(1)
Object Adapters
239(1)
Class Adapters
240(1)
Q&A Session
240(9)
Demonstration 2
240(3)
Output
243(1)
Analysis
244(5)
Chapter 11 Facade Pattern
249(14)
GoF Definition
249(1)
Concept
249(1)
Real-World Example
250(1)
Computer World Example
250(1)
Implementation
251(9)
Class Diagram
254(1)
Package Explorer View
254(1)
Demonstration
255(3)
Output
258(2)
Analysis
260(1)
Q&A Session
260(3)
Chapter 12 Flyweight Pattern
263(20)
GoF Definition
263(1)
Concept
263(1)
Real-Life Example
264(1)
Computer World Example
265(1)
Implementation
265(14)
Class Diagram
270(1)
Package Explorer View
270(2)
Demonstration
272(4)
Output
276(2)
Analysis
278(1)
Q&A Session
279(4)
Chapter 13 Composite Pattern
283(18)
GoF Definition
283(1)
Concept
283(1)
Real-Life Example
284(1)
Computer World Example
284(1)
Implementation
285(13)
Class Diagram
286(1)
Package Explorer View
286(1)
Demonstration
287(8)
Output
295(2)
Analysis
297(1)
Q&A Session
298(3)
Chapter 14 Bridge Pattern
301(26)
GoF Definition
301(1)
Concept
301(1)
Real-Life Example
301(1)
Computer World Example
302(1)
Implementation
303(9)
Class Diagram
306(1)
Package Explorer View
307(1)
Demonstration 1
307(5)
Output
312(1)
Additional Implementation
312(10)
Class Diagram
316(1)
Demonstration 2
317(5)
Output
322(1)
Q&A Session
322(5)
Chapter 15 Template Method Pattern
327(16)
GoF Definition
327(1)
Concept
327(1)
Real-Life Example
328(1)
Computer World Example
328(1)
Implementation
328(6)
Class Diagram
330(1)
Package Explorer View
331(1)
Demonstration 1
332(2)
Output
334(1)
Q&A Session
334(9)
Demonstration 2
336(4)
Output
340(3)
Chapter 16 Observer Pattern
343(24)
GoF Definition
343(1)
Concept
343(3)
Real-Life Example
346(1)
Computer World Example
346(2)
Implementation
348(12)
Class Diagram
352(1)
Package Explorer View
353(1)
Demonstration
354(5)
Output
359(1)
Q&A Session
360(7)
Chapter 17 Chain of Responsibility Pattern
367(18)
GoF Definition
367(1)
Concept
367(1)
Real-Life Example
368(1)
Computer World Example
368(1)
Implementation
369(12)
Class Diagram
374(1)
Package Explorer View
374(1)
Demonstration
375(5)
Output
380(1)
Q&A Session
381(4)
Chapter 18 Iterator Pattern
385(20)
GoF Definition
385(1)
Concept
385(1)
Real-Life Example
386(1)
Computer World Example
387(1)
Implementation
387(11)
Class Diagram
390(1)
Package Explorer View
390(1)
Demonstration 1
391(3)
Output
394(1)
Additional Comments
394(1)
Demonstration 2
395(3)
Output
398(1)
Q&A Session
398(7)
Demonstration 3
400(4)
Output
404(1)
Chapter 19 Command Pattern
405(30)
GoF Definition
405(1)
Concept
405(1)
Real-Life Example
406(1)
Computer World Example
406(1)
Implementation
407(10)
Class Diagram
410(1)
Package Explorer View
411(1)
Demonstration 1
412(4)
Output
416(1)
Q&A Session
417(4)
Modified Implementation
421(14)
Class Diagram
425(1)
Demonstration 2
425(7)
Output
432(3)
Chapter 20 Memento Pattern
435(20)
GoF Definition
435(1)
Concept
435(1)
Real-Life Example
435(1)
Computer World Example
436(1)
Implementation
437(9)
Class Diagram
441(1)
Package Explorer View
441(1)
Demonstration 1
442(3)
Output
445(1)
Analysis
446(1)
Q&A Session
446(3)
Additional Implementation
449(6)
Class Diagram
450(1)
Package Explorer View
450(1)
Demonstration 2
451(2)
Output
453(1)
Analysis
454(1)
Chapter 21 Strategy Pattern
455(14)
GoF Definition
455(1)
Concept
455(1)
Real-Life Example
456(1)
Computer World Example
456(1)
Implementation
456(9)
Class Diagram
459(1)
Package Explorer View
460(1)
Demonstration
461(4)
Output
465(1)
Q&A Session
465(4)
Chapter 22 State Pattern
469(20)
GoF Definition
469(1)
Concept
469(1)
Real-Life Example
470(1)
Computer World Example
470(1)
Implementation
470(12)
Class Diagram
473(1)
Package Explorer View
474(1)
Demonstration
475(5)
Output
480(1)
Analysis
481(1)
Q&A Session
482(7)
Chapter 23 Mediator Pattern
489(24)
GoF Definition
489(1)
Concept
489(1)
Real-Life Example
489(1)
Computer World Example
490(1)
Implementation
490(13)
Class Diagram
495(1)
Package Explorer View
496(1)
Demonstration 1
497(5)
Output
502(1)
Analysis
502(1)
Additional Implementation
503(5)
Demonstration 2
504(3)
Output
507(1)
Analysis
508(1)
Q&A Session
508(5)
Chapter 24 Visitor Pattern
513(36)
GoF Definition
513(1)
Concept
513(1)
Real-Life Example
514(1)
Computer World Example
514(1)
Implementation
515(7)
Class Diagram
518(1)
Package Explorer View
519(1)
Demonstration 1
520(2)
Output
522(1)
Analysis
522(1)
Using Visitor Pattern and Composite Pattern Together
522(23)
Step 1
526(1)
Step 2
526(1)
Step 3
527(1)
Step 4
527(1)
Step 5
528(1)
Demonstration 2
528(8)
Output
536(1)
Analysis
537(1)
Demonstration 3
537(7)
Output
544(1)
Q&A Session
545(4)
Chapter 25 Interpreter Pattern
549(26)
GoF Definition
549(1)
Concept
549(3)
Real-Life Example
552(1)
Computer World Example
552(1)
Implementation
552(16)
Class Diagram
558(1)
Package Explorer View
559(1)
Demonstration 1
560(7)
Output
567(1)
Analysis
568(1)
Q&A Session
568(1)
Alternative Implementation
569(6)
Demonstration 2
570(3)
Output
573(2)
Part III Additional Design Patterns
575(44)
Chapter 26 Null Object Pattern
577(16)
Definition
577(1)
Concept
577(6)
A Faulty Program
578(2)
Output
580(1)
An Unwanted Input
581(1)
The Potential Fix
582(1)
Analysis
582(1)
Real-Life Example
583(1)
Computer World Example
583(1)
Implementation
583(7)
Class Diagram
585(1)
Package Explorer View
585(1)
Demonstration
586(3)
Output
589(1)
Analysis
590(1)
Q&A Session
590(3)
Chapter 27 MVC Pattern
593(26)
Definition
593(1)
Concept
594(3)
Key Points to Remember
594(2)
Variation 1
596(1)
Variation 2
596(1)
Variation 3
596(1)
Real-Life Example
597(1)
Computer World Example
597(1)
Implementation
598(14)
Class Diagram
602(1)
Package Explorer View
602(1)
Demonstration
603(7)
Output
610(2)
Q&A Session
612(7)
Modified Output
614(1)
Analysis
615(4)
Part IV The Final Talks on Design Patterns
619(22)
Chapter 28 Criticisms of Design Patterns
621(6)
Q&A Session
624(3)
Chapter 29 Anti-Patterns
627(8)
Overview
627(1)
Brief History of Anti-Patterns
628(1)
Examples of Anti-Patterns
629(2)
Types of Anti-Patterns
631(1)
Q&A Session
632(3)
Chapter 30 FAQ
635(6)
Appendix A A Brief Overview of GoF Design Patterns
641(8)
Q&A Session
645(4)
Appendix B The Road Ahead
649(2)
A Personal Appeal to You
650(1)
Appendix C Recommended Reading
651(2)
Index 653
Vaskaran Sarcar obtained his Master of Engineering degree in software engineering from Jadavpur University, Kolkata (India), and an MCA from Vidyasagar University, Midnapore (India). He has more than 12 years of experience in education and the IT industry. He devoted his early years (2005-2007) to teaching at various engineering colleges, and later he joined HP India PPS R&D Hub Bangalore. He worked there until August 2019. At the time of his retirement from HP, he was a Senior Software Engineer and Team Lead at HP. To follow his dream and passion, he is now an independent full-time author. He has written more than 10 books on Java and C# such as  Design Patterns in C# (2nd edition), Getting Started with Advanced C#, Interactive C#, Interactive Object-Oriented Programming in Java (2nd edition), and Java Design Patterns (2nd edition).