> -----Original Message-----
> From: Rob Schoening [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 11, 1999 8:11 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: JSP Suggestions!
>
>
> > > Problem:
> > >         JSP is becoming too complex.
> > >                 The current vision as discussed emphasizes "model
> > > 2".
> >
> > Agree - Model 1 should be the emphasized Model for two reasons:
> > 1)Model 2 hinders bean interoperability. A bean written for Model
> > 2 can only
> > be used with its Model 2 servlet.
> > 2) Model 2 is more difficult for newbies because you need to know how to
> > write a servlet, how to dispatch or redirect, etc.
>
> Although model two is poorly explained in the spec, it is neither
> difficult,
> nor does it hinder bean interoperablity.  You can pass *ANY* bean to a JSP
> page.

I must reassert that interoperability can be hindered. Ask yourself this,
can my Model 2 JSP Beans work without the Model 2 servlet they were created
to work with? The answer is no. Could they work with some other Model 2
servlet written for an entirely different application? Again, the answer is
no. If you have Model 2 JSP Beans they are Model 2 JSP Beans and will not
work with Model 1 because they require their custom-written servlet for
things like establishing connections and routing logic. That said, there is
nothing wrong with Model 2 and in custom applications it is a viable and
perhaps recommended alternative to Model 1.

>  The utility of Model 2 is that you can use your existing beans to
> create a dynamic web interface for your "legacy" system without
> writing new
> business objects.
>
> As for newbies creating semi-complex systems in JSP (w/o Servlets)...good
> luck.  Without model two, JSP is a project manager's worst nightmare.

That is a good point. With Model 2, all logic down to what JSP page to
redirect to is controlled by the Model 2 servlet(s). That may be easier then
having the logic present in multiple JSP pages. However, that also means the
Model 2 servlet(s) have to do more processing for each request to figure out
what JSP page to route the request to. Using Model 1 JSPs, the JSP page
links to the next appropriate JSP page completely eliminating the logic that
would have been required in the Model 2 servlet.

Example:
Model 1

Situation
user is on a.jsp and clicks on a link to x.jsp

Logic:
No runtime logic necessary since the JSP developer already coded the links

Flow:
a.jsp -> x.jsp

----
Model 2

Situation:
user is on a.jsp and clicks on /servlet/mod2servlet?var=x

Logic:
if the query string is var=x, route to x.jsp, otherwise route to y.jsp.

Flow:
a.jsp -> mod2servlet (processing) -> x.jsp

To Rob and others - does that make sense? Can you see why Model 1 is
important. Model 1 is how HTMLers do business. Model 1 is the traditional
HTML application that all HTMLers understand. Model 2 is not.

I look forward to comments from others,

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to