struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Leland <>
Subject Re: Multi-page form
Date Wed, 11 Oct 2000 14:24:13 GMT
> >
> > For what it's worth, I prefer leaving both as interfaces and providing
> > ActionBase and ActionFormBase for people to inherit from should they choose
> > to.
> Believe me, I wish this were a reasonable path ... but it appears to me that it
> is not.

> Consider the fact that, in the future, we want to enhance our notion of what an

> ActionForm does with some new optional functionality.  For a concrete example,
> consider the desire to add a validate() method on a ValidatingActionForm that
> takes additional arguments to provide context information.

Absolutely, there are other reasonable path. It is called 'Delegation'.  I posted
this yesterday on the struts-dev group about delegation.
If interested see

An interface is not absolutely required. That is exactly how Sun got there self in
sorts of trouble when they designed AWT in Java 1.0, They uses Inheritance to extend
their classes. When AWT shipped with Java 1.0 it was generally regarded as one of the

worst piece of code around. Then they started working with the people at Borland
and redesigned AWT to use delegation for their next version of AWT so by version 1.2
it was considered one of the best most extensible designs around, and they did it
with delegation.

I just went to google and did a search for "design patterm" delegation.
Here is one example:
A quote from O'Reilly's JDBC and Java: Chapter 9 Persistance
(It look like entire chapter is on line)
"You will use two key design patterns to support the separation of business logic
from persistence logic: the memento pattern and delegation."

It can be found at  :

View raw message