On Mon, 22 Jul 2002, Murthy, Suryanarayana (MED, TCS) wrote:

> In stead of using Java Beans, can I write the methods in JSP pages
> itself?  If so, what would be the effect on performance?

Yes, you can.  I don't know what kind of effect it would have on
performance, I'd guess not much.

The bigger impact, though, is on readability and maintainability.  And
that impact is negative.  In fact, a commonly cited disadvantage of
JSPs is that you *can* put code in them.  It goes against the Model 2
MVC design pattern, which is pretty popular.  MVC stands for
Model-View-Controller, and the idea is that you have separate
objects/code for each of those components.  In Model 2, JSPs act as
the view, servlets act as the controller, and some back-end, like a
database or beans or such, act as the model.

So I'd say, unless you have a real good reason for doing this, I
wouldn't.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to