Professional Java EE Design Patterns
close menu
Bookswagon
search
My Account
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology Books > Computer programming / software engineering > Object-oriented programming (OOP) > Professional Java EE Design Patterns
Professional Java EE Design Patterns

Professional Java EE Design Patterns


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

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:

  • Implementation and problem-solving with design patterns
  • Connection between existing Java SE design patterns and new Java EE concepts
  • Harnessing the power of Java EE in design patterns
  • Individually-based focus that fully explores each pattern
  • Colorful war-stories showing how patterns were used in the field to solve real-life problems

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.



Table of Contents:

FOREWORD xxiii

INTRODUCTION xxv

PART I: INTRODUCTION TO JAVA EE DESIGN PATTERNS

CHAPTER 1: A BRIEF OVERVIEW OF DESIGN PATTERNS 3

What Is a Design Pattern? 4

How Patterns Were Discovered and Why We Need Them 5

Patterns in the Real World 5

Design Pattern Basics 6

Enterprise Patterns 7

Java to Enterprise Java 7

The Emergence of Enterprise Java Patterns 8

Design Patterns Versus Enterprise Patterns 8

Plain Old Design Patterns Meet Java EE 9

When Patterns Become Anti‐Patterns 10

Summary 10

Notes 10

CHAPTER 2: THE BASICS OF JAVA EE 13

Multitier Architecture 14

The Client Tier 15

The Middle Tier 16

Web Layer 16

Business Layer 16

The EIS Tier 18

Java EE Servers 18

The Java EE Web Profile 18

Core Principles of Java EE 19

Convention over Configuration 19

Context and Dependency Injection 20

Interceptors 21

Summary 22

Exercises 22

PART II: IMPLEMENTING DESIGN PATTERNS IN JAVA EE

CHAPTER 3: FAÇADE PATTERN 25

What Is a Façade? 26

Façade Class Diagram 27

Implementing the Façade Pattern in Plain Code 27

Implementing the Façade Pattern in Java EE 29

Façade with Stateless Beans 29

Façade with Stateful Bean 31

Where and When to Use the Façade Pattern 31

Summary 31

Exercises 32

Notes 32

CHAPTER 4: SINGLETON PATTERN 33

What Is a Singleton? 34

Singleton Class Diagram 34

Implementing the Singleton Pattern in Plain Code 35

Implementing the Singleton Pattern in Java EE 38

Singleton Beans 39

Using Singletons at Startup 39

Determining Startup Order 40

Managing Concurrency 42

Where and When to Use the Singleton Pattern 45

Summary 46

Exercises 46

Notes 47

CHAPTER 5: DEPENDENCY INJECTION AND CDI 49

What Is Dependency Injection? 50

Implementing DI in Plain Code 50

Implementing DI in Java EE 53

The @Named Annotation 54

Context and Dependency Injection (CDI) 55

CDI Versus EJB 56

CDI Beans 56

The @Inject Annotation 57

Contexts and Scope 57

Naming and EL 58

CDI Beans for Backing JSF 58

Qualifi ers 59

Alternatives 59

Stereotypes 60

Other Patterns via CDI 60

Summary 61

Exercises 61

Notes 62

CHAPTER 6: FACTORY PATTERN 63

What Is a Factory? 64

Factory Method 64

Implementing the Factory Method in Plain Code 66

Abstract Factory 68

Implementing the Abstract Factory in Plain Code 69

Implementing the Factory Pattern in Java EE 70

Harness the Power of CDI 76

Where and When to Use the Factory Patterns 80

Summary 80

Exercises 81

Notes 81

CHAPTER 7: DECORATOR PATTERN 83

What Is a Decorator? 84

Decorator Class Diagram 85

Implementing the Decorator Pattern in Plain Code 86

Implementing the Decorator Pattern in Java EE 89

Decorators Without XML Confi guration 94

Where and When to Use the Decorator Pattern 94

Summary 95

Exercises 96

Notes 96

CHAPTER 8: ASPECT‐ORIENTED PROGRAMMING (INTERCEPTORS) 97

What Is Aspect‐Oriented Programming? 98

Implementing AOP in Plain Code 100

Aspects in Java EE, Interceptors 102

Interceptor Life Cycle 105

Default‐Level Interceptors 106

Interceptor Order 107

CDI Interceptors 109

Where and When to Use Interceptors 111

Summary 112

Notes 112

CHAPTER 9: ASYNCHRONOUS 113

What Is Asynchronous Programming? 114

Asynchronous Pattern 114

Implementing Asynchronous Pattern in Plain Code 116

Asynchronous Programming in Java EE 118

Asynchronous Beans 118

Asynchronous Servlets 120

Where and When to Use Asynchronous Programming 124

Summary 125

Exercises 125

Notes 126

CHAPTER 10: TIMER SERVICE 127

What Is the Timer Service? 127

Implementing a Timer in Java EE 130

Automatic Timers 130

Programmatic Timers 131

Timer Expression 134

Transactions 136

Summary 137

Exercises 137

Notes 138

CHAPTER 11: OBSERVER PATTERN 139

What Is an Observer? 139

Description 140

Observer Class Diagram 141

Implementing the Observer Pattern in Plain Code 142

Implementing the Observer Pattern in Java EE 144

Where and When to Use the Observer Pattern 149

Summary 150

Exercises 151

Notes 151

CHAPTER 12: DATA ACCESS PATTERN 153

What Is a Data Access Pattern? 154

Data Access Class Diagram 154

Overview of the Data Access Pattern 155

Data Transfer Object Pattern 155

Java Persistence Architecture API and Object Relational Mapping 156

Implementing the Data Access Pattern in Java EE 157

Type‐Safe DAO Implementation 162

Where and When to Use the Data Access Pattern 163

Summary 163

Exercises 163

Notes 163

CHAPTER 13: RESTFUL WEB SERVICES 165

What Is REST? 166

The Six Constraints of REST 167

Client‐Server 167

Uniform Interface 167

Stateless 168

Cacheable 168

Layered System 168

Code on Demand 168

Richardson Maturity Model of REST API 168

Level 0: The Swamp of POX (Plain Old XML) 169

Level 1: Resources 169

Level 2: HTTP Verbs 169

Level 3: Hypermedia Controls 169

Designing a RESTful API 169

Resource Naming 170

Nouns Not Verbs 170

Self‐Descriptive 170

Plural Not Singular 171

HTTP Methods 171

Get 171

Post 171

Put 172

Delete 172

Rest in Action 172

The users noun 172

The topics noun and the posts noun 173

Implementing REST in Java EE 175

HATEOAS 178

Where and When to Use REST 180

Summary 181

Exercises 181

Notes 182

CHAPTER 14: MODEL VIEW CONTROLLER PATTERN 183

What Is the MVC Design Pattern? 184

MVC Types 185

Implementing the MVC Pattern in Plain Code 186

Implementing the MVC Pattern in Java EE 190

The FacesServlet 190

MVC Using the FacesServlet 190

Where and When to Use the MVC Pattern 193

Summary 193

Exercises 193

Note 193

CHAPTER 15: OTHER PATTERNS IN JAVA EE 195

What Are WebSockets? 195

What Is Message‐Orientated Middleware 198

What Is the Microservice Architecture? 199

Monolithic Architecture 199

Scalability 200

Decomposing into Services 201

Microservice Benefi ts 202

Nothing in Life Is Free 203

Conclusions 204

Finally, Some Anti‐Patterns 204

Uber Class 204

Lasagna Architecture 204

Mr. Colombus 205

Friends with Benefi ts 205

Bleeding Edge 205

Utilityman 206

Notes 206

PART III: SUMMARY

CHAPTER 16: DESIGN PATTERNS: THE GOOD,THE BAD, AND THE UGLY 209

The Good: Patterns for Success 209

The Bad: Over and Misuse of Patterns 211

…and The Ugly 212

Summary 214

Notes 214

INDEX 215



About the Author :

Murat Yener is an Android geek at Intel working on native and HTML5 mobile apps. He has extensive experience in Java, Web, Java EE and OSGi development. He is an Eclipse Committer, a speaker at major conferences, and a user group leader at GDG Istanbul.

Alex Theedom is a senior developer at Indigo Code Collective (E-scape group) and has wide experience developing Java EE and Spring web applications. He has developed microservice-based architectures, ATM software, and e-learning systems in a diverse range of sectors throughout Europe.

Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.


Best Sellers


Product Details
  • ISBN-13: 9781118843581
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: Wrox Press
  • Language: English
  • ISBN-10: 1118843584
  • Publisher Date: 16 Dec 2014
  • Binding: Digital (delivered electronically)
  • No of Pages: 264


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Professional Java EE Design Patterns
John Wiley & Sons Inc -
Professional Java EE Design Patterns
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Professional Java EE Design Patterns

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!