Art of Java Web Development
Struts, Tapestry, Commons, Velocity, JUnit, Axis, Cocoon, InternetBeans, WebWork
Neal Ford
  • November 2003
  • ISBN 9781932394061
  • 624 pages
Art of Java Web Development
Struts, Tapestry, Commons, Velocity, JUnit, Axis, Cocoon, InternetBeans, WebWork
Neal Ford

Great combination of the three levels: patterns, frameworks, and code.

Shahram Khorsand, NetServ Consulting Sweden

A guide to the topics required for state of the art web development, Art of Java Web Development covers wide-ranging topics, including a variety of web development frameworks and best practices. Beginning with coverage of the history of the architecture of web applications, highlighting the uses of the standard web API to create applications with increasingly sophisticated architectures, developers are led through a discussion on the development of industry accepted best practices for architecture.

Table of Contents detailed table of contents



about the book

about the cover illustration

Part I The evolution of web architecture and design

1. State-of-the-art web design

1.1. A brief history of Java web development

1.2. The importance of design patterns

1.2.1. The Model-View-Controller design pattern

1.2.2. The emergence of Model 2

1.2.3. Evolution

1.3. Using frameworks

1.3.1. A flavor of the Struts framework

1.3.2. A flavor of the Turbine framework

1.3.3. Objectively choosing a framework

1.4. Best practices

1.4.1. Business rules

1.4.2. Where should the rules reside?

1.4.3. Leveraging best practices

1.5. Summary

2. Building web applications

2.1. Building web applications with servlets

2.1.1. The eMotherEarth servlet application

2.1.2. Evaluating the servlet approach

2.2. Building web applications with JSP

2.2.1. The JSP eMotherEarth application

2.2.2. Evaluating the JSP approach

2.3. Summary

3. Creating custom JSP tags

3.1. The case for custom tags

3.2. The tag interfaces

3.2.1. The Tag interface

3.2.2. The IterationTag interface

3.2.3. The BodyTag interface

3.3. Building simple tags

3.3.1. The HtmlSqlResult tag

3.3.2. Registering the tag

3.4. Validating tag attributes

3.4.1. Adding DbPool to the application tag

3.5. Using prebuilt tags

3.5.1. Using JSTL

3.5.2. Using other taglibs

3.6. Custom tag considerations

3.6.1. Resource usage

3.6.2. Building a framework

3.7. Now that we’re here, where are we?

3.8. Summary

4. The Model 2 design pattern

4.1. Using Model 2 as your framework

4.1.1. The Model 2 schedule application

4.1.2. Options in Model 2

4.2. Parameterizing commands with controller servlets

4.2.1. An example of parameterizing commands

4.2.2. Advantages and disadvantages

4.3. Summary

Part II Web frameworks

5. Using Struts

5.1. Building Model 2 Web applications with Struts

5.1.1. The Struts schedule application

5.1.2. Value objects as form beans

5.1.3. Objectifying commands with Struts' actions

5.1.4. Configuring Struts applications

5.1.5. Using Struts' custom tags to simplify JSP

5.1.6. Internationalization with Struts

5.1.7. Struts' support for data entry

5.1.8. Declarative validations

5.2. Evaluating Struts

5.3. Summary

6. Tapestry

6.1. Overview

6.2. The architecture

6.3. A simple Tapestry application

6.3.1. Tapestry Hello, World

6.4. The Tapestry framework

6.4.1. Framework classes and interfaces

6.4.2. Components

6.5. Scheduling in Tapestry

6.5.1. Bootstrapping the application

6.5.2. The Home page

6.5.3. The custom table component

6.5.4. The Add page

6.6. Evaluating Tapestry

6.6.1. Documentation and samples

6.6.2. Debugging support

6.6.3. Using Tapestry

6.7. Summary

7. WebWork

7.1. Overview

7.1.1. The architecture

7.1.2. The configuration

7.2. Key concepts

7.2.1. Actions

7.2.2. Key interfaces

7.2.3. The value stack

7.2.4. Expression language

7.2.5. BeanInfo classes

7.2.6. Templates

7.3. Scheduling in WebWork

7.3.1. The configuration

7.3.2. The View page

7.3.3. The Add page

7.3.4. Validations

7.4. Evaluating WebWork

7.5. Summary

8. InternetBeans Express

8.1. Overview

8.2. The architecture

8.2.1. DataExpress

8.2.2. InternetBeans Express

8.3. InternetBeans Express components

8.3.1. ixPageProducer

8.3.2. ixComponents

8.4. Scheduling with InternetBeans

8.4.1. Data connectivity

8.4.2. The View page

8.4.3. The Add page

8.4.4. Validations

8.5. JSP custom tags

8.6. Evaluating InternetBeans Express

8.6.1. Documentation and samples

8.6.2. Using InternetBeans Express

8.7. Summary

9. Velocity

9.1. Overview

9.2. The architecture

9.3. Key concepts

9.3.1. Setting up Velocity

9.3.2. The Velocity Template Language

9.3.3. Context

9.4. Scheduling with Velocity

9.4.1. The View page

9.4.2. The Add page

9.4.3. Validations

9.5. Evaluating Velocity

9.5.1. Documentation and samples

9.5.2. Using Velocity

9.6. Summary

10. Cocoon

10.1. Overview

10.2. The architecture

10.2.1. The publishing framework

10.2.2. The web framework

10.3. Key concepts

10.3.1. The publishing framework

10.3.2. The sitemap

10.3.3. The web framework

10.4. Scheduling in Cocoon

10.4.1. The sitemap

10.4.2. The action

10.4.3. The view

10.5. Evaluating Cocoon

10.5.1. Documentation and samples

10.5.2. Source code

10.5.3. Debugging

10.6. Summary

11. Evaluating frameworks

11.1. Evaluation criteria

11.1.1. Suitability to the application

11.1.2. Documentation

11.1.3. Source code

11.1.4. Tool support

11.1.5. External criteria

11.2. Design considerations

11.2.1. Adherence to good design principles

11.2.2. The user interface

11.2.3. Innovative features

11.2.4. Insularity

11.2.5. 'Feel'

11.3. What I like

11.3.1. Transparent infrastructure

11.3.2. Innovative ideas

11.3.3. Ultra-high cohesion and low coupling

11.3.4. Evaluating frameworks as a hobby

11.4. Summary

Part III Best practices

12. Separating concerns

12.1. Using interfaces to hide implementation

12.1.1. JDBC interfaces

12.1.2. Interfaces in frameworks

12.1.3. Decoupled classes

12.2. Using JavaBeans

12.2.1. Model beans

12.3. Using Enterprise JavaBeans

12.3.1. The EJB architecture

12.3.2. Porting from JavaBeans to Enterprise JavaBeans

12.3.3. Using EJBs in web frameworks

12.3.4. Managing JNDI context

12.4. Performing validations with model beans

12.4.1. Client-side validations

12.4.2. Building client-side validations from the server

12.5. Summary

13. Handling flow

13.1. Application usability options

13.1.1. Building the base:

13.1.2. Page-at-a-time scrolling

13.1.3. Sortable columns

13.1.4. User interface techniques in frameworks

13.2. Building undo operations

13.2.1. Leveraging transaction processing

13.2.2. Using the Memento design pattern

13.2.3. Undo in frameworks

13.3. Using exception handling

13.3.1. The difference between technical and domain exceptions

13.3.2. Creating custom exception classes

13.3.3. Where to catch and handle exceptions

13.3.4. Exceptions in frameworks

13.4. Summary

14. Performance

14.1. Profiling

14.1.1. Measuring memory

14.1.2. Performance profiling

14.1.3. Load testing

14.1.4. Performance of profiling frameworks

14.2. Common performance pitfalls

14.2.1. Object creation

14.2.2. Extraneous object references

14.2.3. String usage

14.3. Pooling

14.3.1. Simple object pools

14.3.2. Soft and weak references

14.3.3. Commons pools

14.3.4. Pooling in frameworks

14.4. Designing for scalability

14.4.1. When to scale up to EJB

14.4.2. Molding your architecture for the future

14.5. When to optimize

14.6. Summary

15. Resource management

15.1. Caching strategies

15.1.1. Caching with the Flyweight design pattern

15.1.2. Caching with the Façade design pattern

15.1.3. Resource management in frameworks

15.2. Other resources you need to manage

15.2.1. Effectively using JNDI

15.2.2. Using lazy instantiation

15.2.3. Working with web collections

15.3. Summary

16. Debugging

16.1. Debugging web applications

16.2. Debugging with the SDK

16.2.1. Starting the debugger

16.2.2. Running the debugger

16.2.3. Breakpoints and steps

16.2.4. Accessing variables

16.2.5. Effectively using jdb

16.3. Debugging with IDEs

16.3.1. Debugging with NetBeans

16.3.2. Debugging with JBuilder

16.3.3. Differences between debuggers

16.4. Evaluating debuggers

16.5. Debugging in frameworks

16.5.1. Struts

16.5.2. Tapestry

16.5.3. WebWork

16.5.4. InternetBeans Express

16.5.5. Velocity

16.5.6. Cocoon

16.6. Logging

16.6.1. General logging concepts

16.6.2. SDK logging

16.6.3. log4j logging

16.6.4. Choosing a logging framework

16.6.5. Logging in frameworks

16.7. Summary

17. Unit testing

17.1. The case for testing

17.1.1. Agile development

17.1.2. Unit testing in web applications

17.2. Unit testing and JUnit

17.2.1. Test cases

17.2.2. Testing entities

17.2.3. Running tests

17.2.4. Test suites

17.2.5. Testing boundaries

17.2.6. Tool support

17.3. Web testing with JWebUnit

17.3.1. JWebUnit TestCases

17.3.2. Testing complex elements

17.4. Summary

18. Web services and Axis

18.1. Key concepts

18.2. Axis

18.2.1. Architecture of Axis

18.2.2. Axis tools

18.3. Calling web services

18.4. eMotherEarth web services

18.4.1. Configuration

18.4.2. Orders

18.4.3. Calling the web service

18.5. Summary

19. What won’t fit in this book

19.1. Persistence

19.1.1. Plain old Java objects

19.1.2. Enterprise JavaBeans

19.1.3. Java data objects (JDO)

19.1.4. Hibernate

19.2. HTML and the user interface

19.2.1. HTML/XHTML

19.2.2. Cascading Style Sheets

19.3. JavaScript

19.4. Summary



About the book

Described is the history and evolution towards this architecture and the reasons that it is superior to previous efforts. Also provided is an overview of the most popular web application frameworks, covering their architecture and use. Numerous frameworks exist, but trying to evaluate them is difficult because their documentation stresses their advantages but hides their deficiencies. Here, the same application is built in six different frameworks, providing a way to perform an informed comparison. Also provided is an evaluation of the pros and cons of each framework to assist in making a decision or evaluating a framework on your own. Finally, best practices are covered, including sophisticated user interface techniques, intelligent caching and resource management, performance tuning, debugging, testing, and Web services.

About the author

Neal Ford is the chief technology officer at the DSW Group, Ltd. He is an architect, designer, and developer of applications, instructional materials, magazine articles, and video presentations and the author of Developing with Delphi: Object-Oriented Techniques and JBuilder 3 Unleashed. He lives in Atlanta, Georgia.

Art of Java Web Development (combo) added to cart
continue shopping
go to cart

combo $44.95 pBook + PDF
Art of Java Web Development (eBook) added to cart
continue shopping
go to cart

eBook $35.99 PDF only

FREE domestic shipping on three or more pBooks

Covers all facets of web application development...This book is bold!

Eitan Suez, Founder, UpToData Inc., Creator of DBDoc

You have two options: read four or five books plus stuff from all over the Net—or read this one.

Luigi Viggiano, co-founder, Turin Java Users Group

I really like what I’m reading... nice style, very approachable.

Howard M. Lewis Ship, Creator of Tapestry