32,99 €
Master Java EE design pattern implementation to improve your design skills and your application’s architecture
Professional Java EE Design Patterns is the perfect companion for anyone who wants to work more effectively with Java EE, and the only resource that covers both the theory and application of design patterns in solving real-world problems. The authors guide readers through both the fundamental and advanced features of Java EE 7, presenting patterns throughout, and demonstrating how they are used in day-to-day problem solving.
As the most popular programming language in community-driven enterprise software, Java EE provides an API and runtime environment that is a superset of Java SE. Written for the junior and experienced Java EE developer seeking to improve design quality and effectiveness, the book covers areas including:
Unlike most Java EE books that simply offer descriptions or recipes, this book drives home the implementation of the pattern to real problems to ensure that the reader learns how the patterns should be used and to be aware of their pitfalls.
For the programmer looking for a comprehensive guide that is actually useful in the everyday workflow, Professional Java EE Design Patterns is the definitive resource on the market.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 327
Veröffentlichungsjahr: 2014
FOREWORD
INTRODUCTION
WHO THIS BOOK IS FOR
WHAT THIS BOOK COVERS
HOW THIS BOOK IS STRUCTURED
WHAT YOU NEED TO USE THIS BOOK
MOTIVATION FOR WRITING
CONVENTIONS
SOURCE CODE
ERRATA
P2P.WROX.COM
CONTACT THE AUTHORS
NOTES
PART I INTRODUCTION TO JAVA EE DESIGN PATTERNS
CHAPTER 1 A BRIEF OVERVIEW OF DESIGN PATTERNS
WHAT IS A DESIGN PATTERN?
DESIGN PATTERN BASICS
ENTERPRISE PATTERNS
SUMMARY
NOTES
CHAPTER 2 THE BASICS OF JAVA EE
MULTITIER ARCHITECTURE
THE CLIENT TIER
THE MIDDLE TIER
THE EIS TIER
JAVA EE SERVERS
THE JAVA EE WEB PROFILE
CORE PRINCIPLES OF JAVA EE
CONVENTION OVER CONFIGURATION
CONTEXT AND DEPENDENCY INJECTION
INTERCEPTORS
SUMMARY
EXERCISES
PART II IMPLEMENTING DESIGN PATTERNS IN JAVA EE
CHAPTER 3 FAÇADE PATTERN
WHAT IS A FAÇADE?
IMPLEMENTING THE FAÇADE PATTERN IN PLAIN CODE
IMPLEMENTING THE FAÇADE PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE FAÇADE PATTERN
SUMMARY
EXERCISES
NOTES
CHAPTER 4 SINGLETON PATTERN
WHAT IS A SINGLETON?
IMPLEMENTING THE SINGLETON PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE SINGLETON PATTERN
SUMMARY
EXERCISES
NOTES
CHAPTER 5 DEPENDENCY INJECTION AND CDI
WHAT IS DEPENDENCY INJECTION?
IMPLEMENTING DI IN PLAIN CODE
IMPLEMENTING DI IN JAVA EE
SUMMARY
EXERCISES
NOTES
CHAPTER 6 FACTORY PATTERN
WHAT IS A FACTORY?
FACTORY METHOD
ABSTRACT FACTORY
IMPLEMENTING THE FACTORY PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE FACTORY PATTERNS
SUMMARY
EXERCISES
NOTES
CHAPTER 7 DECORATOR PATTERN
WHAT IS A DECORATOR?
IMPLEMENTING THE DECORATOR PATTERN IN PLAIN CODE
IMPLEMENTING THE DECORATOR PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE DECORATOR PATTERN
SUMMARY
EXERCISES
NOTES
CHAPTER 8 ASPECT-ORIENTED PROGRAMMING (INTERCEPTORS)
WHAT IS ASPECT-ORIENTED PROGRAMMING?
IMPLEMENTING AOP IN PLAIN CODE
ASPECTS IN JAVA EE, INTERCEPTORS
WHERE AND WHEN TO USE INTERCEPTORS
SUMMARY
NOTES
CHAPTER 9 ASYNCHRONOUS
WHAT IS ASYNCHRONOUS PROGRAMMING?
IMPLEMENTING ASYNCHRONOUS PATTERN IN PLAIN CODE
ASYNCHRONOUS PROGRAMMING IN JAVA EE
WHERE AND WHEN TO USE ASYNCHRONOUS PROGRAMMING
SUMMARY
EXERCISES
NOTES
CHAPTER 10 TIMER SERVICE
WHAT IS THE TIMER SERVICE?
IMPLEMENTING A TIMER IN JAVA EE
SUMMARY
EXERCISES
NOTES
CHAPTER 11 OBSERVER PATTERN
WHAT IS AN OBSERVER?
IMPLEMENTING THE OBSERVER PATTERN IN PLAIN CODE
IMPLEMENTING THE OBSERVER PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE OBSERVER PATTERN
SUMMARY
EXERCISES
NOTES
CHAPTER 12 DATA ACCESS PATTERN
WHAT IS A DATA ACCESS PATTERN?
OVERVIEW OF THE DATA ACCESS PATTERN
IMPLEMENTING THE DATA ACCESS PATTERN IN JAVA EE
WHERE AND WHEN TO USE THE DATA ACCESS PATTERN
SUMMARY
EXERCISES
NOTES
CHAPTER 13 RESTFUL WEB SERVICES
WHAT IS REST?
THE SIX CONSTRAINTS OF REST
RICHARDSON MATURITY MODEL OF REST API
DESIGNING A RESTFUL API
REST IN ACTION
IMPLEMENTING REST IN JAVA EE
HATEOAS
WHERE AND WHEN TO USE REST
SUMMARY
EXERCISES
NOTES
CHAPTER 14 MODEL VIEW CONTROLLER PATTERN
WHAT IS THE MVC DESIGN PATTERN?
IMPLEMENTING THE MVC PATTERN IN PLAIN CODE
IMPLEMENTING THE MVC PATTERN IN JAVA EE
THE FACESSERVLET
MVC USING THE FACESSERVLET
WHERE AND WHEN TO USE THE MVC PATTERN
SUMMARY
EXERCISES
NOTE
CHAPTER 15 OTHER PATTERNS IN JAVA EE
WHAT ARE WEBSOCKETS?
WHAT IS MESSAGE-ORIENTATED MIDDLEWARE
WHAT IS THE MICROSERVICE ARCHITECTURE?
FINALLY, SOME ANTI-PATTERNS
NOTES
PART III SUMMARY
CHAPTER 16 DESIGN PATTERNS: THE GOOD, THE BAD, AND THE UGLY
THE GOOD: PATTERNS FOR SUCCESS
THE BAD: OVER AND MISUSE OF PATTERNS
…AND THE UGLY
SUMMARY
NOTES
TITLEPAGE
COPYRIGHT
DEDICATION
ABOUT THE AUTHORS
ABOUT THE TECHNICAL EDITOR
CREDITS
ACKNOWLEDGMENTS
ADVERT
WILEY END USER LICENSE AGREEMENT
Chapter 10
Table 10.1
Table 10.2
Table 10.3
Table 10.4
Chapter 1
Figure 1.1 A class diagram showing inheritance
Figure 1.2 The singleton pattern class diagram
Chapter 2
Figure 2.1 Multitier architecture showing the interaction between tiers
Figure 2.2 Technology used in the Web and Business layers
Chapter 3
Figure 3.1 Class diagram of the façade pattern
Chapter 4
Figure 4.1 The singleton pattern class diagram
Chapter 6
Figure 6.1 The class diagram shows the structure of the factory method pattern. You can see how the object creation is encapsulated in the subclasses.
Figure 6.2 As can be seen in the class diagram, you can use the abstract factory pattern to group existing factories and encapsulate how you access them.
Chapter 7
Figure 7.1 Class diagram of the decorator pattern
Chapter 9
Figure 9.1 Asynchronous flow diagram
Chapter 11
Figure 11.1 Class diagram of the observer pattern
Chapter 12
Figure 12.1 Class diagram of the data access pattern
Chapter 14
Figure 14.1 Diagram of the model view controller pattern
Figure 14.2 Diagram of Spring’s MVC implementation
Chapter 15
Figure 15.1 Point-to-point implementation
Figure 15.2 Publish/subscribe implementation
Figure 15.3 Monolithic architecture
Figure 15.4 The AKF cube should have X-, Y-, and Z-axis scaling.
Figure 15.5 Y-axis decomposition
Cover
Table of Contents
Part
xxv
xxvi
xxvii
xxviii
xxix
xxx
1
3
4
5
6
7
8
9
10
11
13
14
15
16
17
18
19
20
21
22
23
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
153
154
155
156
157
158
159
160
161
162
163
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
195
196
197
198
199
200
201
202
203
204
205
206
207
209
210
211
212
213
214
Ignorant men raise questions that wise men answered a thousand years ago
—JOHANN WOLFGANG VON GOETHE
Design patterns are our link to the past and the future. They make up a foundational language that represents well understood solutions to common problems that talented engineers before us have added to our collective knowledge base. Design patterns or blueprints exist in every engineering field in one way or another. Software development is no different. Indeed, design patterns are probably our most tangible link to engineering rather than the more organic and less regimented world of the artisan or craftsman. The art and science of design patterns was brought to the world of software engineering—and more specifically to enterprise Java—by the seminal Gang of Four (GoF) book. They have been with us ever since through our adventures in J2EE, Spring, and now modern lightweight Java EE. This is for very good reasons. Server-side Java developers tend to write the type of mission critical applications that need to stand the test of time and hence benefit the most from the discipline that design patterns represent.
It really takes a special kind of person to write a book on design patterns, let alone a book on how to utilize design patterns in Java EE applications. You require not only basic knowledge of APIs and the patterns themselves, but deep insight that can only come with hard-earned experience, as well as an innate ability to explain complex concepts elegantly. I am glad Java EE now has Murat and Alex to accomplish the mighty feat.
This book fulfills a much needed gap and fills it well. It is also very good that the book is on the cutting edge and covers Java EE 7 and not just Java EE 6 or Java EE 5. In fact many of the design patterns covered, like Singleton, Factory, Model-View-Controller (MVC), Decorator, and Observer, are now incorporated right into the Java EE platform. Others like Facade, Data Access Object (DAO), and Data Transfer Object (DTO) fit elegantly on top. Murat and Alex tackle each pattern, explain its pragmatic motivation, and discuss how it fits into Java EE.
It is an honor and a privilege to write a small opening part of this very important book that I hope will become a very useful part of every good Java EE developer's bookshelf. I hope you enjoy the book, and that it helps you write better, more satisfying enterprise Java applications.
M. REZA RAHMAN Java EE/GlassFish Evangelist Oracle Corporation
THIS BOOK DISCUSSES THE CLASSIC DESIGN PATTERNS that were first mentioned in the famous book by the GoF1 and updates them specifically for Java EE 6 and 7.
In every chapter we describe the traditional implementation of each pattern and then show how to implement it using Java EE-specific semantics.
We use full code examples to demonstrate both the traditional and Java EE implementations and color each chapter with real-life stories that show the use (or misuse) of the pattern.
We investigate the pros and cons of each pattern and examine their usages. Each chapter finishes with some exercises that challenge your understanding of the pattern in Java EE.
This book is for everyone with any level of experience. It covers almost everything about a pattern, from how it is referred to in other books, to code on basic Java implementation, to Java EE implementation, and finally real life examples of how and when to use a specific pattern. It also has real life war stories that talk about good and bad practices.
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
