Enterprise Java Programming with IBM WebSphere, 2/e
暫譯: IBM WebSphere 企業 Java 程式設計(第二版)

Kyle Brown, Gary Craig, Greg Hester, David Pitt, Russell Stinehour, Mark Weitzel, Jim Amsden, Peter M. Jakab, Daniel Berg

  • 出版商: Addison Wesley
  • 出版日期: 2003-12-25
  • 售價: $2,450
  • 貴賓價: 9.5$2,328
  • 語言: 英文
  • 頁數: 960
  • 裝訂: Hardcover
  • ISBN: 032118579X
  • ISBN-13: 9780321185792
  • 相關分類: Java 程式語言
  • 立即出貨 (庫存=1)

買這商品的人也買了...

相關主題

商品描述

 

Summary

Foreword by Martin Fowler

Enterprise Java Programming with IBM WebSphere, Second Edition is the definitive guide tobuilding mission-critical enterprise systems with J2EE, WebSphere, and WebSphere StudioApplication Developer. Fully updated for Versions 5.x of WebSphere Application Server andWebSphere Studio Application Developer, it combines expert architectural best practices with acase study that walks you through constructing an entire system.

The authors are an extraordinary team of WebSphere insiders: developers, consultants,instructors, and IBM WebSphere development team members. Together, they offer unprecedentedinsight into the use and behavior of WebSphere's APIs in real-world environments—andsystematic guidance for delivering systems of exceptional performance, robustness, and businessvalue.

Coverage includes—

  • Practical introductions to J2EE, WebSphere Application Server 5.0, and Web application architecture
  • Detailed coverage of Web application construction, including MVC partitioning with Struts, servlets/JSP, and session management
  • Step-by-step guidance for building and testing application business models, including JUnit testing
  • In-depth insight into EJB architecture, including transactions, security, and advanced object relational mapping
  • Web services: examples and best practices leveraging WebSphere Application Server 5.x's latest enhancements

CD-ROMs Included

The CD-ROMs contain trial copies of IBM WebSphere Studio Application Developer (Version 5.0.2),IBM WebSphere Application Server (Version 5.02), and DB2 Universal Database, Personal Edition(Version 8.1.2) for Microsoft Windows 2000/XP. The CD-ROMs also include source code for thecase study examples used in the book.

Table of Contents

Foreword.

Preface.

1. Introduction.

Why Software Development Must Consider the Whole Enterprise. How Iterative Development Addresses Key IT Management Issues. Today's Enterprise Applications Have New Requirements. What Is the Starting Point? What Is a Layered Architecture? Layered Architecture Benefits. Summary.

2. Introduction to the Case Study.

Case Study Analysis and Design Artifacts. Use Case Definitions. Designing the Case Study Domain Model. Using the Case Study in Our Book. Summary.

3. J2EE Overview.

Why J2EE? J2EE Architecture. J2EE Platform Roles. J2EE Versions and Evolution. A J2EE Perspective. Summary.

4. What Is WebSphere?

WebSphere Foundation and Tools. The WAS Core Architecture. Administering a local WAS Server. Leveraging the Scalability of WAS ND. Summary.

5. Presentation Layer Patterns.

Java User Interface Technologies. Decoupling the User Interface. Mediating Logical View Logic. Summary.

6. Servlets.

HTTP Technology Primer. Servlet Concepts. Servlet Life Cycle. An Example Servlet. Web Deployment Descriptors. Filters. Servlet API Classes and Interfaces. Summary.

7. Developing Servlets Using IBM WebSphere Studio Application Developer.

The IBM WebSphere Studio Family of Tools. Building an Example Servlet with WSAD. Some Problems with This Example. Summary.

8. Testing Servlets Using WSAD.

Edit the Web Deployment Descriptor. Summary.

9. Managing Session State.

Some Client-Side Session Approaches. Servlets and Session State. Choosing the Right Approach. Session Persistence. Summary.

10. JavaServer Pages Concepts.

Page Templates and Server-Side Scripting. A Short History of Java Server Pages. Page Compilation—Runtime View. JSP Syntax. Scripting Elements. Directives. JSP Documents. Roles for JSP. Summary.

11. Tag Libraries and Custom Tags.

Introduction. Basic Model for Custom Tags. JSTL and Other Widely Used Tag Libraries. Writing Tag Handlers. Tag Library Descriptor (.tld). Taglib Directive and Coding Custom Actions. Support for Custom Actions. Summary.

12. Design Considerations for Controllers.

Where Do Controllers Come From? Controller Design Alternatives. Exception Handling. Logging. Servlet Filters. Summary.

13. Developing and Testing JSPs in WSAD.

Another Look at MVC. JavaBeans, Introspection, and Contracts. Building Applications Using JSPs with WSAD. Editing JavaServer Pages. Validating the JSP Page. Running on the Server. Debugging the JSP. Simplifying JSPs. XML compliance. Summary.

14. Apache Struts as an MVC Framework.

Road Map. Why Do You Need a Framework? What Is Struts? A Simple MVC Struts Example. Struts Best Practices. Summary.

15. XML/XSL Web Interfaces in WSAD.

Strategy for Using XML/XSL for Web Interfaces. Example XML/XSL Web Interface with WSAD. Creating the XSL File. Enhanced Example of XML/XSL Web Interface with WSAD. Dynamic Example XML/XSL Web Interface with WSAD. When to Use XML/XSL for Web Interfaces. Summary.

16. Developing and Testing the Domain Model.

The Domain Model Layer. The Data Mapping Layer. Testing the Model. Summary.

17. Unit and Functional Testing Applications in WSAD.

Overall Testing Approaches. What Is JUnit? A Simple Example. Unit Testing Containers with Cactus. Function Testing Applications in WSAD. Function Testing. What Is HttpUnit? The HttpUnit API. Following Links. Working with Forms. Working with Tables. Working with Frames. Working with a Document Object Model (DOM). Functional Test Design Considerations. Summary.

18. Supporting Enterprise Applications.

Another Look at the n-Tier Architecture. Why Aren't HTML, Servlets, and JSPs Enough? Object Distribution. Integration Styles and Messaging. Object Persistence. Objects and Transactions. Security in Enterprise Applications. Summary.

19. Basic EJB Architecture.

Core EJB Concepts. The EJB Types. Introducing the EJB Programming Model. 19.4EJBs—Distributed or Not? Basic Architectural Patterns for EJBs. The Role of Persistence. When Do You Need EJBs? Summary.

20. Developing EJBs with WSAD.

The J2EE Perspective. J2EE Projects. Creating a Session Bean. Testing the New Session Bean. Summary.

21. Testing and Debugging EJBs in WSAD.

Developing the Service Layer. Overview of the Testing Process. Summary.

22. EJB Client Development.

Using Servlets as EJB Clients. Building Java Application Clients. Applet Clients in WebSphere. Naming and the WebSphere Namespace. Creating a Test Client. Deploying Application Clients in WebSphere. Deploying and Running the EJB Client to the WebSphere Client Container. Some Design Points about EJB Clients. Summary.

23. Simple CMP Entity Beans.

Entity Bean Basics. CMP in WebSphere and WebSphere Studio. Creating a CMP EJB Using WebSphere Studio. The Parts of an Entity Bean. Deployment Descriptor. Summary.

24. CMP Mapping Strategies and Mapping in WSAD.

Databases, CMPs, and Maps. Multiple Mapping Back-end Support. Exporting Database Tables. EJB Query Language. Summary.

25. Advanced CMP Mapping.

Simple Mapping Rules. Object-Relational Basics. Concepts in EJB 2.0 Relationships. Associations in UML. Relationships in WSAD V5.0. Creating a Single-Valued Relationship. Creating a Multivalued Relationship. Read Ahead Hints. Mapping Relationships. Weak vs Strong Entities. EJB Inheritance in WSAD. Advanced EJB QL. Summary.

26. Bean-Managed Persistence.

Applying BMP. A Simple BMP Bean. Examining BMP Persistence. BMP vs CMP. Summary.

27. Introduction to Message-Driven Beans.

Java Messaging Service. JMS API Basics. Message-Driven Beans. Summary.

28. Transactions in WebSphere 5.0.

JDBC Transactions. Transactions and 2-Phase Commit. JTA and Transaction Demarcation. Enabling 2-PC in WebSphere 5.0. EJBs and Container-Managed Transactions. Participating in a Transaction. Using XA Resources with 2-PC in WebSphere. Transaction Settings for J2EE 1.3 in WAS 5.0. Advice on Using Transactions. Extended Transaction Settings in WebSphere. Special Transaction Considerations for JMS. Dealing with Concurrency. Summary.

29. J2EE Security in WebSphere.

J2EE Security Overview. J2EE Authorization. Securing Resources with WebSphere Studio. EJB Security Recommendations. Handling Instance-Based Security. GUI-Based Security. Summary.

30. Building Layered Architectures for EJB Systems.

Problems with an All-Entity EJB Solution. The Session Façade and DTO Solution. Design Points for Session Façades. Rules for Session Façades. Reasons for EJB Objects. A Simple Example from the Case Study. A More Complex Example. Mappers Revisited. Simulated Mappers. An Updating Example. Testing the Session Façade Example with JUnit. Running the Test Client. Rules for Creating Session Façades. Should Session Façades Return XML? Summary.

31. Implementing the Case Study User Interface.

User's Guide. Summary.

32. An Introduction to J2EE Web Services for WebSphere.

If Web Services Is the Solution, What's the Problem? Web Services Architecture. Web Services in J2EE. Web Services in WAS. The Standardization Nightmare. Summary.

33. Constructing J2EE Web Services for WebSphere.

Getting Started with Web Services. Building Web Service Clients. Summary.

34. Web Services Architectures and Best Practices.

Some Web Services Dos and Don'ts. Addressing the Limitations of Web Services. Choosing the Right Level of Granularity in SOA. Interoperability Lessons Learned. Summary.

35. A Final Look.

Application Layering. Case Study and J2EE Technologies. Tooling. A Parting Thought.

Appendix A: Installing Products and Examples from the CDs.

Installing the Products from the CDs. Installing the Case Study Examples.

Appendix B: Constructing J2EE Web Services Using WSAD 5.1.

What's New? Creating the RandomIDGenerator Service. Running and Testing the RandomIDGenerator Service. Using the Existing J2SE Client. Summary.

Bibliography.
Index.

商品描述(中文翻譯)

摘要

馬丁·福勒(Martin Fowler)序言

《IBM WebSphere 的企業 Java 程式設計(第二版)》是使用 J2EE、WebSphere 和 WebSphere Studio 應用程式開發者構建關鍵任務企業系統的權威指南。該書已全面更新至 WebSphere 應用程式伺服器和 WebSphere Studio 應用程式開發者的 5.x 版本,結合了專家的架構最佳實踐和案例研究,帶您逐步構建整個系統。

作者是一支由 WebSphere 內部人士組成的卓越團隊:開發人員、顧問、講師以及 IBM WebSphere 開發團隊成員。他們共同提供了前所未有的見解,幫助您了解 WebSphere 的 API 在實際環境中的使用和行為,並提供系統化的指導,以交付具有卓越性能、穩健性和商業價值的系統。

內容涵蓋—

- J2EE、WebSphere 應用程式伺服器 5.0 和 Web 應用程式架構的實用介紹
- Web 應用程式構建的詳細內容,包括使用 Struts 的 MVC 分區、servlet/JSP 和會話管理
- 構建和測試應用程式商業模型的逐步指導,包括 JUnit 測試
- 深入了解 EJB 架構,包括事務、安全性和高級物件關聯映射
- Web 服務:利用 WebSphere 應用程式伺服器 5.x 最新增強功能的範例和最佳實踐

隨附 CD-ROM

CD-ROM 包含 IBM WebSphere Studio 應用程式開發者(版本 5.0.2)、IBM WebSphere 應用程式伺服器(版本 5.02)和 DB2 通用資料庫個人版(版本 8.1.2)在 Microsoft Windows 2000/XP 上的試用版。CD-ROM 還包括書中使用的案例研究範例的源代碼。

目錄

序言。

前言。

1. 介紹。

為什麼軟體開發必須考慮整個企業。迭代開發如何解決關鍵的 IT 管理問題。當今的企業應用程式有新的需求。起點是什麼?什麼是分層架構?分層架構的好處。總結。

2. 案例研究介紹。

案例研究分析和設計文檔。用例定義。設計案例研究領域模型。在本書中使用案例研究。總結。

3. J2EE 概述。

為什麼選擇 J2EE?J2EE 架構。J2EE 平台角色。J2EE 版本及其演變。J2EE 的觀點。總結。

4. 什麼是 WebSphere?

WebSphere 基礎和工具。WAS 核心架構。管理本地 WAS 伺服器。利用 WAS ND 的可擴展性。總結。

5. 表現層模式。

Java 使用者介面技術。解耦使用者介面。調解邏輯視圖邏輯。總結。

6. Servlets。

HTTP 技術入門。Servlet 概念。Servlet 生命週期。一個範例 Servlet。Web 部署描述符。過濾器。Servlet API 類和介面。總結。

7. 使用 IBM WebSphere Studio 應用程式開發者開發 Servlets。

IBM WebSphere Studio 工具系列。使用 WSAD 構建範例 Servlet。此範例的一些問題。總結。

8. 使用 WSAD 測試 Servlets。

編輯 Web 部署描述符。總結。

9. 管理會話狀態。

一些客戶端會話方法。Servlet 和會話狀態。選擇正確的方法。會話持久性。總結。

10. JavaServer Pages 概念。

頁面模板和伺服器端腳本。Java Server Pages 的簡短歷史。頁面編譯—運行時視圖。JSP 語法。腳本元素。指令。JSP 文件。JSP 的角色。總結。

11. 標籤庫和自定義標籤。

介紹。自定義標籤的基本模型。JSTL 和其他廣泛使用的標籤庫。編寫標籤處理器。標籤庫描述符 (.tld)。標籤庫指令和編碼自定義操作。支持自定義操作。總結。

12. 控制器的設計考量。

控制器來自何處?控制器設計替代方案。異常處理。日誌記錄。Servlet 過濾器。總結。

13. 在 WSAD 中開發和測試 JSP。

再次看 MVC。JavaBeans、內省和契約。使用 WSAD 構建 JSP 應用程式。編輯 JavaServer Pages。驗證 JSP 頁面。在伺服器上運行。調試 JSP。簡化 JSP。XML 合規性。總結。

14. Apache Struts 作為 MVC 框架。

路線圖。為什麼需要框架?什麼是 Struts?一個簡單的 MVC Struts 範例。Struts 最佳實踐。總結。

15. 在 WSAD 中使用 XML/XSL 的 Web 介面。

使用 XML/XSL 進行 Web 介面的策略。使用 WSAD 的範例 XML/XSL Web 介面。創建 XSL 文件。使用 WSAD 的增強範例 XML/XSL Web 介面。使用 WSAD 的動態範例 XML/XSL Web 介面。何時使用 XML/XSL 進行 Web 介面。總結。

16. 開發和測試領域模型。

領域模型層。數據映射層。測試模型。總結。

17. 在 WSAD 中進行單元和功能測試應用程式。

整體測試方法。什麼是 JUnit?一個簡單的範例。使用 Cactus 進行容器單元測試。在 WSAD 中進行功能測試應用程式。功能測試。什麼是 HttpUnit?HttpUnit API。跟隨鏈接。處理表單。處理表格。處理框架。處理文檔物件模型 (DOM)。功能測試設計考量。總結。

18. 支持企業應用程式。

再次看 n-Tier 架構。為什麼 HTML、Servlet 和 JSP 不夠?物件分配。整合風格和消息傳遞。物件持久性。物件和事務。企業應用程式中的安全性。總結。

19. 基本 EJB 架構。

核心 EJB 概念。EJB 類型。介紹 EJB 程式設計模型。EJB—分散式還是非分散式?EJB 的基本架構模式。持久性的角色。何時需要 EJB?總結。

20. 使用 WSAD 開發 EJB。

J2EE 的觀點。J2EE 專案。創建會話 Bean。測試新的會話 Bean。總結。

21. 在 WSAD 中測試和調試 EJB。

開發服務層。測試過程概述。總結。

22. EJB 客戶端開發。

使用 Servlets 作為 EJB 客戶端。構建 Java 應用程式客戶端。WebSphere 中的 Applet 客戶端。命名和 WebSphere 命名空間。創建測試客戶端。在 WebSphere 中部署應用程式客戶端。將 EJB 客戶端部署並運行到 WebSphere 客戶端容器。一些關於 EJB 客戶端的設計要點。總結。

23. 簡單的 CMP 實體 Beans。

實體 Bean 基礎。WebSphere 和 WebSphere Studio 中的 CMP。使用 WebSphere Studio 創建 CMP EJB。實體 Bean 的組成部分。部署描述符。總結。

24. CMP 映射策略和在 WSAD 中的映射。

數據庫、CMP 和映射。多重映射後端支持。導出數據庫表。EJB 查詢語言。總結。

25. 高級 CMP 映射。

簡單映射規則。物件關聯基礎。EJB 2.0 關係中的概念。UML 中的關聯。在 WSAD V5.0 中的關係。創建單值關係。創建多值關係。提前讀取提示。映射關係。弱實體與強實體。WSAD 中的 EJB 繼承。高級 EJB QL。總結。

26. Bean 管理的持久性。

應用 BMP。一個簡單的 BMP Bean。檢查 BMP 持久性。BMP 與 CMP。總結。

27. 消息驅動 Bean 介紹。

Java 消息服務。JMS API 基礎。消息驅動 Bean。總結。

28. WebSphere 5.0 中的事務。

JDBC 事務。事務和兩階段提交。JTA 和事務劃分。在 WebSphere 5.0 中啟用 2-PC。EJB 和容器管理的事務。參與事務。使用 XA 資源與 WebSphere 中的 2-PC。WAS 5.0 中 J2EE 1.3 的事務設置。使用事務的建議。WebSphere 中的擴展事務設置。JMS 的特殊事務考量。處理並發。總結。

29. WebSphere 中的 J2EE 安全性。

J2EE 安全概述。J2EE 授權。使用 WebSphere Studio 保護資源。EJB 安全建議。處理基於實例的安全性。基於 GUI 的安全性。總結。

30. 為 EJB 系統構建分層架構。

全實體 EJB 解決方案的問題。會話外觀和 DTO 解決方案。會話外觀的設計要點。會話外觀的規則。EJB 物件的理由。案例研究中的簡單範例。一個更複雜的範例。重新檢視映射器。模擬映射器。一個更新範例。使用 JUnit 測試會話外觀範例。運行測試客戶端。創建會話外觀的規則。會話外觀應該返回 XML 嗎?總結。

31. 實現案例研究用戶介面。

用戶指南。總結。

32. WebSphere 的 J2EE Web 服務介紹。

如果 Web 服務是解決方案,那麼問題是什麼?Web 服務架構。J2EE 中的 Web 服務。WAS 中的 Web 服務。標準化的噩夢。總結。

33. 為 WebSphere 構建 J2EE Web 服務。

開始使用 Web 服務。構建 Web 服務客戶端。總結。

34. Web 服務架構和最佳實踐。