Re: Discussion: PHP versus JSP

From: Silvio Bierman (sbierman_at_idfix.nl)
Date: 03/30/04


Date: Tue, 30 Mar 2004 10:21:29 +0200


"Kevin" <javarox2000@hotmail.com> wrote in message
news:620f860e.0403290615.3f61f42@posting.google.com...
> Hi! I recently completed a graduate level Java class at a local
> university. For our class project my group built a web-based
> application. Basically, the application would let a manufacturing
> company sell any 'extra' inventory to any authorized user via the
> internet. The users could log in, view the inventory available, and
> make a bid on any of the inventory available. At the end of the day,
> the highest bidder 'wins' that inventory and would receive an email
> saying as much. The customer could then log in again and enter a
> purchase order number and a sales order would be generated.
>
> This application was pretty basic. We used MySQL, Tomcat, and JSP. I
> especially liked working with JSP (give me JSP over servlet
> programming anyday!). However, a friend of mine said that he would
> rather use PHP for web-based apps and asked me what I thought of
> re-doing the app using PHP. Well, I've never really done a lot with
> PHP (other than go through one of those 'Learn PHP in 24 hours' books)
> so I'm not sure what the advantage or disadvantage would be in doing
> that. I'm not even sure if PHP could be used to acess MySQL or other
> databases (my book didn't get into that).
>
> This brings me to my question: What are your thoughts on JSP versus
> PHP? I'm not an expert on either one, but I'd be interested in the
> thoughts of others on these two different web development tools.
>
> Thanks and have a great week!
>
> Kevin

Hello Kevin,

JSP is an attempt from the Java camp to achieve an ASP/PHP like programming
level for Java. JSP can be combined with Java classes which enables a more
structured approach to development making large systems more manageable than
when working with PHP (although many PHP advocates will contradict this they
are wrong). PHP adds nothing to what JSP offers. You win some deployment
ease at the cost of poor libraries, an inferiour programming language and
reduced scalability.

Although there is little wrong with programming a dynamic website with
JSP/ASP/PHP it really scales poorly, even when combined with taglibraries
and plain Java classes. JSP introduces more development issues than it
solves (generating HTML or sometimes XML) because of the new principles
introduced by the combination mechanics. If you want to build a serious
web-application going the servlet way in combination with some
template-library or other class library that takes care of the HTML/XML is a
much more structured and scalable approach.

When talking about Java Servlets are the real thing and JSP is entry level
stuff blown up into more than it actually is. Stay pragmatic and rethink
your strategy for each project. Asking advice is alway a good idea.

Silvio Bierman



Relevant Pages

  • Re: HTML "scrape" causes loss of query string in URL
    ... >> in PHP with several PHP scripts interacting with one Java servlet, ... >> which interacted with several Java classes. ... > process to go from PHP to JSP. ...
    (comp.lang.java.help)
  • Re: Using PHP language in Java/JSP files.
    ... > Java. ... > it) I am wanting to make additions in php (as I know php, ... The Java app (at least all the jsp files) are in the ...
    (comp.lang.java.programmer)
  • Re: [Discussion] PHP =?ISO-8859-15?Q?f=FCr_die_View-Schicht=3F?= =?ISO-8859-15?Q
    ... Java kritisch gegenüber. ... das in PHP zu lassen? ... Statt komplizierte XML-Schnittstellen ... Ob auf JSP, JSF oder ein anderes Template-System müsste ...
    (de.comp.lang.java)
  • Re: help me
    ... 1: web application programming ... Java has special benefits for web programming. ... Java is a better language than CPP for writing bug free programs. ... PHP is a hack. ...
    (comp.lang.java.programmer)
  • Re: HTML "scrape" causes loss of query string in URL
    ... in PHP with several PHP scripts interacting with one Java servlet, ... which interacted with several Java classes. ... so now I have to translate all of the PHP scripts into ... PHP to JSP, figuring that while not very "Java guru cool" to do so, ...
    (comp.lang.java.help)