On Mon, 14 Feb 2005 11:34:28 -0600, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> On Mon, 14 Feb 2005 12:22:40 -0500 (EST), Frank W. Zammetti
> <[EMAIL PROTECTED]> wrote:
> <snip/>
> > Also, if making Actions POJOs is the way to go, I'd say the same should be
> > true of ActionForms too.
> 
> This would bring up a whole different set of expectations.  For one
> thing, once actionforms become POJOs, people would expect that they
> can use any property type, including those that need
> formatting/parsing.  We still need that cache for invalid values (such
> as the 1a3 entered for a numeric field).
> 

Not if you used JSF :-).  The components take care of that for you,
which is how Shale can let you bind a text field to a property of type
"int" and not lose the ability to redisplay invalid data.

> > Question: does a Command actually have to
> > implement the Command interface?
> 
> From my limited study of commons-chain, the answer is yes.  [Inline
> OT] I think *this* is where it makes more sense to allow POJOs.  I
> took a look at this a couple of months ago to determine if I can use
> this for a project of mine, but realized I couldn't when it required
> that all commands implement a specific interface.

As written, the default implementation of the command execution logic
does indeed require the executed objects to implement the Command
interface.  While that could be changed, at some point I think you
really start blurring the lines about what the boundaries of your
design pattern are, and what semantic and timing expectations are
expected.

One could argue, for example, that one of the best things (from a
flexibility viewpoint) and one of the worst things (from a debugging
viewpoint) about writing JavaScript code is that fact that type safety
is not imposed.  Decoupling "command" from the Command interface would
be a step in the direction of picking up this very two-edged sword.

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to