why we use jsp instead of php

why we use jsp instead of php

sumit
Views: 1261 | Community Opinion: 1



Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 
JSP vs PHP Said..

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.






What do you think? Add your opinion/answer
*Name
*your opinion/answer: