Skip to:Content
|
Bottom
Cover image for Eclipse Web tools platform : developing Java Web applications
Title:
Eclipse Web tools platform : developing Java Web applications
Personal Author:
Series:
The eclipse series
Publication Information:
Upper Saddle River, NJ : Addison Wesley, 2007
Physical Description:
xxvi, 724 p. : ill. ; 24 cm.
ISBN:
9780321396853

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010176209 TK5105.888 D344 2007 Open Access Book Book
Searching...

On Order

Summary

Summary

Discover WTP, the New End-to-End Toolset for Java-Based Web Development The Eclipse Web Tools Platform (WTP) seamlessly integrates all the tools today's Java Web developer needs. WTP is both an unprecedented Open Source resource for working developers and a powerful foundation for state-of-the-art commercial products.

Eclipse Web Tools Platform offers in-depth descriptions of every tool included in WTP, introducing powerful capabilities never before available in Eclipse. The authors cover the entire Web development process-from defining Web application architectures and development processes through testing and beyond. And if you're seeking to extend WTP, this book provides an introduction to the platform's rich APIs. The book also

Presents step-by-step coverage of developing persistence, business logic, and presentation tiers with WTP and Java Introduces best practices for multiple styles of Web and Java EE development Demonstrates JDBC database access and configuration Shows how to configure application servers for use with WTP Walks through creating Web service application interfaces Covers automated testing with JUnit and Cactus, and automated builds utilizing Ant, Maven, and CruiseControl Introduces testing and profiling Web applications with the Eclipse Test and Performance Tools Platform (TPTP) project Describes how to extend WTP with new servers, file types, and WSDL extensions Foreword
Preface
Acknowledgments
About the Authors
Part I: Getting Started
Chapter 1: Introduction
Chapter 2: About the Eclipse Web Tools Platform Project
Chapter 3: Quick Tour
Chapter 4: Setting Up Your Workspace
Part II: Java Web Application Development
Chapter 5: Web Application Architecture and Design
Chapter 6: Organizing Your Development Project
Chapter 7: The Presentation Tier
Chapter 8: The Business Logic Tier
Chapter 9: The Persistence Tier
Chapter 10: Web Services
Chapter 11: Testing
Part III: Extending WTP
Chapter 12: Adding New Servers
Chapter 13: Supporting New File Types
Chapter 14: Creating WSDL Extensions
Chapter 15: Customizing Resource Resolution
Part IV: Products and Plans
Chapter 16: Other Web Tools Based on Eclipse
Chapter 17: The Road Ahead
Glossary
References
Index

This book is an invaluable resource for every Eclipse and enterprise Java Web developer: both those who use Eclipse to build other Web applications, and those who build Eclipse technologies into their own products.

Complete source code examples are available at www.eclipsewtp.org .


Author Notes

Naci Dai, chief scientist and founder of eteration, a.s., is a member of the WTP project management committee, leads its JST subproject, and leads the Open Source Lomboz project, which was a part of the initial code contributed to WTP to seed the project.

Lawrence Mandel, a software architect and developer at at the IBM Toronto Laboratory, is a WTP committer and served as the project's ecosystem and documentation lead up until the 1.5.2 release.

Arthur Ryman, software architect and development manager at the IBM Toronto Laboratory, has a decade's experience building Java Web development tools. He led the creation of the WTP project, and led the WST subproject up until the release of WTP 1.5.


Excerpts

Excerpts

Our goal in writing this book was to help build the community around the Eclipse Web Tools Platform (WTP) Project. We decided to write this book soon after WTP was approved by the Eclipse Foundation. At that time, the project was in its formative stages and there was virtually nothing written about WTP. We believed that a book on how to use and extend WTP would help promote its adoption. We naively hoped that we would have this book finished soon after WTP 0.7 was released in July 2005. However, since we were all actively engaged in developing WTP, work on this book got delayed. Also, many significant changes in the design of WTP were planned, so we felt it was better to have the book describe the next major version, WTP 1.5, which was part of the Eclipse 3.2 Callisto simultaneous release in June 2006. Allowing WTP to mature also gave us more time to develop and refine the material in this book. Much of the material in this book has been test-driven at several major software development conferences including EclipseCon, EclipseWorld, Rational Software Development Conference, and Colorado Software Summit. Attendees at those events provided valuable feedback that has improved the content of this book. Since the WTP 1.5 release, there has been increasing adoption of WTP by both commercial and Open Source tool developers. This activity has generated a stream of maintenance releases. As we went into production, this book accurately reflected the content of WTP 1.5.2, but by the time it appears in print, the latest release should be WTP 1.5.3. However, each maintenance release should only contain bug fixes and not affect the user interface. This book should therefore also be accurate for WTP 1.5.3 and future maintenance releases. And although WTP 2.0, which is planned for June 2007, will certainly contain many enhancements, we expect that most of the content of this book will still be valid. About This Book This book is divided into four parts: Getting Started, Java Web Application Development, Extending WTP, and Products and Plans. In Part I, Getting Started, we introduce you to WTP. We give a brief overview of the history and architecture of the project and discuss how you can contribute to its development. By being an active contributor as well as a user, you can help improve WTP and ensure its long-term success. We also introduce you to League Planet, a fictitious amateur sport Web site, which serves as the inspiration for the programming examples in the rest of the book. Next we take you on a Quick Tour of WTP in which you build a simple Web application that includes dynamic content generated by servlets and JSPs running on Tomcat, JDBC database access to Derby, and Web services running on Axis. We conclude with a detailed discussion of how to install WTP and tailor it to your needs using its many preferences. At the end of this part, you'll be able to start building your own Java Web applications with WTP. Part II, Java Web Application Development, is for Java Web application developers. We describe the architecture of Java Web applications and how to build them using WTP. We start with a discussion of how to set up your project, including the use of Maven for automated builds. We then discuss architecture in some detail. Java Web applications have a multi-tiered architecture, and each of the presentation, business logic, and persistence tiers is addressed in its own chapter. The presentation tier chapter covers tools for HTML, CSS, JavaScript, XML, DTD, and XSLT. The business logic tier chapter discusses tools for EJBs and XDoclet. The persistence tier chapter describes tools for SQL. Next we focus on developing Web services, including tools for SOAP, WSDL, XSD, and UDDI. We close with a discussion of testing, including JUnit, Cactus, HttpUnit, and the Eclipse Test and Performance Tools Platform (TPTP). In Part III, Extending WTP, we shift attention to developing Eclipse plug-ins that extend WTP. This part of the book is aimed at tool developers. WTP contains many plug-ins and extension points, so the coverage here serves mainly to illustrate the process. A comprehensive treatment of all the APIs in WTP would itself fill several books. We start with the important example of adding a new server runtime to WTP, and illustrate this by adding support for GlassFish, the reference implementation for Java Enterprise Edition 5 (Java EE 5). Next, we show how to add support for new file types and do so for DocBook, the XML format used for authoring books (such as this one). We follow that by describing how to support new WSDL extensions and add a new SOAP binding as an example. We conclude this subject by extending the URI resolution framework, which enables XML processors to locate resources. The book wraps up with Part IV, Products and Plans. We begin with a brief survey of commercial and Open Source Eclipse-based Web development products that can be used with WTP. Although WTP contains a core set of useful tools, it is also a platform intended to be built on by others. After you master WTP, you may find that your tool needs are not fully satisfied. Perhaps you want to develop with Struts, Hibernate, or Spring. Or you may want to use a different Web development language, such as PHP, Python, or Ruby, in conjunction with Java. Fortunately, there are many products available to round out your Web development IDE. We end the book with a preview of functions we expect to be added to WTP in future releases. WTP is currently hosting subprojects for JavaServer Faces (JSF), Java Persistence Architecture (Dali), and AJAX (ATF). In addition, WTP is planning tighter integration with other Eclipse projects, as well as support for Java EE 5. Of course, the future of WTP largely depends on you. By becoming an active user and contributor, you will influence the continuing support and evolution of WTP. Audience This book is primarily written for Java Web application developers. We assume that you have a working knowledge of Java programming and some experience using Eclipse. There are many excellent books available that cover both topics. Some experience in Java Web application development is also desirable. We have made an attempt to introduce the subject of Java Web application development in addition to describing the tools available in WTP. Although this book deals with WTP, it will also be of use to users of products built on WTP. And remember, one of the best ways you can contribute to WTP is by reporting bugs. If you hit a bug while using WTP, please report it to the Eclipse Bugzilla system at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web+Tools This book also includes material for Eclipse plug-in developers who want to extend WTP. Experience in plug-in development is assumed. Several available books cover the topic of Eclipse plug-in development for those who need some background information. Although we expect commercial and Open Source projects to extend WTP, we also expect individuals to do so. If you develop a cool plug-in that fits within the scope of the WTP charter, please consider contributing it to WTP. To do so, start by sending a note to the WTP developers mailing list at wtp-dev@eclipse.org Sample Code The Web site for this book is located at http://www.eclipsewtp.org All of the example code used throughout this book can be downloaded from there. The site will also provide an errata list, and other news related to the book. The following Eclipse components are required to run the examples in this book: Eclipse Software Development Kit (SDK), Version 3.2 Eclipse Modeling Framework (EMF), Version 2.2 Graphical Editing Framework (GEF), Version 3.2 Java Edit Model (JEM), Version 1.2 Web Tools Platform (WTP), Version 1.5 All of the above are available from http://download.eclipse.org/webtools/downloads Conventions We use a sans serif font for user interface elements such as menu items, buttons, and labels. We use a monospace font for programmatic elements such as file names, source code listings, URLs, package names, and XML content. Feedback We've set up an e-mail address to receive feedback about this book. Please send your comments on this book to feedback@eclipsewtp.org Excerpted from Eclipse Web Tools Platform: Developing Java Web Applications by Lawrence Mandel, Naci Dai, Arthur Ryman All rights reserved by the original copyright owners. Excerpts are provided for display purposes only and may not be reproduced, reprinted or distributed without the written permission of the publisher.

Table of Contents

Forewordp. xvii
Prefacep. xix
Acknowledgmentsp. xxiii
About the Authorsp. xxv
Part I Getting Startedp. 1
Chapter 1 Introductionp. 3
Java Web Application Development and Eclipsep. 3
What This Book Containsp. 4
How This Book Is Organizedp. 5
Source Code Examplesp. 8
Introducing League Planetp. 9
Summaryp. 10
Chapter 2 About the Eclipse Web Tools Platform Projectp. 13
WTP Is Bornp. 13
WTP Economicsp. 15
The Structure of WTPp. 22
Contributing to WTPp. 37
Summaryp. 40
Chapter 3 Quick
Tourp. 41
Overviewp. 41
Iteration 1 J2EE Web Applicationsp. 44
Iteration 2 Servlets and Scriptletsp. 60
Iteration 3 Database Accessp. 71
Iteration 4 Web Servicesp. 82
Summaryp. 88
Chapter 4 Setting
Up Your Workspacep. 91
Installing and Updating WTPp. 91
Configuring WTPp. 105
Summaryp. 110
Part II Java
Web Application Developmentp. 111
Chapter 5 Web Application Architecture and Designp. 113
The Web Landscapep. 113
Web Applicationsp. 115
Service-Oriented Architecture (SOA)p. 130
Case Study: League Planetp. 133
Summaryp. 135
Chapter 6 Organizing
Your Development Projectp. 137
Web Project Types and J2EE Applicationsp. 138
Advanced Web Projectsp. 160
Example Projectsp. 165
Summaryp. 196
Chapter 7 The Presentation Tierp. 199
Introductionp. 199
Interaction Designp. 200
Graphic Designp. 203
The Structure of the Presentation Tierp. 204
Iteration 1 Static Web Projects, HTML, and the Iteration 2: CSSp. 230
Iteration 3 JavaScriptp. 234
Iteration 4 XML and XSLTp. 248
Iteration 5 DTDp. 257
Iteration 6 Servers, Dynamic Web Projects, and Servletsp. 261
Iteration 7 JSPp. 279
Iteration 8 Monitoring HTTP Sessionsp. 289
Summaryp. 295
Chapter 8 The Business Logic Tierp. 297
A Common Business Tier Designp. 300
Iteration 1 The Domain Modelp. 301
Iteration 2 Developing Session EJBsp. 325
Iteration 3 Message-Driven Beansp. 358
Summaryp. 367
Chapter 9 The Persistence Tierp. 369
Designs for the Persistence Layerp. 370
Overview of Iterationsp. 374
Iteration 1 Creating a Databasep. 375
Iteration 2 Data Layerp. 386
Iteration 3 Entity Beansp. 392
Summaryp. 418
Chapter 10 Web Servicesp. 421
WSDLp. 422
SOAPp. 423
REST

p. 424

REST Style Web Servicesp. 426
Overview of Iterationsp. 427
Iteration 1 Developing Web Services Top-Downp. 428
Iteration 2 Developing Web Services Bottom-Upp. 454
Iteration 3 Generating Web Service Client Proxiesp. 464
Iteration 4 Testing Web Services for Interoperabilityp. 470
Iteration 5 Using Web Services in Web Applicationsp. 477
Iteration 6p. 494
Summary 508
Chapter 11 Testingp. 509
Automated Testingp. 511
Overview of Iterationsp. 512
Iteration 1 Unit Testing with JUnitp. 512
Iteration 2 Integration Testing with Cactusp. 520
Iteration 3 System Testing with HttpUnitp. 528
Iteration 4 Performance Testing with TPTPp. 533
Iteration 5 Profiling with TPTPp. 540
Summaryp. 546
Part III Extending
WTPp. 549
Chapter 12 Adding New Serversp. 551
Overview of Adding a Generic Server Adapterp. 554
The GlassFish Server Runtimep. 554
Server Adapter Plug-Insp. 556
Adding Support for a New Server Runtimep. 558
Adding a New Server Type for a Runtimep. 561
Adding a New Runtime Target Handlerp. 562
Facets and Runtime Componentsp. 563
Extending the Server Tools UIp. 565
The Generic Server Definitionp. 566
Publishersp. 570
Testing the Server Adapterp. 573
Summaryp. 580
Chapter 13 Supporting
New File Typesp. 583
Creating the DocBook Extension Plug-Inp. 585
The DocBook Validatorp. 585
Creating a Custom Marker Typep. 598
Declaring the DocBook Content Typep. 601
Summaryp. 605
Chapter 14 Creating
WSDL Extensionsp. 607
Creating the WSDL Extension Plug-Inp. 612
Extending the WSDL
Go to:Top of Page