struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: MVC2 question
Date Mon, 03 Sep 2007 08:57:34 GMT
1) there is no such thing as MVC2.
You are probably mixing things up: Model2 for JSP Development and MVC Pattern.

2) If you are talking about struts 2, there is a major difference
between a servlet and an action, since the action incorporates both,
request data and logic, which servlet doesnt.

3) If you are talking about struts 1, you have to take in mind, that a
servlet is much more heavyweighted as an action.
You can't control the servlet's creation, what you can do with
actions, since you (or the framework for you) are creating the action
at the point they are needed.
You can't control number of the instances of the servlet, its servlet
containers decision.

4) if you stick with the servlet interface you have to manage request
dispatching yourself in each servlet, again and again.

5) You have to map each servlet in the web.xml, blowing it for an app
which has like 100 actions.

6) It's easier to create a class hierachy with actions as with
servlets (still its possible with servlets too), sharing generic
methods across actions.

7) it's easier to test it with mock objects.

8). It just looks better :-)

Leon

On 9/1/07, debussy007 <debussy007@gmail.com> wrote:
>
>
> Instead of having one front servlet, have one servlet for one action.
> Sounds more oriented object to me.
>
>
> newton.dave wrote:
> >
> > --- debussy007 <debussy007@gmail.com> wrote:
> >> what is the benfit of having the front controller
> >> dispatching the request to the appropriate
> > controllers?
> >> Why not calling the appropriate controller directly?
> >
> > How would you do that?
> >
> > d.
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Shape Yahoo! in your own image.  Join our Network Research Panel today!
> > http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/MVC2-question-tf4219667.html#a12437988
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message