struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph B Cotton <cott...@gmail.com>
Subject Re: Very confusing documentation
Date Tue, 20 Sep 2016 01:58:27 GMT
OK, the View does not send the message back to the user.  Instead, the
Controller does that.

So the Controller receives the HTTP message, sends it to the Handler, the
Handler processes it and hands it back to the Controller.  The Controller
passes the message to the Model, which does processing, and hands the
message back to the Controller.  The Controller passes the message to the
View, which processes it, and hands the message back to the Controller.
Lastly, the Controller passes the message back to the user's browser.

Is that the sequence of events? If so, then the Handler is a piece of the
puzzle, at least as important as the View, and instead of MVC, it should be
called MVHC?

If you can't explain it simply, you don't understand it well enough. -
Albert Einstein



On Mon, Sep 19, 2016 at 9:09 PM, Dave Newton <davelnewton@gmail.com> wrote:

> On Mon, Sep 19, 2016 at 8:34 PM, Joseph B Cotton <cottonj@gmail.com>
> wrote:
>
> > "... and they're more or less in the right order. ..."
> >
> > Not really.  But thank you for the nice reply.  The issue here is that my
> > understanding is no better with your explanation.
> >
>
> I think the disconnect is that you're viewing the S2 documentation hoping
> for an MVC tutorial, which this isn't. Entire books have been written about
> MVC. One part of "jargon" is serving as a common communication model. The
> description is presented as a description of S2, not MVC in general.
>
> It is curious that the introductory explanation for beginners is full
> > of specialized and undefined jargon.
> >
>
> The introductory explanation of S2 is just that; not a tutorial of MVC, for
> which there are better, and more extensive, tutorials.
>
> (As an aside, note there are multiple interpretations of what "MVC"
> actually *is*, as most web-based MVC frameworks, especially prior to fairly
> recently, are quite a bit different than when the pattern was first
> identified and implemented.)
>
> YMMV, but I'd rather pick specialized documentation that addresses specific
> concerns.
>
> Regarding the rewrite: it's adequate as far as it goes, but misses some
> fairly important points (e.g., control *is* forwarded back through the
> controller). Think of it this way: the request is always "moving forward"
> through the process. But it moves "back through" the controller, because
> that's just how filters work.
>
> The view layer doesn't transmit the reply message to the user (nor is it
> necessarily HTML). The view layer creates the output of the request,
> whatever that happens to be. But it isn't the view layer's responsibility
> to get that representation back to the user.
>
> The "model" (an action in S2) essentially does a data transform between the
> request and what is required by the view layer. The view layer does a data
> transform between what is given to it and what is sent back to the client.
> (Noting that some of this may not be written by the app developer but can
> be hidden within the framework, e.g., automatic JSON transformation.)
>
>
> > There!!! See?  No jargon.  The jargon can be defined later, in the
> > tutorial.
> >
>
> I'd only reiterate that there are a large number of concepts involved in a
> back-end framework. IMO neither a primer nor a *framework* tutorial are the
> place to address those concepts directly. This is why links are provided
> that go in to much more detail. Other people, smarter than me, have spent a
> lot of energy explaining the details of the concepts that S2 implements. I,
> at least, would defer to their better grasp of both concept and language,
> and keep the S2 docs concise, and use jargon common to the field. Again,
> YMMV, and other S2 contributors may have different opinions--I'm speaking
> only for myself.
>
> d.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message