You can also use JavaScript as a JSP language.  It's got the advantages of PHP,
notably the fact that it's a non-strictly-typed scripting language.  And, of
course, everyone already knows JavaScript.  Plus, because the JavaScript
implementations are based on Java/Servlets, you can integrate it with your
beans/servlets.  I can't imagine doing any heavy-duty programming in a scripting
language; strict type checking has saved me uncountably many times.  However, for
something like a JSP page, relaxing type checking is very nice.

Resin (see http://www.caucho.com) gives you the option of using JavaScript in your
JSP pages and Java for your servlets/beans.  I'm fairly certain that Allaire's
JRun also supports JavaScript.

Scott Ferguson
Caucho Technology

Barry Scott wrote:

> Kevin,
>
> Thanks for your comments.
>
> I already use JSP and Servlets in development of web applications, but
> somebody mentioned PHP to my boss, and now he can't leave the damn thing
> alone. As I said, I am not so blind as to write it off just because I like
> Java, but my purpose of posting (as well as real interest in the comparison)
> was to find a good excuse NOT to use PHP.
>
> I have to say, even with my keen interest in Java, that PHP appears to be
> easier to develop light-weight web apps with, as it's simple syntax makes it
> easier for HTML guys to understand ;-).
>
> Barry Scott
> IJava UK
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: Barry Scott <[EMAIL PROTECTED]>
> Sent: Monday, January 10, 2000 9:59 PM
> Subject: Re: JSP vs. PHP
>
> > Hi,
> >
> > I recall hearing about PHP, and am not quite sure what it looks like. I
> > assume you havent seen any JSP pages, how they are done, etc? As far as I
> > can tell, they are by far the easiest to work with. If your a Java nut,
> > then JSP is by far the best, of all other reasons, because you can embed
> > Java right in your HTML code. However, the idea is to use as little Java
> in
> > your JSP pages as possible. Thus, the use of JavaBeans helps in this area.
> > There are two well known models. Model 1 dictates the MVC and JSP pages
> act
> > as the controller AND the view. The web server uses nothing but JSP pages,
> > and returns JSP pages. The JSP pages use JavaBeans to do the logic work,
> > access database, etc. You can even write the Java code right in the JSP
> > page..but I wouldnt recommend it. Model 2 is the single command servlet
> > approach where ALL requests go to a servlet, the servlet creates a bean
> and
> > does the logic, then forwards to a JSP page which uses the bean to display
> > the dynamic content. They are both good. The pros/cons seem to equal out.
> > However, I find it a bit more cumbersome to maintain a single servlet
> which
> > handles any number of requests, creates many beans, etc, over just writing
> > the bean code (which you have to do either model you do anyways) and using
> > it in a JSP page to do the logic. Its a matter of preference. Its pretty
> > much agreed that the JSP->JavaBean Model 1 approach is easier to
> implement,
> > but the servlet has some usefullnes as well.
> >
> > Kevin Duffey
> > Software Engineer
> > [EMAIL PROTECTED]
> >
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to