Dear All,

I am currently looking hard at the STRUTS package, and hoping it will solve
some design problems that I have. I am happy with the MVC scheme of things
and have been wrinting an application to that pattern part time and latterly
full time for the last 18 months. It has been MVC from the outset, although
a bit shaky at the start as I was learning JAVA, Servlets and JSP pretty
much as I went along. My back ground is in middleware (old style TP Monitors
such as Encina, Tuxedo and TopEnd) so I understand the principles of
separation of Display and Business logic. After a post to the Jakarta
mailing list, Craig McClanahan pointed me in the direction of STRUTS, and it
does indeed seem to address some of the shortcomings of JSP - i.e. keeping
JAVA out of JSPs which I have found to be a necessary evil. Before I leap
wholeheartedly into STRUTS I have a couple of questions that the docs don't
seem to address (or I haven't spent enough time reading them) :

1. The docs seem to state that STRUTS is intended to be used with Server
Side validation. Whilst this is on occasion necessary, my design approach
has been to avoid this wherever possible. Typically, I will use a
Servlet/JSP combination to fill an initial form, providing choices rather
than free-text wherever possible, and then use JavaScript to validate fields
wherever possible. In my entire application I have only found it necessary
to validate server side once, and that was for security reasons. This is
probably because my business logic is not too complex and I am mainly
interested in capturing simple defined data. The up side of this is that the
application becomes very point and click and (I hope) easier for the end
users. What I am asking is, will STRUTS gracefully support a 2 stage
approach to forms - 1 stage to construct and fill in values, and a second
one to gather responses and process ?

2. When creating forms, the documentation talks about "Rendering" buttons
etc. - this set me thinking - Is there a large degree of XML in STRUTS ?
e.g. can you swap a stylesheet and render in WML instead of HTML ? This is
also something I am looking to achieve as a long term design goal - if not
now, does STRUTS intend to support this kind of thing in the future ?

Excuse my long windedness, and thanks in advance for any enlightenment,

Regards,

Andrew

Reply via email to