Eclipse Web Tools Platform: Java Web Application Development with Eclipse

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Paperback)
  • All (16) from $1.99   
  • New (4) from $46.83   
  • Used (12) from $1.99   

Overview

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.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Next, from Eclipse: the Web Tool Platform, an integrated, comprehensive toolset for standards-based Java web development. All that's missing is a definitive guide to using it. Now three of WTP's key contributors have written that book: everything you won't find in online help, from architectural techniques to sophisticated code examples.

By the end of Part I, you'll be building real apps, thanks to the authors' surprisingly realistic case study project. Then, step-by-step, they introduce WTP's entire rich toolset: tools for presentation, business logic, and persistence; web services; even testing. From XML to SQL, WSDL to Apache Axis, it's covered -- and if that's not enough, there's a full section on extending WTP with new server runtimes, file types, and extensions. (Real-world examples: GlassFish and DocBook.) Finally, you'll preview what's coming in WTP, including support for JSP, AJAX, and Java EE 5. Impressive platform, impressive book. Bill Camarda, from the August 2007 Read Only

Read More Show Less

Product Details

  • ISBN-13: 9780321396853
  • Publisher: Addison-Wesley
  • Publication date: 6/8/2007
  • Series: The Eclipse Ser.
  • Edition description: New Edition
  • Pages: 724
  • Product dimensions: 7.00 (w) x 9.10 (h) x 1.60 (d)

Meet the Author

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.

Read More Show Less

Read an Excerpt

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 beaccurate 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,

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

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

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

Read More Show Less

Table of Contents

Foreword xvii

Preface xix

Acknowledgments xxiii

About the Authors xxv

Part I: Getting Started 1

Chapter 1: Introduction 3

Java Web Application Development and Eclipse 3

What This Book Contains 4

How This Book Is Organized 5

Source Code Examples 8

Introducing League Planet 9

Summary 10

Chapter 2: About the Eclipse Web Tools Platform Project 13

WTP Is Born 13

WTP Economics 15

The Structure of WTP 22

Contributing to WTP 37

Summary 40

Chapter 3: Quick Tour 41

Overview 41

Iteration 1: J2EE Web Applications 44

Iteration 2: Servlets and Scriptlets 60

Iteration 3: Database Access 71

Iteration 4: Web Services 82

Summary 88

Chapter 4: Setting Up Your Workspace 91

Installing and Updating WTP 91

Configuring WTP 105

Summary 110

Part II: Java Web Application Development 111

Chapter 5: Web Application Architecture and Design 113

The Web Landscape 113

Web Applications 115

Service-Oriented Architecture (SOA) 130

Case Study: League Planet 133

Summary 135

Chapter 6: Organizing Your Development Project 137

Web Project Types and J2EE Applications 138

Advanced Web Projects 160

Example Projects 165

Summary 196

Chapter 7: The Presentation Tier 199

Introduction 199

Interaction Design 200

Graphic Design 203

The Structure of the Presentation Tier 204

Iteration 1: Static Web Projects, HTML, and the

Iteration 2: CSS 230

Iteration 3: JavaScript 234

Iteration 4: XML and XSLT 248

Iteration 5: DTD 257

Iteration 6: Servers, Dynamic Web Projects, and Servlets 261

Iteration 7: JSP 279

Iteration 8: Monitoring HTTP Sessions 289

Summary 295

Chapter 8: The Business Logic Tier 297

A Common Business Tier Design 300

Iteration 1: The Domain Model 301

Iteration 2: Developing Session EJBs 325

Iteration 3: Message-Driven Beans 358

Summary 367

Chapter 9: The Persistence Tier 369

Designs for the Persistence Layer 370

Overview of Iterations 374

Iteration 1: Creating a Database 375

Iteration 2: Data Layer 386

Iteration 3: Entity Beans 392

Summary 418

Chapter 10: Web Services 421

WSDL 422

SOAP 423

REST 424

REST Style Web Services 426

Overview of Iterations 427

Iteration 1: Developing Web Services Top-Down 428

Iteration 2: Developing Web Services Bottom-Up 454

Iteration 3: Generating Web Service Client Proxies 464

Iteration 4: Testing Web Services for Interoperability 470

Iteration 5: Using Web Services in Web Applications 477

Iteration 6: Discovering and Publishing Web Services 494

Summary 508

Chapter 11: Testing 509

Automated Testing 511

Overview of Iterations 512

Iteration 1: Unit Testing with JUnit 512

Iteration 2: Integration Testing with Cactus 520

Iteration 3: System Testing with HttpUnit 528

Iteration 4: Performance Testing with TPTP 533

Iteration 5: Profiling with TPTP 540

Summary 546

Part III: Extending WTP 549

Chapter 12: Adding New Servers 551

Overview of Adding a Generic Server Adapter 554

The GlassFish Server Runtime 554

Server Adapter Plug-Ins 556

Adding Support for a New Server Runtime 558

Adding a New Server Type for a Runtime 561

Adding a New Runtime Target Handler 562

Facets and Runtime Components 563

Extending the Server Tools UI 565

The Generic Server Definition 566

Publishers 570

Testing the Server Adapter 573

Summary 580

Chapter 13: Supporting New File Types 583

Creating the DocBook Extension Plug-In 585

The DocBook Validator 585

Creating a Custom Marker Type 598

Declaring the DocBook Content Type 601

Summary 605

Chapter 14: Creating WSDL Extensions 607

Creating the WSDL Extension Plug-In 612

Extending the WSDL Editor 612

Extending WSDL Validation 635

Summary 644

Chapter 15: Customizing Resource Resolution 645

Creating the Resource Resolution Extension Plug-In 647

Contributing Resources to the XML Catalog 648

Implementing a Custom Resource Resolution Strategy 657

Summary 665

Part IV: Products and Plans 667

Chapter 16: Other Web Tools Based on Eclipse 669

Java Web Tools 669

Perl Web Tools 674

PHP Web Tools 674

Python Web Tools 675

Ruby Web Tools 675

Summary 675

Chapter 17: The Road Ahead 677

Eclipse Data Tools Platform (DTP) Project 678

Eclipse JavaServer Faces (JSF) Tools Project 678

Eclipse Dali Java Persistence Architecture (JPA) Tools Project 679

Eclipse AJAX Tools Framework (ATF) Project 679

Java Enterprise Edition 5 679

Apache Axis2 and W3C WSDL 2.0 680

Eclipse PHP Development Tools Project 680

Eclipse SOA Tools Platform (STP) Project 681

Conclusion 681

Glossary 683

References 689

Index 697

Read More Show Less

Preface

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

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)