On 7/22/06, Ted Husted <[EMAIL PROTECTED]> wrote:
On 7/22/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> I would really like to rewrite the whole User's Guide, but this is too
> much of a job, and someone would have to proofread it after this
> anyway ;) So I will try to incorporate wiki information into the
> Manual, along with the pictures of course.

I really like the way the Struts 2 documentation is shaping up.

* http://struts.apache.org/2.x/index.html

Would you mind if I copy-paste relevant pieces into Struts 1 wiki and
later in Struts 1 xdocs?

I'm going to shore-up the Soup-to-Nuts tutorial this weekend. It'll
step through creating an initial workflow. The S2N will be a good
complement to the MailReader tour, which edges into the more
complicated and realistic workflows.

I agree that Struts 1 User's Guide should have references to sample
code. I am thinking about extending Cookbook with some new examples.

There are some practices. I
> like "web resource" instead of "action class"

Hmmm, a web resource is usually taken to mean anything that can be
accessed by a URI and returns a response. While an Action class can
return the response, it is not a web resource per se, since it doesn'
thave it's own URI. The action mapping could be construed as a web
resource, but this term usually means server pages, servlets, or
perhaps a SOAP service.

Action mapping represents a web resource from browser standpoint.
Action class + action form implement a web resource on the server.

For a generic reference to Action class, I'd strongly suggest the term
"action handler".

I really don't like calling action a handler. Well yes, it is a
request handler, but I would like to reserve "handler" as in "event
handler" for dispatch action methods. Also, ASP.NET and JSF uses
"event handler" for code-behind class methods, so this way Struts
terminology will be in sync.

Many pattern libraries like Microsoft's and Martin Fowler's use term
"handler" for ActionServlet/RequestProcessor functionality. Again,
reusing handler for an action class may confuse some people.

I think that using more generic and neutral word like "worker" suits
well both Action and Command. Struts is believed to adhere to service
to worker pattern, but it is interesting that there is no "worker"
component in that pattern. So let us just call action/command a
worker. Sounds pretty good to me. What do you think?

> or "view" instead of  "JSP page".

In this vien, I try to refer to "server pages" rather than JSP, since
Velocity and Freemarker templates can be construed as "server pages",
along with, say, PHP templates.

Of course, both S1 and S2 support alternatives to server pages, such
as XLST and PDF.

An action can generate view directly by simply writing to response
writer. I will use "view" as a generic term and "server page" when I
do mean something being forwarded to from an action class... er...
from a worker :)

When espousing best practices, it's also important to note that there
is a signficant difference between knocking-off a five-page
application for an intranet and engineering a 500-page public-facing
application that must serve hundreds of thousands of clients. Sure, we
all wish there was a unified theory of web development, but I think we
are about as close to that as our friends in the Physic departments
who ponder an "elegant universe".

Actually, there are not too many choices. I would like to outline
those that I am aware of, pros and cons. I will try not to show my
preference to any of them :) I may even change my opinion in the
process. For example, after I found out about SmartNavigation feature
of ASP.NET, I do no longer think that redirect-after-post is the best
pattern for data entry form use case ;-)

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

Reply via email to