struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Métras <>
Subject Re: Struts TODO List and Future Planning
Date Fri, 08 Sep 2000 04:58:59 GMT
A long time ago, Craig R. McClanahan wrote:

> Dear Struts Folks,
> As I have been promising for *way* too long :-(, I spent the morning
> today accumulating all of the currently outstanding issues
> that people have raised, or enhancements they have suggested, on the
> STRUTS-DEV and STRUTS-USER mailing lists.  This
> list has been checked in to the Struts source code repository as file
> "TODO", and is attached below for your convenience.

It took me some time to digest that list and add my 2 cents.

First cent:
As struts aims at being a framework, it should be possible to do everything
with it, but most current operations should be well supported and cleanly
A modeling that seems important to me is to write clean Action classes, as
they are mainly control flow structures through the perform() method.

In order to avoid having the perform() method ends up with "if/else/return
forward" spaghetti code, I think that struts should provide a model for a
basic finite state automata. What we generally have in struts forms is a
hidden action field, and the value of that field is used to determine the
next step in the automata.

        When in step X
            If action = A
                Perform M and forward to F
            If action = B
                Perform N and forward to G
        When in step Y

This type of code could be modeled using clean structures.

I think that this hidden field must be removed (banned?) from struts forms
and included in an interface defining the automata, and usable by Action
Another reason not to use that "trick" is that sometimes, we don't want the
user to be able to go back to the previous state when he presses the Back
button of the browser, for instance in a shopping kart form.
And last, exposing a field in the HTML source can help a malicious user to
crack the application.

Second cent:
What is the overlap between struts taglib and the "standard" taglib the
comitee is working on (JSR #000052)? I have noticed through the CVS commit
that the conditional tags had recently evolved...

Pierre Métras

View raw message