WebSphere Version 4 Application Development Handbook

WebSphere Version 4 Application Development Handbook



Product Details

ISBN-13: 9780130092250
Publisher: Pearson Education
Publication date: 03/11/2002
Series: IBM Redbooks
Edition description: 1ST
Pages: 608
Product dimensions: 7.02(w) x 9.26(h) x 1.63(d)

Table of Contents

The Team That Wrote This Redbook.
Special Notice.
IBM Trademarks.
Comments Welcome.


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.


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.


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.


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.




This IBM Redbook provides detailed information on how to develop Webapplications for IBM WebSphere Application Server Version 4 using a variety ofapplication development tools.

The target audience for this book includes team leaders and developers who aresetting up a new J2EE development project using WebSphere Application Serverand related tools. It also includes developers with experience of earlier versionsof the WebSphere product, who are looking to migrate to the Version 4environment.

This book is split into four parts, starting with an introduction, which is followed byparts presenting topics relating to the high-level development activities ofanalysis and design, code, and unit test. A common theme running through allparts of the book is the use of tooling and automation to improve productivity andstreamline the development process.

  • In Part 1 we introduce the WebSphere programming model, the application development tools, and the example application we use in our discussions.
  • In Part 2 we cover the analysis and design process, from requirements modeling through object modeling and code generation to the usage of
  • frameworks.
  • In Part 3 we cover coding and building an application using the Java 2 Software Development Kit, WebSphere Studio Version 4, and VisualAge for Java Version 4. We touch on Software Configuration Management using Rational ClearCase and provide coding guidelines for WebSphere applications. We also cover coding using frameworks, such as Jakarta Struts and WebSphere Business Components.
  • In Part 4 we cover application testing from simple unit testing through application assemand deployment to debugging and tracing. We also investigate how unit testing can be automated using JUnit.

In our examples we often refer to the PiggyBank application. This is a verysimple J2EE application we created to help illustrate the use of the tools,concepts and principles we describe throughout the book.

The team that wrote this redbook

This 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.

Special notice

This publication is intended to help application analysts and developers to createWeb applications for WebSphere Application Server using a variety of applicationdevelopment and test tools. The information in this publication is not intended asthe specification of any programming interfaces that are provided by WebSphereApplication Server. See the PUBLICATIONS section of the IBM ProgrammingAnnouncement for WebSphere Application Server for more information aboutwhat publications are considered to be product documentation.

Comments welcome

Your comments are important to us!

We want our IBM Redbooks to be as helpful as possible. Send us yourcomments about this or other Redbooks in one of the following ways:

  • Use the online Contact us review redbook form found at:
  • Send your comments in an Internet note to:
  • Mail your comments to the address on page ii.

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews