----- Original Message -----
From: "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
To: <struts-dev@jakarta.apache.org>
Sent: Monday, September 04, 2000 7:48 PM
Subject: Re: [PROPOSAL] New Struts Configuration File Format
>
> I agree, and I'm open to suggestion. The goal would be that I can write a
tool
> that auto-generates form bean classes, ideally without requiring the
developer
> to do any customization to the generated code. That way, if you (say)
added a
> new bean property, you would just regenerate the bean and not lose any of
your
> custom changes.
>
> I've seen alternative approaches to this problem that let you "reverse
engineer"
> custom code that was added to a generated class back out again, so that it
can
> get re-added to the new generated class. This seems quite a lot more
> complicated and error prone, but it might be a better strategy.
>
Craig,
I worked on another approach to the FormBean generation problem while I was
on vacation... :)
My basic need, and I believe this to be a fairly general requirement, is to
integrate web designer's output (a navigationaly functional static html
site) into the coding process resulting in a dynamic web app.
My approach was to specify as much as possible in the web design stage using
tools such as dreamweaver and to generate the form beans in the coding phase
by parsing
the html (or xhtml !). I showed it was possible to do this using XSLT.
That's why I don't believe its a good idea to specify any type of form
properties or constraints in the action.xml file. I see the action.xml as a
run-time specification and not a design specification which could be used
to generate code.
However, maybe there could be another tool just for the purpose of
generating code
which would use a language (OCL ?) to specify the various constraints not
already taken
into account by the web design phase which along with the static site could
then be used to generate form beans, validating form beans, etc...
Luis.
|