Frank,

I am fond of these two ideas (see following). Heck, I
would be willing to even write them if I think there
would be a chance of someone actually commiting them
into the Trunk!!

There are four things that I am very fond of and they
are all tightly integrated:
(1) POJO for forms
(2) Stubbing of abstract attributes for framework
implementation like Tapestry.
(3) The use of native data types in forms without
worrying of validation.
(4) Action methods being part of the POJO.

Just imagine how cool it would be to have something
like:

public class MyActionForm {
  // stub out properties
  public abstract String getFirstName();
  public abstract String getLastName();
  public abstract int    getAge();

  public void save(ActionContext ac) {
    // save form here
  }

  public void edit(ActionContext ac) {
    // edit form here
  }

  public void bluegrass(ActionContext ac) {
    // do something else here
  }
}

In this example, all four things happen:
(1) The object is a POJO and (3) uses native data
types. If any conversion failure happens, it is
considered an automatic validation error.

(2) The attributes are stubbed out for implementation
like done in Tapestry. This allows the type-checking
at runtime found in ActionForms (important to me) with
the flexibility of defining forms like DynaActionForms
(used heavily by me).

(3) Action methods are now part of the action form
itself. Here I used the Struts 1.3 method of having
the Chain-of-command object be the only thing passed
in, which should contain references to any other web
object you need to complete this request. I believe
JSF does something similar, and why not imitate this
good idea? Besides, I think the Struts Roadmap has a
similar idea planned for 1.5???

Thanks guys.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to