I think some people are missing the point you're
trying to make, so I I'm going to take a stab at it.

Yes, the Servlet and Action APIs are very similar, but
a Servlet and an Action really have are two different
entities.  A Servlet's set of interfaces covers what
is required of an Action and much more.  You usually
want to have a set of interfaces that describes
succinctly what an entity is suppose to do.  An Action
performs a particular web action.  This does not
necessarily describe a servlet.  You would risk
bringing in a lot of confusion into the whole
framework.  Can an Action be setup as a standalone
Servlet?  To what extent should an Action adhere to
the Servlet spec?  What would the init() and destroy()
methods do?

Calvin

--- Prakash Dominic <[EMAIL PROTECTED]> wrote:
> 
> I understand MVC/Model 2.  And I don't
> think Action layer in Struts map to Model in MVC. 
> Actions in Struts are -Controllers- in the MVC
> pattern as they translate user actions to the Model
> and select the appropriateView.
> 
> The point I was trying to make was that, instead of
> creating a whole new set of APIs why not leverage
> the
> existing Servlet API/spec for the -Controller-
> layer. 
> 
> And I am not still clear what the problem is with
> having
> many Servlets(still java instances under the hood).
> 
> --Prakash
> 
> 
> -----Original Message-----
> From: Jason Chaffee <[EMAIL PROTECTED]>
> Date: Wed, 9 May 2001 14:03:01 -0700 
> To: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> Subject: RE: Basic Design Question...
> 
> 
> > Read up on the MVC/Model 2 design pattern.  Struts
> is based on this design
> > pattern.  It much better to have one servlet
> (controller) and several
> > actions (models), than to have serveral servlets.
> > 
> > -----Original Message-----
> > From: Prakash Dominic
> [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 09, 2001 2:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Basic Design Question...
> > 
> > 
> > Hello Folks,
> > 
> > A quick design question. This might be nit 
> > picking from a design standpoint but still a
> > valid question.
> > 
> > Struts uses the Action.perform(...) API for 
> > action hadling/controller. I am curious to know
> > why Servlets can't be used for the Action Handling
> > layer. That way there is no need to introduce
> > 2 new APIs to learn - Action and
> struts-config.xml.
> > 
> > The web.xml could replace the struts-config for 
> > action mapping. And framework users simply
> implement
> > Servlets instead of Action subclasses.
> > 
> > Does this make sense or am I am missing something
> > here ?
> > 
> > Thanks,
> > Prakash
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > 
> > ===
> > 
> > Another FREE service from Jayde Online < <A
> HREF="http://www.jayde.com>" TARGET="_new"><FONT
> COLOR="BLUE">http://www.jayde.com></FONT></A>
> > Private, Web-based email accounts at  <A
> HREF="http://www.jaydemail.com"; TARGET="_new"><FONT
> COLOR="BLUE">http://www.jaydemail.com</FONT></A>
> > 
> > Powered by Outblaze
> > 
> 
> -- 
> 
> ===
> 
> Another FREE service from Jayde Online
> <http://www.jayde.com>
> Private, Web-based email accounts at
> http://www.jaydemail.com
> 
> Powered by Outblaze


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to