ISBN-10:
0201738295
ISBN-13:
9780201738292
Pub. Date:
10/31/2001
Publisher:
Addison-Wesley
Developing Enterprise Java Applications with J2EE' and UML / Edition 1

Developing Enterprise Java Applications with J2EE' and UML / Edition 1

by Khawar Zaman Ahmed, Cary E. Umrysh
Current price is , Original price is $44.99. You

Temporarily Out of Stock Online

Please check back later for updated availability.

This item is available online through Marketplace sellers.

Product Details

ISBN-13: 9780201738292
Publisher: Addison-Wesley
Publication date: 10/31/2001
Series: Addison-Wesley Object Technology Series
Edition description: New Edition
Pages: 368
Product dimensions: 7.30(w) x 9.00(h) x 0.90(d)

About the Author

Khawar Ahmed is a member of the Rational Rose team at Rational Software Corporation. He assists internal and external customers of Rational Rose with the use of UML and Rational Rose in the areas of Java, J2EE, XML, and Web modeling. He has over eleven years of software development experience and has been using visual modeling since the early 1990s.

Cary Umrysh has over twelve years of experience in object-oriented software development. Formerly a Rational Rose development manager and product manager at Rational Software Corporation, he is currently managing development teams for several key Enterprise Java software systems for use in the energy industry.

0201738295AB09042001

Read an Excerpt

Developing complex software requires more than just churning out lines of code. As a software architect or developer involved in an industrial project, you must understand and be able to leverage critical software subdisciplines such as architecture, analysis and design techniques, development processes, visual modeling, and the underlying technology to be successful.

This book brings all these diverse elements together from the Java 2 Platform, Enterprise Edition (J2EE) development perspective to provide a holistic approach for the reader. Specifically, this book tries to answer the following key questions:

  • What is the Unified Modeling Language (UML), and how is it relevant to J2EE development?
  • How do Java and UML relate to each other?
  • What are the key concepts in software architecture?
  • How does a software development process fit into the J2EE software development equation?
  • How can analysis and design help you to arrive at a better J2EE application design?
  • What are the key J2EE technologies, and how do they fit together?
  • How can you leverage the UML for J2EE development?

Rather than reinvent the wheel, the approach taken in this book is that of bringing together known works, such as Jim Conallen's Web Modeling Profile and the Sun Java Specification Request-26 for UML/EJB Mapping Specification.

To provide a practical illustration of the topics discussed, this book guides you through a sample J2EE application development project using the Rational Unified Process (RUP) and the UML. A working implementation is provided. Suggestions for further enhancements are also listed to assist you in continuing your exploration of the UML and J2EE technologies.

Intended Audience

This book is suitable for anyone interested in learning about the UML and how it can be applied to J2EE development. Current J2EE application developers will learn how to apply the UML to J2EE application development. UML practitioners will benefit from learning about the J2EE in the context of the UML. And software professionals interested in learning both the UML and J2EE will be able to get to a productive state faster facilitated by the intertwined contextual discussion.

After reading the book, you will

  • Be able to effectively utilize the UML for developing J2EE applications

  • Learn about the key J2EE technologies (EJB, JSP, and servlets) at a technical level

  • Know when to use Model 1 versus Model 2 architecture, and identify situations where patterns such as value object and session bean chaining may be appropriate

  • Understand software architecture concepts such as decomposition, layering, components, frameworks, patterns, and tiers

  • Be able to apply techniques such as use case analysis, analysis object discovery, and analysis to design transformation to your J2EE project

  • Understand the notion of software development processes and the fundamentals of some of the currently popular processes

  • Learn how to start using the RUP for your J2EE project

This book only covers the Java language to the extent of providing a mapping of key Java concepts to the UML. Consequently, some familiarity with Java is assumed (knowing C++ or a similar language should be sufficient to get the basics from the examples). Prior knowledge of, or experience with, the UML, J2EE, or enterprise application development is not a prerequisite, but is certainly helpful.

How to Use This Book

If you are new to the UML and J2EE, you will get the most out of this book by reading it completely in a sequential manner.

Those who are comfortable with the UML and are primarily interested in learning about J2EE (or how to apply the UML to J2EE) can jump directly to Chapters 9-16.

On the other hand, if you know J2EE and mostly want to learn about UML, you should concentrate on Chapters 1-8, and then skim through the remaining portions of the book.

You will get the best results if you get your hands on a good modeling tool and try to apply visual modeling to a problem of your own!

Chapter Summaries

Chapter 1: Introduction to Enterprise Software provides a high-level overview of enterprise software development and related technologies.

Chapter 2: Introduction to the J2EE covers the basics of the Java 2 Platform, Enterprise Edition. It provides an overview of the basic technologies and the APIs, which form the J2EE.

Chapter 3: Introduction to the UML provides an overview of the UML and a quick introduction to the UML basics.

Chapter 4: UML and Java provides an overview of the Java language's mapping to the UML and covers some of the basic UML constructs.

Chapter 5: Overview of Activities introduces the notion of software development processes and outlines the approach taken in the book.

Chapter 6: Architecture, which is an important aspect of good software, introduces the notion of software architecture and provides an overview of some of the concepts in software architecture.

Chapter 7: Analyzing Customer Needs shows you how to apply UML use cases to better understand customer requirements. No matter how cool the software, if it does not meet the customer's requirements, it is a failure!

Chapter 8: Creating the Design focuses on analyzing the requirements further and creating the initial design for the case study. This chapter discusses how to translate the requirements you have gathered into software.

Chapter 9: Overview of J2EE Technologies lays the groundwork for the J2EE technologies we discuss in the remaining chapters.

Chapter 10: Servlets provides an overview of the Java servlet technology, discusses how they are modeled in the UML, and then shows a representative application of UML and servlets to the case study. Java servlets are ideal for the request-response oriented Web paradigm.

Chapter 11: JavaServer Pages teaches you about JSPs, when to use them, and how to use them in the sample project. JavaServer Pages (JSP) combine the power of servlets with the flexibility of HTML pages.

Chapter 12: Session Beans discusses how session beans are used in the middle tier and how to best model and utilize them. Session beans are one of the three types of enterprise beans provided in the J2EE. The chapter concludes with the usage of session beans in the context of the case study.

Chapter 13: Entity Beans focuses on the entity bean concept, its advantages and issues, and how to effectively model it in the UML. Entity beans provide a convenient way to objectify the stored data.

Chapter 14: Message-Driven Beans covers the technology and how to model them in the UML. Message-driven beans are a new addition to the J2EE Enterprise JavaBean specification.

Chapter 15: Assembly and Deployment discusses how UML can help assembly and deployment of a distributed application.

Chapter 16: Case Study discusses the details of the example used in this book including general requirements, restrictions, and such.

References for further reading include books, articles, and online sources.

A Glossary containing specialized terms and their meanings is provided for quick reference. An Index is provided for quick lookup and reference.

Conventions

We use several notational conventions throughout this book. A short list is provided for your reference:

  • Italicized words are used to highlight key concepts or terminology.
  • References to terms such as javax.servlet.http.HttpServletResponse are used to identify the exact J2SE or J2EE classes for further details. For example, in the preceding term the user is being referred to the HttpServletResponse class, which is found in the http package located in the servlet package of the javax package.
  • Boldface text is used to identify keywords and reserved words in the context of Java/J2EE, for example, ejbCreate.
  • Code samples are shown in a slightly different format to distinguish them from plain text, for example, public void acceptOrder() {

Table of Contents

Foreword.

Preface.

Approach.

Intended Audience.

How to Use This Book.

Chapter Summaries.

Conventions.

Acknowledgements.

1. Introduction to Enterprise Software.

What is Enterprise Software?

Challenges in Developing Enterprise Software

Evolution of Enterprise Software

Enterprise Software and Component Based Software.

Summary.

2. Introduction to J2EE.

What is the Java 2 Platform, Enterprise Edition?

A Brief History of J2EE.

Why J2EE?

Brief Overview of J2EE.

Technologies.

API.

Other J2EE Technologies and API.

Summary.

3. Introduction to the UML.

What is the Unified Modeling Language (UML)?

Overview.

Why use the J2EE and the UML Together?

Challenges in Modeling J2EE in the UML.

Extension Mechanisms in the UML.

Stereotype.

Tagged Value.

Constraint.

The Approach to J2EE UML Modeling.

Summary.

4. UML and Java.

Introduction.

Representing Structure.

Class.

Variable.

Method.

Object.

Interface.

Package.

Representing Relationships.

Inheritance.

Realization.

Dependency.

Association.

Aggregation.

Composition.

Reflexive Relationships.

Summary.

5. Overview of Activities.

Introduction.

What is a Software Development Process?

Brief Overview of Popular Approaches to Software Development.

The Just-Develop-It Approach.

The Waterfall Process.

The Iterative Process.

The Rational Unified Process.

The ICONIX Process.

OPEN Process.

Extreme Programming/Feature-Driven Development.

Approach Used in This Book.

Overview of Major activities.

Chapter 6: Architecture.

Chapter 7: Analyzing the Customer Needs.

Chapter 8: Creating the Design.

Chapters 10-15 Detailed Design.

Chapters 16 Case Study.

Summary.

6. Architecture.

What is Software Architecture?

Why Architecture?

Key Concepts in Enterprise Application Architecture.

Decomposition.

Components.

Frameworks.

Patterns.

Layering.

Tiers.

Approaches to Software Architecture.

The J2EE View of Architecture.

The 4+1view Model of Architecture.

Hofmeister et al Four Views of Architecture.

Putting it All Together.

Summary.

7. Analyzing the Customer Needs.

Introduction.

Why software Analysis and Design?

Problem Analysis.

Use Case Modeling.

Actor.

Use Case.

Finding the Actors.

Finding the Use Cases.

Use Case Diagrams.

Use Case Relationships.

Include.

Extend.

Sequence Diagrams.

Activity Diagrams.

Summary.

8. Creating the Design.

Use Case Analysis.

Use Case Realizations.

Refined Use Case Description.

Sequence Diagrams.

Boundary Objects.

Entity Objects.

Control Objects.

Collaboration Diagrams.

Class Diagrams.

Coalescing the Analysis Classes.

Packaging.

Summary.

9. Overview of J2EE Technologies.

Overview.

The Big Picture.

Servlets.

JavaServer Pages.

Enterprise JavaBeans.

Session Beans.

Entity Beans.

Message-Driven Beans.

Assembly and Deployment.

Case Study.

Summary.

10. Servlets.

Overview.

Introduction to Servlets.

Common Usage.

Best Served Small.

J2EE Versions.

Servlet Lifecycle.

Lifecycle Methods.

Convenience Method.

Required Methods and Tagged Values.

Request Handling.

Response Generation.

HTTP Request Handlers.

Advanced Handler Methods.

Quick Guide to HTTP Requests.

The RequestDispatcher Interface.

Modeling Servlets in UML.

Modeling Other Servlet Aspects.

Servlet forward.

Servlet include.

ServletContext.

Servlet Session Management.

Servlet Deployment and Web Archives.

Identifying Servlets in Enterprise Applications.

Summary.

11. JavaServer Page.

Overview.

Introduction to JavaServer Pages.

Typical uses of JSP.

Model 1 and Model 2 architectures.

JSP versus Servlet.

Anatomy of a JSP.

Template data.

JSP Elements.

Objects Accessible to a JSP Implicitly.

Tag Libraries.

JSP and the UML.

Modeling Client Side Relationships.

Modeling Server Side Relationships.

JSP in Enterprise Applications.

Summary.

12. Session Beans.

Overview.

Introduction to Enterprise JavaBeans.

Enterprise JavaBean Views and the UML.

Basic Structure.

Representing an Enterprise JavaBean in UML.

Client View.

Internal View.

Session Beans.

Popular Beans

J2EE Versions.

Session Beans Types and Conversational State.

Modeling Session Bean Conversational State.

Instance Passivation.

Cleanup and Removal.

Transactions.

Transaction Demarcation.

Bean-Managed Transactions.

Container-Managed Transactions.

The SessionSynchronization Interface.

Limitations for stateless Session Beans.

Transaction Attributes.

Modeling Transactions.

Session Bean Technology.

Home Interface.

Remote Interface.

Implementation Class.

Modeling Interface Behavior.

Session Bean Lifecycle.

Session Bean Common Scenarios.

Modeling Session Bean Relationships.

Session beans and plain Java classes.

Session beans and JavaBeans.

Session beans and servlets.

Session bean and JSP.

Session-session relationships.

Session bean inheritance.

Identifying Session Beans in Enterprise Applications.

Summary.

13. Entity Beans.

Overview.

Introduction to Entity Beans.

Coarse-Grained Business Objects.

Increasing Popularity.

J2EE Versions.

Entity Bean Views and the UML.

Basic Structure.

Client View.

Internal View.

Persistence.

Transactions and Concurrency.

Abstract Persistence.

Abstract Persistence Schema.

EJB Query Language (EJB QL).

Persistence Manager.

Container-Managed Relationships.

Multiplicity.

Directionality.

Duplicating these Relationships in J2EE 1.2.

Local Relationships.

Entity Bean Technology.

Home Interface.

Remote Interface.

Primary Key Class.

Implementation Class.

Persistent Fields.

Entity Bean Lifecycle.

Entity Bean Common Scenarios.

Modeling Entity Bean Relationships.

Entity Bean and other Java classes.

Entity Bean and JavaBeans.

Entity Bean, Servlets and JSPs.

Entity Bean and Session Beans.

Entity Bean to Entity Bean relationships.

Identifying Entity Beans in Enterprise Applications.

Layering.

Summary.

14. Message-Driven Beans.

Overview.

Introduction to Message Beans.

The Java Message Service.

Role of JMS and Message Beans in EJB.

Why use Messaging and Message Beans.

When to use Message Beans.

J2EE Version.

Message Bean Views and the UML.

Basic Structure.

Client View.

UML Benefits for Message Beans.

Modeling Messages.

Modeling Destinations.

Message Bean Technology.

Transactions.

Implementation Class.

Message Bean Lifecycle.

Message Bean Common Scenario.

Modeling Message Bean Relationships.

Modeling relationships with other classes.

Message Bean and other J2EE technologies.

Identifying Message Beans in Enterprise Applications.

Summary.

15. Assembly and Deployment.

Introduction.

Component Modeling.

Component modeling of J2EE technologies.

Representing Web Components.

Representing Enterprise JavaBeans.

Component modeling of enterprise applications.

Deployment Modeling.

Traceability revisited.

Assembly and deployment of Enterprise Java Applications.

Deployment Descriptors

Summary.

16. Case Study.

Introduction.

Case Study Background.

Problem Statement.

Rationale and Assumptions.

HomeDirect Requirements.

Inquiry Services.

Bill Payment Services.

Transaction Services.

Administrative Services.

Inception Phase.

Initial Iteration.

Elaboration Phase.

Elaboration Iteration#1.

Elaboration Iteration#2.

Elaboration Iteration#3.

Remaining Phases.

Summary.

Appendixes.

Index. 0201738295T07122001

Preface

Developing complex software requires more than just churning out lines of code. As a software architect or developer involved in an industrial project, you must understand and be able to leverage critical software subdisciplines such as architecture, analysis and design techniques, development processes, visual modeling, and the underlying technology to be successful.

This book brings all these diverse elements together from the Java 2 Platform, Enterprise Edition (J2EE) development perspective to provide a holistic approach for the reader. Specifically, this book tries to answer the following key questions:

  • What is the Unified Modeling Language (UML), and how is it relevant to J2EE development?
  • How do Java and UML relate to each other?
  • What are the key concepts in software architecture?
  • How does a software development process fit into the J2EE software development equation?
  • How can analysis and design help you to arrive at a better J2EE application design?
  • What are the key J2EE technologies, and how do they fit together?
  • How can you leverage the UML for J2EE development?

Rather than reinvent the wheel, the approach taken in this book is that of bringing together known works, such as Jim Conallen's Web Modeling Profile and the Sun Java Specification Request-26 for UML/EJB Mapping Specification.

To provide a practical illustration of the topics discussed, this book guides you through a sample J2EE application development project using the Rational Unified Process (RUP) and the UML. A working implementation is provided. Suggestions for further enhancements are also listed to assist you in continuing your exploration of the UML and J2EE technologies.

Intended Audience

This book is suitable for anyone interested in learning about the UML and how it can be applied to J2EE development. Current J2EE application developers will learn how to apply the UML to J2EE application development. UML practitioners will benefit from learning about the J2EE in the context of the UML. And software professionals interested in learning both the UML and J2EE will be able to get to a productive state faster facilitated by the intertwined contextual discussion.

After reading the book, you will

  • Be able to effectively utilize the UML for developing J2EE applications
  • Learn about the key J2EE technologies (EJB, JSP, and servlets) at a technical level
  • Know when to use Model 1 versus Model 2 architecture, and identify situations where patterns such as value object and session bean chaining may be appropriate
  • Understand software architecture concepts such as decomposition, layering, components, frameworks, patterns, and tiers
  • Be able to apply techniques such as use case analysis, analysis object discovery, and analysis to design transformation to your J2EE project
  • Understand the notion of software development processes and the fundamentals of some of the currently popular processes
  • Learn how to start using the RUP for your J2EE project

This book only covers the Java language to the extent of providing a mapping of key Java concepts to the UML. Consequently, some familiarity with Java is assumed (knowing C++ or a similar language should be sufficient to get the basics from the examples). Prior knowledge of, or experience with, the UML, J2EE, or enterprise application development is not a prerequisite, but is certainly helpful.

How to Use This Book

If you are new to the UML and J2EE, you will get the most out of this book by reading it completely in a sequential manner.

Those who are comfortable with the UML and are primarily interested in learning about J2EE (or how to apply the UML to J2EE) can jump directly to Chapters 9-16.

On the other hand, if you know J2EE and mostly want to learn about UML, you should concentrate on Chapters 1-8, and then skim through the remaining portions of the book.

You will get the best results if you get your hands on a good modeling tool and try to apply visual modeling to a problem of your own!

Chapter Summaries

Chapter 1: Introduction to Enterprise Software provides a high-level overview of enterprise software development and related technologies.

Chapter 2: Introduction to the J2EE covers the basics of the Java 2 Platform, Enterprise Edition. It provides an overview of the basic technologies and the APIs, which form the J2EE.

Chapter 3: Introduction to the UML provides an overview of the UML and a quick introduction to the UML basics.

Chapter 4: UML and Java provides an overview of the Java language's mapping to the UML and covers some of the basic UML constructs.

Chapter 5: Overview of Activities introduces the notion of software development processes and outlines the approach taken in the book.

Chapter 6: Architecture, which is an important aspect of good software, introduces the notion of software architecture and provides an overview of some of the concepts in software architecture.

Chapter 7: Analyzing Customer Needs shows you how to apply UML use cases to better understand customer requirements. No matter how cool the software, if it does not meet the customer's requirements, it is a failure!

Chapter 8: Creating the Design focuses on analyzing the requirements further and creating the initial design for the case study. This chapter discusses how to translate the requirements you have gathered into software.

Chapter 9: Overview of J2EE Technologies lays the groundwork for the J2EE technologies we discuss in the remaining chapters.

Chapter 10: Servlets provides an overview of the Java servlet technology, discusses how they are modeled in the UML, and then shows a representative application of UML and servlets to the case study. Java servlets are ideal for the request-response oriented Web paradigm.

Chapter 11: JavaServer Pages teaches you about JSPs, when to use them, and how to use them in the sample project. JavaServer Pages (JSP) combine the power of servlets with the flexibility of HTML pages.

Chapter 12: Session Beans discusses how session beans are used in the middle tier and how to best model and utilize them. Session beans are one of the three types of enterprise beans provided in the J2EE. The chapter concludes with the usage of session beans in the context of the case study.

Chapter 13: Entity Beans focuses on the entity bean concept, its advantages and issues, and how to effectively model it in the UML. Entity beans provide a convenient way to objectify the stored data.

Chapter 14: Message-Driven Beans covers the technology and how to model them in the UML. Message-driven beans are a new addition to the J2EE Enterprise JavaBean specification.

Chapter 15: Assembly and Deployment discusses how UML can help assembly and deployment of a distributed application.

Chapter 16: Case Study discusses the details of the example used in this book including general requirements, restrictions, and such.

References for further reading include books, articles, and online sources.

A Glossary containing specialized terms and their meanings is provided for quick reference. An Index is provided for quick lookup and reference.

Conventions

We use several notational conventions throughout this book. A short list is provided for your reference:

  • Italicized words are used to highlight key concepts or terminology.
  • References to terms such as javax.servlet.http.HttpServletResponse are used to identify the exact J2SE or J2EE classes for further details. For example, in the preceding term the user is being referred to the HttpServletResponse class, which is found in the http package located in the servlet package of the javax package.
  • Boldface text is used to identify keywords and reserved words in the context of Java/J2EE, for example, ejbCreate.
  • Code samples are shown in a slightly different format to distinguish them from plain text, for example, public void acceptOrder() {

0201738295P10052001

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews