WebSphere Version 4 Application Development Handbook
The complete guide to WebSphere Version 4.0 development -- straight from IBM's WebSphere experts!-- Start-to-finish application coding and construction using the Java 2 SDK, WebSphere Studio Version 4, and VisualAge for Java Version 4.-- Includes extensive coverage of J2EE support, new Web Services packaging and deployment options, and other Version 4 enhancements.-- Covers the entire application lifecycle: analysis, design, code generation, frameworks, coding, testing, debugging, deployment, and beyond.This is the first systematic and authoritative guide to application development with IBM's WebSphere Version 4.0 platform. Written by IBM's own WebSphere experts, it offers especially detailed insights into WebSphere Version 4.0's key enhancements -- notably, its outstanding support for Java 2 Enterprise Edition. The authors introduce the WebSphere platform, programming model, and application development tools, and then review each key activity associated with WebSphere development, including analysis, design, coding, and testing. Next, the authors walk through coding and constructing an application using the Java 2 Software Development Kit, WebSphere Studio Version 4 and VisualAge for Java Version 4. A simple J2EE application is used throughout to illustrate key concepts, principles, and techniques.
- Paperback | 608 pages
- 178.3 x 235.2 x 41.4mm | 1,120.38g
- 11 Mar 2002
- Pearson Education (US)
- IBM Press
- Armonk, United States
- w. figs.
Table of contents
Preface. The Team That Wrote This Redbook. Special Notice. IBM Trademarks. Comments Welcome. I. INTRODUCTION. 1. WebSphere Programming Model. Characteristics of the Programming Model. Architectures Supported by WebSphere. Web-based Client/Server Applications. Distributed Object-Based Applications. Web-Enabled Distributed Object Applications. Features of a Programming Model Driven Design. Application Components. Browser-Hosted Components. Web Application Server Hosted Components. Distributed Object Server-Hosted Components. Control Flow Mechanisms. Browser Component Initiated Control Flow. Web Application Server Component Initiated Control Flow. Data Flow Sources. Browser-Maintained Data Flow Sources. Web Application Server Maintained Data Flow Sources. Enterprise Server-Maintained Data Sources. Chapter Summary. Summary of Programming Model Aspects. Meeting the Challenges.2. Tools Overview. IBM Tools. WebSphere Application Server Version 4.0. WebSphere Studio Version 4.0. VisualAge for Java Version 4.0. WebSphere Business Components Composer. Third Party Tools. Rational Rose. Rational ClearCase. Jakarta Ant. Jakarta Log4J. Jakarta Struts. JUnit.3. About the PiggyBank Application. Introducing the PiggyBank Application. What is a Piggy Bank? Functional Overview. Standalone Client. Web Client. Security Functionality. Application Architecture. Application Modules. Common Code. EJBs. Use Cases. Standalone Client. Web Client. Application Implementation. Application Delivery.II. ANALYSIS AND DESIGN. 4. Overview of Development Activities. Analysis and Design Activities. Assembling a Development Team. Development Roles. Patterns. Model-View-Controller Pattern. Command Pattern.5. Requirements Modeling. Use Case Analysis. PiggyBank Use Cases. PiggyBank Use Case Diagram in Rational Rose. Use Case Descriptions in VisualAge for Java. Use Case Realization. The Basic Approach. Servlet Mapping. MVC Pattern. Facade Pattern. Servlet Multiplexing. Command Pattern. Display Commands. The Value of Commands. Command Granularity. Using Session Beans. Relationship between Command Beans and EJB Session Beans. Caching. External Systems Integration. Representing External Use Cases. Realizing Proxy Use Cases. Representing Agents in VisualAge for Java. Designing the user interface. Screen composition. Navigation. Use case commands. Intermediate commands.6. Modeling and Code Generation. Code Generation. Round Tripping. Setting the Default Language for Rose. Code Generation and Reverse Engineering. Code Generation. Reverse Engineering. Integration with VisualAge for Java. VisualAge for Java Rational Rose bridge. XMI Toolkit. Plain Java Files. Designing EJBs with Rational Rose. Creating an EJB with Rose. Generating EJB Code. Importing an EJB from Rose into VisualAge for Java.7. Designing with Frameworks. Introduction. Starting with a Framework. What is a Framework? Frameworks Drawbacks. Framework Adoption. Integration with the Tools. Jakarta Struts. When to Use Struts. Servlet Controller. Action Objects. Form Beans. Custom Tags. Internationalization. Code Dependencies. Downsides. Development. WebSphere Business Components Composer. When to use WSBCC. Deployment and Maintenance. Architecture. WSBCC Elements. Development.III. CODING THE APPLICATION. 8. Setting Up a Development Environment. Planning for Development. Defining the Deliverables. Choosing Your Tools. Automation Opportunities.Chapter 9. Development Using the Java 2 Software Development Kit. Organizing the Project Directory Structure. Using the Java 2 SDK to Build the Application. Tools in the Java 2 SDK. Setting Up the Environment. Compiling the Source Code. Creating the Common JAR File. Creating the EJB JAR File. Creating the Use Case JAR File. Creating the WAR file. Creating the Client JAR File. Generating Documentation. Using Ant to Build a WebSphere Application. What is Ant? Installing and Configuring Ant. Ant Build Files. Built-In Tasks. Creating Build Files for the PiggyBank Application. Master Build File. Building the Common Code. Building the EJBs. Building the Use Cases. Building the Standalone Client Application. Building the Web Application. Further Automation Opportunities Using Ant. Working with Meta-Data. Meta-Data in WebSphere. J2EE Deployment Descriptors. WebSphere Deployment Information. Manifest Information. Creating and Editing Meta-Data Files.10. Development Using WebSphere Studio. Developing Web Applications with WebSphere Studio. WebSphere Studio Components. New Features in WebSphere Studio Version 4.0. Structuring the Project in Studio. Working in a Team Environment with Studio. Custom Tag Libraries. Integration with VisualAge for Java. Setup. Interfacing with VisualAge for Java from Studio. Interfacing with Studio from VisualAge for Java. Integration with Other Development Tools. Creating and Publishing WAR Files. Creating the WAR File. Web Services Wizards. Web Services Creation Wizard. Web Services Consumption Wizard.11. Development Using VisualAge for Java. The Integrated Development Environment (IDE). Configuring the Projects and Packages. Generating Documentation in VisualAge for Java. Working in a Team Environment. Developing Web Applications with VisualAge for Java. Developing Servlets. Developing JSPs. Developing EJBs in VisualAge for Java. WebSphere Test Environment. Configuration. WebSphere Test Environment Control Center. Servlet Engine. Persistent Name Server. Using DataSource Objects with the WTE. JSP Execution Monitor. Exporting the Code. Exporting the EJB code. EJB Deployment Tool. Debugging in VisualAge for Java.12. Development with Frameworks. Jakarta Struts. Using Struts in Your Development Environment. Struts Configuration File. Building a Struts Form. Building a Struts Action. Form Validation. Message Facility. Internationalization. Struts Conclusions. Websphere Business Components Composer. Importing WSBCC into VisualAge for Java. WebSphere Studio Setup. WTE Setup. Automatic Server Startup. Building WSBCC Operations. Extending XML Externalization. Login. Legacy Example. Writing a WSBCC Service. Generic WSBCC Operations. Dealing with Contexts. Defining Formats. Presentation. What We Have Achieved in This Chapter.13. Guidelines for Coding WebSphere Applications. Using JNDI. Obtaining an InitialContext. Local and Global JNDI Namespaces. Caching JNDI Lookup Results. Message Logging. Why Do We Need a Logging Framework? What Do We Need from a Logging Framework? Piggybank Log Wrapper. Choosing a Framework. Using the WebSphere JRas Facility. Using Log4J. Logging Conclusions. Coding for Performance. General Performance Tips. JSP and Servlet Performance Tips. EJB Performance Tips. Managing Application Versions. Specifying the Application Name. Partitioning Web applications in the URI Namespace. Partitioning EJBs in the JNDI Namespace. Partitioning Access to Database and Other Resources. Automation Opportunities.14. Software Configuration Management. Introduction. Reference.IV. UNIT TESTING THE APPLICATION. 15. Assembling the Application. Application Assembly Tool (AAT). Starting the Application Assembly Tool. Using the Interface. Creating a Web Module. Creating an EJB Module. Creating an Application Client Module. Assembling the Complete Application: The EAR File. EJB Deployment Tool. What Does the EJB Deployment Tool Do? When Is the EJB Deployment Tool Executed? Why would I Want to Run the EJB Deployment Tool Myself? Customizing CMP Persistence Mapping. Migrating and Validating EJB JAR Files.16. Deploying to the Test Environment. EARExpander Command Line Tool. SEAppInstall Command Line Tool. Single Server Edition: The Browser-Based Console. Starting the Application Server. Launching the Administrative Console in a Browser. Administering Applications Through the Console. Stopping the AEs Application Server. Advanced Edition: The Stand-Alone Console. Start and Stop. Starting the Console. Installing New Applications. Uninstalling Applications. Setting Up Resources. Web Server Plugin. Application Client Resource Configuration Tool. Other Tools in the Advanced Edition. XMLConfig. WSCP. Performing a Unit Test: Executing the Application. Launching the Web Application. Launching the Client Application with the Launchclient Tool.17. Debugging the Application. Debugging with VisualAge for Java Version 4.0. Working with Breakpoints. Exceptions. Debugging External Classes. Inspecting Data. Debugging Code Snippets. Debugging with the Distributed Debugger and OLT. Enabling Debugging Support in WebSphere Application Server. Enabling Support in Advanced Edition. Enabling Support in Advanced Edition, Single Server. Using Object Level Trace. Using the Distributed Debugger. Debugging WebSphere Studio Code. A Special Case: How to Debug a JSP. Debugging JSPs in VisualAge for Java. Debugging Studio JSPs: The Distributed Debugger. Debugging JSPs in WebSphere Application Server.18. Automating Unit Testing Using JUnit. Unit Testing. What is Unit Testing? Why Unit Testing? Benefits of a Unit Testing Framework. Junit. Installing Junit. Organizing our tests. Test case for a simple Java class. Test case for an EJB. Automating unit testing using Ant. Conclusions.Appendix A: Additional material. Locating the Web Material. Using the Web Material. System Requirements for Downloading the Web Material. How to Use the Web Material. Installing and Running the PiggyBank Application. Importing the Sample Code into VisualAge for Java. Using the Ant Samples. Related Publications. IBM Redbooks. Other Resources. Referenced Web Sites. How to Get IBM Redbooks. IBM Redbooks Collections. Special Notices. Abbreviations and Acronyms.Index.
About Ueli Wahli
The team that wrote this redbookThis redbook was produced by a team of specialists from around the worldworking at the International Technical Support Organization, San Jose Center.Ueli Wahli is a Consultant IT Specialist at the IBM International TechnicalSupport Organization in San Jose, California. Before joining the ITSO 17 yearsago, Ueli worked in technical support at IBM Switzerland. He writes extensivelyand teaches IBM classes worldwide on application development, objecttechnology, VisualAge products, data dictionaries, and library management. Ueliholds a degree in Mathematics from the Swiss Federal Institute of Technology.Alex Matthews is a Consulting IT Specialist in the IBM Software Business,based in London, United Kingdom (UK). He has spent the last two and a halfyears providing post-sales services to customers who have purchasedWebSphere products and related tools. Alex has seven years experience buildingdistributed systems using a variety of middleware products. He holds a degree inComputing Science from Aston University, Birmingham, UK.Paula Coll Lapido works as an IT Specialist in the e-business Innovation Centerat Madrid, Spain. Her current area of expertise focuses on developing e-businessapplications using the WebSphere platform. She has been working at IBM forone year and a half. She holds a degree in Physics from the ComplutenseUniversity of Madrid.Jean-Pierre Norguet is an IT Specialist, Team Leader and Coach in the IBMe-business department in Belgium. He has been working at IBM for three years.His areas of expertise include the entire application development life cycle. Heholds a 5-year Engineering degree in Computer Science from the UniversiteLibre de Bruxelles and a Socrates European master's degree from the EcoleCentrale Paris.