Religion: JSP vs PHP

1088240054000

Which is better, JSP or PHP? that's a religious questions, depends on whether you believe in god or not? but who is god anyway?

The question itself isn't a very good one. It should be which is better J2EE or PHP because it's not really possible to look at JSP in isolation. There is no doubt that PHP is the better langauge for building web apps. PHP is the shortest path between the problem and the solution. J2EE will take you through a more scenic path. It might possibly be argued that the road built with J2EE technology will be more durable and can carry vehicles with bigger loads, but that is another religious question.

If you are a java programmer you will say PHP code looks really messy when you embed it into HTML and PHP programmers will come back and say JSP looks a lot worse, which is true. The retort generally given is that you can make use of varius tag libs such as struts or jstl to make the code neater. Some people will also make vague references to the MVC pattern.

If these advocates of tag libraries look at the servlet source code generated from their JSP they will surely bring up their dinner. Hand coded JSP when made into a servlet might make you lose your appetite but your dinner will hopefully stay in.

Not so with PHP, once you have written a few hundred thousand lines of code with PHP you can make scripts that look distinctily sexy.

comments powered by Disqus