Vous êtes sur la page 1sur 15

Architect Enterprise

Applications with Java EE


Volume 1 Student Guide

D68136GC10
Edition 1.0
January 2011
D71725

Copyright 2011, Oracle and/or its affiliates. All rights reserved.


Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.

Author
Joe Greenwald
Technical Contributors and Reviewers
Linda deMichiel, Ian Evans, Roberto Chinnici, William Markos, Shreechar Ganapaphy,
Vishal Mehray
This book was published using:

Oracle Tutor

Table of Contents
Introducing Enterprise Architecture ...............................................................................................................1-1
Introducing Enterprise Architecture ................................................................................................................1-2
Lesson Objectives ..........................................................................................................................................1-3
Lesson Agenda ..............................................................................................................................................1-4
Course Objectives ..........................................................................................................................................1-5
Target Audience .............................................................................................................................................1-7
Introductions ..................................................................................................................................................1-8
Course Agenda ..............................................................................................................................................1-9
Classroom Guidelines ....................................................................................................................................1-11
Appendices Used in the Course .....................................................................................................................1-12
For More Information......................................................................................................................................1-13
Lesson Agenda ..............................................................................................................................................1-14
Discussion Questions .....................................................................................................................................1-15
Challenges of Enterprise Applications............................................................................................................1-16
What Is Software Architecture? ......................................................................................................................1-17
Justifying the Need for Software Architecture ................................................................................................1-19
Client-Server System .....................................................................................................................................1-21
Highly Distributed System ..............................................................................................................................1-22
Quality of Service ...........................................................................................................................................1-23
Risk Evaluation and Control ...........................................................................................................................1-25
The Goal of Architecture ................................................................................................................................1-27
What Is Enterprise Architecture?....................................................................................................................1-28
Enterprise Architects and Enterprise Application Architects ...........................................................................1-29
Lesson Agenda ..............................................................................................................................................1-31
The Architect Role..........................................................................................................................................1-32
The Architect's Involvement ...........................................................................................................................1-33
Responsibilities of an Architect ......................................................................................................................1-34
Architect and Other Team Members ..............................................................................................................1-37
Analyze Evaluate Prescribe .....................................................................................................................1-40
Influencing Factors .........................................................................................................................................1-41
What Do You Think? ......................................................................................................................................1-42
Additional Resources .....................................................................................................................................1-45
Quiz................................................................................................................................................................1-46
Summary ........................................................................................................................................................1-49
Practice 1 Overview: Review Questions: Introducing Enterprise Architecture ...............................................1-50
Introducing Fundamental Architectural Concepts ........................................................................................2-1
Introducing Fundamental Architectural Concepts..........................................................................................2-2
Objectives ......................................................................................................................................................2-3
Discussion Questions .....................................................................................................................................2-4
Lesson Agenda ..............................................................................................................................................2-5
Which Is More Important, Architecture or Design? .........................................................................................2-6
Distinguishing Between Architecture and Design ...........................................................................................2-7
Common Principles Between Architecture and Design ..................................................................................2-8
Architectural Principles ...................................................................................................................................2-10
Lesson Agenda ..............................................................................................................................................2-12
Architectural Patterns and Design Patterns ...................................................................................................2-13
Architectural Patterns .....................................................................................................................................2-15
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


i

The Layers Pattern.........................................................................................................................................2-16


The MVC Pattern ...........................................................................................................................................2-17
The Tiers Pattern ...........................................................................................................................................2-18
Model 1 Architecture ......................................................................................................................................2-20
Model 2 Architecture ......................................................................................................................................2-21
PAC Architectural Pattern ..............................................................................................................................2-22
Lesson Agenda ..............................................................................................................................................2-23
Typical Software Deliverable Artifacts ............................................................................................................2-24
Architectural Blueprint ....................................................................................................................................2-26
The 4+1 View Model ......................................................................................................................................2-27
The Architectural Prototype ............................................................................................................................2-29
Lesson Agenda ..............................................................................................................................................2-30
Architecture Modeling Using UML ..................................................................................................................2-31
Class Diagrams ..............................................................................................................................................2-32
Interaction Diagrams ......................................................................................................................................2-33
Communication Diagrams ..............................................................................................................................2-34
Sequence Diagrams.......................................................................................................................................2-35
Component Diagrams ....................................................................................................................................2-36
Types of Components ...................................................................................................................................2-37
Deployment Diagrams ....................................................................................................................................2-39
Types of Deployment Diagrams .....................................................................................................................2-41
Package Diagrams .........................................................................................................................................2-42
Lesson Agenda ..............................................................................................................................................2-43
Architecture Workflow Steps ..........................................................................................................................2-44
Select the Architecture Type ..........................................................................................................................2-46
Type of Software Architectures ......................................................................................................................2-47
Standalone Applications .................................................................................................................................2-48
Client/Server (2-Tier) Applications .................................................................................................................2-49
Application-centric N-Tier Applications ...........................................................................................................2-50
Web-centric N-Tier Applications .....................................................................................................................2-51
Enterprise-centric N-Tier Applications ............................................................................................................2-52
Creating the Detailed Deployment Diagram ...................................................................................................2-53
Lesson Agenda ..............................................................................................................................................2-54
What Is an Enterprise Architecture Framework? ............................................................................................2-55
Popular Enterprise Architecture Frameworks .................................................................................................2-56
Comparison of EA Frameworks .....................................................................................................................2-57
Oracle Enterprise Architecture Framework ....................................................................................................2-58
The Oracle Architectural Development Process.............................................................................................2-59
TOGAF to OEAF Mapping .............................................................................................................................2-60
OADP to TOGAF ADM Mapping ....................................................................................................................2-61
Additional Resources .....................................................................................................................................2-62
Quiz................................................................................................................................................................2-63
Summary ........................................................................................................................................................2-68
Practice 2 Overview: Model Initial Architecture ..............................................................................................2-69
Developing a Security Architecture ................................................................................................................3-1
Developing a Security Architecture ................................................................................................................3-2
Objectives ......................................................................................................................................................3-3
Discussion Questions .....................................................................................................................................3-4
Lesson Agenda ..............................................................................................................................................3-5
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


ii

Types of Access Control ................................................................................................................................3-6


Role-based Access Control (RBAC) ..............................................................................................................3-8
Invasions ........................................................................................................................................................3-10
Regulatory Constraints ...................................................................................................................................3-12
Lesson Agenda ..............................................................................................................................................3-13
Impact of Security ..........................................................................................................................................3-14
Securing the Network Services ......................................................................................................................3-15
Securing the Hosting Environment .................................................................................................................3-16
Securing Applications .....................................................................................................................................3-17
Common Security Principles ..........................................................................................................................3-18
Maintaining Corporate Security Policies.........................................................................................................3-19
Self-Preservation............................................................................................................................................3-21
Defense in Depth ...........................................................................................................................................3-22
Least Privilege................................................................................................................................................3-23
Compartmentalization ....................................................................................................................................3-24
Proportionality ................................................................................................................................................3-25
Costs and Benefits of Security Features ........................................................................................................3-26
Resolving Trade-Off Items in Security............................................................................................................3-27
How Do You Know Your Users? ....................................................................................................................3-28
Lesson Agenda ..............................................................................................................................................3-29
Examining Security in the Java EE Technology .............................................................................................3-30
Defining Java EE Security Terminology .........................................................................................................3-31
Authentication ................................................................................................................................................3-32
Defining Protection Domains ..........................................................................................................................3-33
Authorization ..................................................................................................................................................3-34
Data Confidentiality and Integrity ...................................................................................................................3-35
Selecting Cipher Suites ..................................................................................................................................3-36
Declarative and Programmatic Security .........................................................................................................3-38
Declarative Security .......................................................................................................................................3-39
Programmatic Security ...................................................................................................................................3-41
Comparing Declarative Security and Programmatic Security .........................................................................3-42
Lesson Agenda ..............................................................................................................................................3-44
Understanding Web Services Security ...........................................................................................................3-45
XML Signature ...............................................................................................................................................3-47
XML Encryption ..............................................................................................................................................3-50
Web Service Security (WS-Security) ..............................................................................................................3-52
Addressing Web Services Security Requirements .........................................................................................3-53
Message Structure in WS-Security ................................................................................................................3-54
Web Services Security and Java EE ..............................................................................................................3-56
Web Service Security in Oracle WebLogic .....................................................................................................3-57
Web Service Interoperability Technology (WSIT)...........................................................................................3-58
Security Assertion Markup Language ............................................................................................................3-59
SAML Terminology.........................................................................................................................................3-61
SAML WS-Security Architecture ....................................................................................................................3-62
SAML WS-Security Profiles ...........................................................................................................................3-63
Additional Resources .....................................................................................................................................3-64
Quiz................................................................................................................................................................3-65
Summary ........................................................................................................................................................3-70
Practice 3 Overview: Identifying Security Risks ............................................................................................3-71
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


iii

Understanding Nonfunctional Requirements ................................................................................................4-1


Understanding Nonfunctional Requirements ..................................................................................................4-2
Objectives ......................................................................................................................................................4-3
Discussion Questions .....................................................................................................................................4-4
Lesson Agenda ..............................................................................................................................................4-5
Functional and Nonfunctional Requirements .................................................................................................4-6
Nonfunctional Requirements ..........................................................................................................................4-7
Nonfunctional Requirements Categories ........................................................................................................4-8
Impact of Dimensions on Nonfunctional Requirements..................................................................................4-12
Making Trade-Off Decisions on System Dimensions .....................................................................................4-16
Capture and Examine NFRs ..........................................................................................................................4-17
Lesson Agenda ..............................................................................................................................................4-18
Introducing Redundancy to the System Architecture .....................................................................................4-19
Load Balancing ..............................................................................................................................................4-20
Failover ..........................................................................................................................................................4-22
Effects of Failover ..........................................................................................................................................4-23
Clusters ..........................................................................................................................................................4-24
Common Cluster Configurations ....................................................................................................................4-25
Two Node Cluster: Asymmetric ......................................................................................................................4-26
Two Node Cluster: Symmetric........................................................................................................................4-27
Clustered Pairs Topology ...............................................................................................................................4-28
N+1 Topology.................................................................................................................................................4-29
N*N Topology .................................................................................................................................................4-30
Evaluating Replication Strategies...................................................................................................................4-31
Machine Equivalence .....................................................................................................................................4-32
Network Design ..............................................................................................................................................4-33
Cost Consideration.........................................................................................................................................4-34
Improving Performance and Throughput ........................................................................................................4-35
Improving Availability .....................................................................................................................................4-36
Improving Extensibility and Flexibility .............................................................................................................4-37
Improving Scalability ......................................................................................................................................4-38
Virtualization ..................................................................................................................................................4-39
JVMs ..............................................................................................................................................................4-41
Packaging and Deployment Considerations ..................................................................................................4-43
Testing ...........................................................................................................................................................4-44
Lesson Agenda ..............................................................................................................................................4-46
Prioritizing Quality-of-Service (QoS) Requirements .......................................................................................4-47
System Design Considerations ......................................................................................................................4-49
Ranking QoS Requirements ..........................................................................................................................4-50
Prioritization of QoS Requirements ................................................................................................................4-52
Reviewing Quality Estimation .........................................................................................................................4-53
Revising QoS Values .....................................................................................................................................4-54
Lesson Agenda ..............................................................................................................................................4-55
Inspecting QoS Requirements for Trade-Off Opportunities ............................................................................4-56
Additional Resources .....................................................................................................................................4-58
Quiz................................................................................................................................................................4-59
Summary ........................................................................................................................................................4-64
Practice 4 Overview: Consider the impact of Nonfunctional Requirements ..................................................4-65
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


iv

Defining Common Problems and Solutions - Part 1 .....................................................................................5-1


Defining Common Problems and Solutions ....................................................................................................5-2
Objectives ......................................................................................................................................................5-3
Discussion Questions .....................................................................................................................................5-4
Lesson Agenda ..............................................................................................................................................5-5
Identifying Key Risk Factors ...........................................................................................................................5-6
What Do You Think? ......................................................................................................................................5-7
System Flexibility ...........................................................................................................................................5-8
Network Communication and Layout .............................................................................................................5-9
Transaction Model..........................................................................................................................................5-10
Security Model ...............................................................................................................................................5-11
System Sizing and Planning ..........................................................................................................................5-12
Estimation Best Practices ..............................................................................................................................5-13
Lesson Agenda ..............................................................................................................................................5-14
Designing a Flexible Object Model .................................................................................................................5-15
Using Abstractions .........................................................................................................................................5-16
Applying Object-Oriented Principles ...............................................................................................................5-17
Open-Closed Principle ...................................................................................................................................5-18
Dependency Inversion Principle .....................................................................................................................5-20
Interface Segregation Principle ......................................................................................................................5-21
Composite Reuse Principle and Separation of Concerns Principle ................................................................5-22
Common Closure Principle and Common Reuse Principle ............................................................................5-23
Applying Patterns ...........................................................................................................................................5-24
Common Pattern Catalogs .............................................................................................................................5-25
Gang of Four (GoF) Design Patterns .............................................................................................................5-26
Java EE Patterns ...........................................................................................................................................5-27
Architecture Patterns by Buschmann, et al. ...................................................................................................5-30
The Layers Pattern.........................................................................................................................................5-31
Enterprise Integration Patterns.......................................................................................................................5-32
Enterprise Application Architecture Patterns ..................................................................................................5-33
Pattern Integration..........................................................................................................................................5-34
Using Patterns Across a Network...................................................................................................................5-35
Object-Based Patterns ...................................................................................................................................5-37
Using Reliable Frameworks ...........................................................................................................................5-38
Open Source Issues.......................................................................................................................................5-39
Service-Based Architecture ............................................................................................................................5-40
Developing Service-Based Architectures .......................................................................................................5-41
Types of Services...........................................................................................................................................5-43
Granularity of Services ...................................................................................................................................5-44
Versioning Services .......................................................................................................................................5-46
What Do You Think? ......................................................................................................................................5-48
Additional Resources .....................................................................................................................................5-49
Quiz................................................................................................................................................................5-50
Summary ........................................................................................................................................................5-54
Practice 5 Overview: Create a Flexible Object Model ...................................................................................5-55
Defining Common Problems and Solutions - Part 2 .....................................................................................6-1
Defining Common Problems and Solutions ....................................................................................................6-2
Objectives ......................................................................................................................................................6-3
Discussion Questions .....................................................................................................................................6-4
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


v

Lesson Agenda ..............................................................................................................................................6-5


Network Communication Guidelines ..............................................................................................................6-6
Network Performance Guidelines...................................................................................................................6-7
Distributed Computing Fallacies.....................................................................................................................6-8
What Do You Think? ......................................................................................................................................6-9
Creating a Network Model ..............................................................................................................................6-10
Estimating Network Latency ...........................................................................................................................6-11
Constructing Efficient Data Models ................................................................................................................6-13
Increased Operation Granularity ....................................................................................................................6-14
Compression ..................................................................................................................................................6-15
Lesson Agenda ..............................................................................................................................................6-16
Justifying the Use of Transactions .................................................................................................................6-17
When Are Transactions Required ..................................................................................................................6-18
CAP Conjecture .............................................................................................................................................6-20
ACID versus BASE ........................................................................................................................................6-21
Difficulties of Transaction Models...................................................................................................................6-22
Types of Transactions ....................................................................................................................................6-23
Impact of Transactions on Latency and Request Frequency? .......................................................................6-24
Write-Write Conflict ........................................................................................................................................6-26
Deadlock ........................................................................................................................................................6-27
What Do You Think ........................................................................................................................................6-28
Isolation Levels ..............................................................................................................................................6-29
Transaction (Txn) Isolation Phenomena ........................................................................................................6-30
Transactions Already Committed ...................................................................................................................6-32
Creating the Transaction Model .....................................................................................................................6-33
Analyzing Application Transaction Requirements ..........................................................................................6-35
What Do You Think? ......................................................................................................................................6-37
Creating an Application's Transaction Model .................................................................................................6-38
Transaction Performance Metrics ..................................................................................................................6-40
Lesson Agenda ..............................................................................................................................................6-42
Planning System Capacity .............................................................................................................................6-43
Two Extremes for System Capacity ...............................................................................................................6-44
System Load Characteristics .........................................................................................................................6-45
Estimating Transaction Load ..........................................................................................................................6-46
Estimating Transaction Rate ..........................................................................................................................6-47
Estimating Client Load ...................................................................................................................................6-48
Sizing the System ..........................................................................................................................................6-50
What Do You Think? ......................................................................................................................................6-52
Planning Scalability ........................................................................................................................................6-53
Machine Performance Profiles .......................................................................................................................6-54
Cloud Computing ...........................................................................................................................................6-55
Additional Resources .....................................................................................................................................6-58
Quiz................................................................................................................................................................6-59
Summary ........................................................................................................................................................6-63
Practice 6 Overview: Consider Network, Transaction and Capacity Planning for the Architecture ...............6-64
Java EE 6 Overview .........................................................................................................................................7-1
Java EE 6 Overview .......................................................................................................................................7-2
Objectives ......................................................................................................................................................7-3
Discussion Questions .....................................................................................................................................7-4
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


vi

Java EE 6 Goals ............................................................................................................................................7-5


Distributed Multitiered Applications ................................................................................................................7-7
Java EE Server Communications...................................................................................................................7-9
Web Tier and Java EE Applications ...............................................................................................................7-10
Business and EIS Tiers ..................................................................................................................................7-11
Java EE Containers .......................................................................................................................................7-12
New Features: EJBs ......................................................................................................................................7-14
New Features: Java Servlet Technology........................................................................................................7-16
New Features: JSF 2.0 ..................................................................................................................................7-18
New Features: Java API for RESTful Web Services ......................................................................................7-20
New Features: Managed Beans .....................................................................................................................7-21
New Features: Context and Dependency Injection ........................................................................................7-22
Overview of CDI .............................................................................................................................................7-24
Beans as Injectable Objects ...........................................................................................................................7-26
New Features: Bean Validation ......................................................................................................................7-28
New Features: Java Persistence API .............................................................................................................7-30
Classical" J2EE / Java EE 5 Architecture.......................................................................................................7-32
Impact of Java EE 6 on Architecture ..............................................................................................................7-33
Quiz................................................................................................................................................................7-34
Summary ........................................................................................................................................................7-37
Practice 7 Overview: ......................................................................................................................................7-38
Developing an Architecture for the Client Tier ..............................................................................................8-1
Developing an Architecture for the Client Tier ................................................................................................8-2
Objectives ......................................................................................................................................................8-3
Discussion Questions .....................................................................................................................................8-4
Lesson Agenda ..............................................................................................................................................8-5
Overview of the Client Tier .............................................................................................................................8-6
Client Tier Roles.............................................................................................................................................8-7
Lesson Agenda ..............................................................................................................................................8-9
Information Architecture Client Tier Concerns ...............................................................................................8-10
User Analysis .................................................................................................................................................8-11
Usage Analysis ..............................................................................................................................................8-12
Robustness Analysis ......................................................................................................................................8-13
User Interface Design Principles ....................................................................................................................8-14
Two Laws of User Interface Design ...............................................................................................................8-15
Usability, User Acceptance, and Prototyping .................................................................................................8-16
Data Density ..................................................................................................................................................8-18
Accessibility and Section 508 .........................................................................................................................8-19
Internationalization .........................................................................................................................................8-21
Lesson Agenda ..............................................................................................................................................8-22
Selecting User Interface Devices ...................................................................................................................8-23
Resource Limitations ......................................................................................................................................8-24
Robustness of Human Input Devices .............................................................................................................8-25
Basic Compared to Complex User Interaction ...............................................................................................8-27
Selecting User Interface Technologies ...........................................................................................................8-28
Desktop Graphical UI Toolkits ........................................................................................................................8-29
Desktop Graphical User Interface Technologies ............................................................................................8-30
The Abstract Window Toolkit .........................................................................................................................8-31
The Swing Toolkit...........................................................................................................................................8-32
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


vii

The Standard Widget Toolkit ..........................................................................................................................8-33


JavaFX ...........................................................................................................................................................8-34
Desktop Web Browser Technologies .............................................................................................................8-35
Browser Compatibility ....................................................................................................................................8-36
HTML and Cascading Style Sheets ...............................................................................................................8-37
Rich Internet Applications ..............................................................................................................................8-38
Rich Internet Application Frameworks ............................................................................................................8-39
RIA Technologies ...........................................................................................................................................8-40
Java Applets ..................................................................................................................................................8-42
Mobile Graphical User Interface Technologies ..............................................................................................8-43
JTWI Architecture...........................................................................................................................................8-45
SMS Asynchronous Messaging .....................................................................................................................8-47
Java ME Web Service API .............................................................................................................................8-48
Microbrowsers ................................................................................................................................................8-49
XHTML MP Example......................................................................................................................................8-50
XHTML Mobile Profile ....................................................................................................................................8-51
MIDlets or Microbrowsers ..............................................................................................................................8-52
Client Side Adaptation....................................................................................................................................8-53
Multiserving ....................................................................................................................................................8-54
Web Browser Technology Best Practices ......................................................................................................8-56
Out-of-band JavaScript Callbacks ..................................................................................................................8-57
Out-of-Band JavaScript Callbacks .................................................................................................................8-58
The XMLHttpRequest Messages ...................................................................................................................8-59
Comet ............................................................................................................................................................8-60
WebSockets ...................................................................................................................................................8-62
Web 2.0 ..........................................................................................................................................................8-64
Search Engine Optimization ...........................................................................................................................8-66
What Do You Think? ......................................................................................................................................8-68
Lesson Agenda ..............................................................................................................................................8-69
Discovering Reusability in the Client Tier .......................................................................................................8-70
User Interface Design Patterns ......................................................................................................................8-71
Third Party Web Service APIs ........................................................................................................................8-72
Lesson Agenda ..............................................................................................................................................8-73
Deployment Strategies for the User Interface ................................................................................................8-74
Using Installation Utilities ...............................................................................................................................8-75
Installation Utilities .........................................................................................................................................8-76
Java Web Start...............................................................................................................................................8-77
Application Client Container ...........................................................................................................................8-78
Lesson Agenda ..............................................................................................................................................8-79
Security Concerns in the Client Tier ...............................................................................................................8-80
Input Data Validation ......................................................................................................................................8-81
Code Injection ................................................................................................................................................8-82
Cross Site Scripting (XSS) .............................................................................................................................8-83
Lesson Agenda ..............................................................................................................................................8-85
Testing ...........................................................................................................................................................8-86
Additional Resources .....................................................................................................................................8-87
Quiz................................................................................................................................................................8-88
Summary ........................................................................................................................................................8-93
Practice 8 Overview: Choosing Client Technologies .....................................................................................8-94
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


viii

Developing an Architecture for the Web Tier ................................................................................................9-1


Developing an Architecture for the Web Tier .................................................................................................9-2
Objectives ......................................................................................................................................................9-3
Discussion Questions .....................................................................................................................................9-5
Lesson Agenda ..............................................................................................................................................9-6
Responsibilities of the Web Tier .....................................................................................................................9-7
What Is a Servlet? ..........................................................................................................................................9-8
What Is a JavaServer Page? .........................................................................................................................9-9
What Is JavaServer Faces? ...........................................................................................................................9-10
Oracle ADF Faces..........................................................................................................................................9-11
Java Naming and Directory Interface .............................................................................................................9-12
Web Tier Development Roles ........................................................................................................................9-14
Lesson Agenda ..............................................................................................................................................9-16
Separation of Concerns (SoC) .......................................................................................................................9-17
Presentation Concerns ...................................................................................................................................9-18
Templating the Layout View ...........................................................................................................................9-19
Inclusion Templating ......................................................................................................................................9-20
TransclusionTemplating .................................................................................................................................9-21
View Compositing ..........................................................................................................................................9-22
View Generation Frameworks ........................................................................................................................9-23
Previewability .................................................................................................................................................9-24
Scripting Languages ......................................................................................................................................9-26
Session State Management ...........................................................................................................................9-27
Input Data Validation ......................................................................................................................................9-28
Internationalization and Localization ..............................................................................................................9-30
Languages Spoken by Internet Users ............................................................................................................9-31
Content Management.....................................................................................................................................9-33
Searchability ..................................................................................................................................................9-34
Control and Logic Concerns ...........................................................................................................................9-35
Model View Controller ....................................................................................................................................9-36
Service-to-Worker Pattern ..............................................................................................................................9-37
Filtering ..........................................................................................................................................................9-39
Web Flow .......................................................................................................................................................9-40
Lesson Agenda ..............................................................................................................................................9-41
Popular Web Tier Frameworks.......................................................................................................................9-42
Criteria for Framework Selection ....................................................................................................................9-43
Request-Oriented Frameworks ......................................................................................................................9-44
Component Oriented Frameworks .................................................................................................................9-45
Oracle Application Development Framework (ADF)......................................................................................9-46
Technology Choices for ADF BC Applications ...............................................................................................9-47
Competing Frameworks .................................................................................................................................9-48
Lesson Agenda ..............................................................................................................................................9-50
Providing Security in the Web Tier .................................................................................................................9-51
JAAS ..............................................................................................................................................................9-53
Java Authorization Contract for Containers ....................................................................................................9-55
Oracle Identity Management Oracle + Sun Combination ...............................................................................9-56
Oracle Access Management Suite Plus .........................................................................................................9-59
Salient Features .............................................................................................................................................9-61
OAM 11g Architecture ....................................................................................................................................9-63
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


ix

Lesson Agenda ..............................................................................................................................................9-64


Web Server Clustering ...................................................................................................................................9-65
Oracle Coherence ..........................................................................................................................................9-66
Singletons in the Web Tier .............................................................................................................................9-67
Accommodating Load Spikes .........................................................................................................................9-68
Session Persistence.......................................................................................................................................9-69
Load Balancing ..............................................................................................................................................9-70
Single System Images ...................................................................................................................................9-71
Additional Resources .....................................................................................................................................9-72
Quiz................................................................................................................................................................9-73
Summary ........................................................................................................................................................9-77
Practice 9 Overview: Architecting for the Web Tier .......................................................................................9-79
Developing an Architecture for the Business Tier ........................................................................................10-1
Developing an Architecture for the Business Tier ..........................................................................................10-2
Objectives ......................................................................................................................................................10-3
Lesson Agenda ..............................................................................................................................................10-4
What is an Enterprise Bean? .........................................................................................................................10-5
Accessing Enterprise Beans ..........................................................................................................................10-7
Deciding on Remote or Local Access ............................................................................................................10-9
What Is a Session Bean? ...............................................................................................................................10-11
Stateless Versus Stateful Session Beans ......................................................................................................10-12
Singleton Session Beans ...............................................................................................................................10-14
Message-Driven Beans ..................................................................................................................................10-16
Timer Service .................................................................................................................................................10-17
What Is JAX-WS? ..........................................................................................................................................10-18
Representational State Transfer (REST) .......................................................................................................10-19
Enterprise Application Container Services .....................................................................................................10-20
Lesson Agenda ..............................................................................................................................................10-23
Architecting Domain Model Services..............................................................................................................10-24
JMS Asynchronous Communication ..............................................................................................................10-26
Message Driven Beans ..................................................................................................................................10-28
JNDI Naming Server ......................................................................................................................................10-30
Rules Engines ................................................................................................................................................10-31
Basic Oracle Business Rule Concepts ...........................................................................................................10-33
Oracle Business Rule Components ...............................................................................................................10-34
Workflow Engines ..........................................................................................................................................10-35
Architecting Domain Model Entities................................................................................................................10-36
Java EE 6 Business State ..............................................................................................................................10-37
Mapping Domain Value Objects to XML ........................................................................................................10-38
Distributing Domain Model Components ........................................................................................................10-39
The Component Distribution Golden Hammer ...............................................................................................10-40
Creating Coarse Grained Faades.................................................................................................................10-41
Lesson Agenda ..............................................................................................................................................10-42
Development Best Practices ..........................................................................................................................10-43
Exception Handling ........................................................................................................................................10-44
Using Runtime Exceptions .............................................................................................................................10-46
Logging ..........................................................................................................................................................10-47
Additional Resources .....................................................................................................................................10-49
Quiz................................................................................................................................................................10-50
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


x

Summary ........................................................................................................................................................10-55
Practice 10 Overview: Refining the Business Architecture ............................................................................10-56
Developing an Architecture for the Integration and Resource Tiers ...........................................................11-1
Developing an Architecture for the Integration and Resource Tiers ...............................................................11-2
Objectives ......................................................................................................................................................11-3
Discussion Questions .....................................................................................................................................11-4
Lesson Agenda ..............................................................................................................................................11-5
Challenges of Integration ...............................................................................................................................11-6
The Integration Tier ........................................................................................................................................11-8
The EIS Resource Tier...................................................................................................................................11-10
Relational Databases .....................................................................................................................................11-12
Nonrelational Data Sources ...........................................................................................................................11-13
Alternatives to Relational Databases for High Performance ..........................................................................11-14
Operational Resources ..................................................................................................................................11-16
Resource Servers ..........................................................................................................................................11-18
LDAP Servers ................................................................................................................................................11-19
Security Servers .............................................................................................................................................11-20
Extract, Transform and Load (ETL) Tools ......................................................................................................11-21
Data Mining ....................................................................................................................................................11-22
Enterprise Data Model ...................................................................................................................................11-23
What Do You Think? ......................................................................................................................................11-24
Lesson Agenda ..............................................................................................................................................11-25
Java Integration Technologies .......................................................................................................................11-26
JDBC and Object Relational Mapping (ORM) ................................................................................................11-27
ORM Frameworks ..........................................................................................................................................11-29
What Do You Think? ......................................................................................................................................11-31
Overview of Java Persistence API (JPA) .......................................................................................................11-32
What Are JPA Entities? ..................................................................................................................................11-33
Messaging Systems .......................................................................................................................................11-34
Message-Oriented Middleware ......................................................................................................................11-35
Java Message Service ...................................................................................................................................11-36
JMS Application Architecture .........................................................................................................................11-37
Point-to-Point Queue ......................................................................................................................................11-38
Publish-Subscribe Topics ...............................................................................................................................11-39
WebLogic Server JMS Features ....................................................................................................................11-40
JMS Architecture: Connecting ........................................................................................................................11-41
JMS Architecture: Sending Messages ...........................................................................................................11-42
Transacted Messaging ...................................................................................................................................11-43
WebLogic Server JMS Server ........................................................................................................................11-44
Connection Factory ........................................................................................................................................11-45
JMS Destination .............................................................................................................................................11-46
Message Driven Beans (MDB) .......................................................................................................................11-47
Java EE Connector Architecture (JCA) ..........................................................................................................11-48
Integration Technologies ................................................................................................................................11-50
Web Services .................................................................................................................................................11-51
Java Web Service Technologies ....................................................................................................................11-53
Java API for XML-based Web Services (JAX-WS) ........................................................................................11-54
Comparing Integration Technologies .............................................................................................................11-55
Comparing JMS, JCA, and Web Services ......................................................................................................11-56
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


xi

Evaluating the Software Architecture ............................................................................................................12-1


Evaluating the Software Architecture .............................................................................................................12-2
Objectives ......................................................................................................................................................12-3
Discussion Questions .....................................................................................................................................12-4
Lesson Agenda ..............................................................................................................................................12-5
Evaluating Software Architectures .................................................................................................................12-6
Characteristics of a Good Architecture ...........................................................................................................12-7
Architecture Evaluation Guidelines ................................................................................................................12-9
Lesson Agenda ..............................................................................................................................................12-10
Java EE Technologies and Architectural Objectives ......................................................................................12-11
Designing for Long-Term Application State ....................................................................................................12-12
Managing Client Session State ......................................................................................................................12-15
Enabling Business Process and Workflow Control.........................................................................................12-18
Enabling Presentation Process and Workflow Control ...................................................................................12-20
Managing Presentation Layout ......................................................................................................................12-22
Designing for Asynchronous Communication ................................................................................................12-24
Java EE Technologies and Architectural Objectives ......................................................................................12-25
Lesson Agenda ..............................................................................................................................................12-26
Creating System Prototypes ..........................................................................................................................12-27
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


xii

Oracle Internal & Oracle Academy Use Only

Lesson Agenda ..............................................................................................................................................11-58


Applying Integration Tier Patterns ..................................................................................................................11-59
Integration Tier Patterns .................................................................................................................................11-60
Aspect Oriented Programming .......................................................................................................................11-61
XML Services .................................................................................................................................................11-62
Lesson Agenda ..............................................................................................................................................11-64
Service-Oriented Architecture (SOA) .............................................................................................................11-65
Why Is an SOA Approach Required? .............................................................................................................11-66
Ways to Implement Services ..........................................................................................................................11-67
What Are Services? .......................................................................................................................................11-68
Adopting Standards for an SOA Approach .....................................................................................................11-70
Standards That Enable SOA ..........................................................................................................................11-71
Designing with an SOA Approach ..................................................................................................................11-72
Creating Service Portfolios .............................................................................................................................11-74
SOA, Web Services and Java EE ..................................................................................................................11-75
Business Process Execution Language (BPEL).............................................................................................11-76
Introducing Business Process Execution Language (BPEL) ..........................................................................11-77
Service Component Architecture (SCA) and Service Data Objects (SDO) ....................................................11-79
ESB Features and Functions .........................................................................................................................11-81
Canonical Model ............................................................................................................................................11-84
SOA Best Practices........................................................................................................................................11-86
Moving to SOA ...............................................................................................................................................11-88
SOA Governance ...........................................................................................................................................11-89
Define SOA Governance ................................................................................................................................11-90
Identifying the Need of SOA Governance ......................................................................................................11-91
What Do You Think ........................................................................................................................................11-93
Additional Resources .....................................................................................................................................11-94
Quiz................................................................................................................................................................11-95
Summary ........................................................................................................................................................11-99
Practice 11 Overview: Refining the Integration Tier Architecture ..................................................................11-100

Appendix A: UML 2: Quick Reference ............................................................................................................13-1


UML 2 Quick Reference .................................................................................................................................13-2
Appendix B: Acronyms ...................................................................................................................................14-1
Acronyms .......................................................................................................................................................14-2
Appendix C: Glossary ......................................................................................................................................15-1
Glossary .........................................................................................................................................................15-2
Appendix D: UMLet Tips ..................................................................................................................................16-1
UMLet Tips .....................................................................................................................................................16-2

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Architect Enterprise Applications with Java EE Table of Contents


xiii

Oracle Internal & Oracle Academy Use Only

Prototypes Based on Patterns .......................................................................................................................12-28


Prototype Validation for Standards Conformance ..........................................................................................12-29
Prototype Testing ...........................................................................................................................................12-30
Measuring QoS Capabilities of System Prototypes ........................................................................................12-31
Saturation Points ............................................................................................................................................12-32
Judging the Prototypes Against Architectural Goals ......................................................................................12-34
Extrapolations or Trend Curves......................................................................................................................12-35
What Do You Think? ......................................................................................................................................12-36
Lesson Agenda ..............................................................................................................................................12-37
Defining Application Server Selection Criteria ................................................................................................12-38
Evaluating Application Server Selection Criteria ............................................................................................12-40
Selecting Frameworks ....................................................................................................................................12-42
Additional Resources .....................................................................................................................................12-44
Quiz................................................................................................................................................................12-45
Summary ........................................................................................................................................................12-49
Practice 12 Overview .....................................................................................................................................12-50

Vous aimerez peut-être aussi