tags:

views:

239

answers:

3

I have to choose a server pages technology for a few server components that are written in Java and hosted by Tomcat, like Lucene search service and a flex BlazeDS graphic component.

Not sure whether to use JSP or PHP.

On one hand JSP can integrate with the components Java API easily while PHP will require another way of integration like XML or a bridge that might introduce a performance overhead.

On the other hand PHP seem to be faster to develop and, not sure but, more used and supported lately.

A: 

Given your situation, I would choose for JSP.

PHP-applications might be slightly faster to develop, but only if your not used to Java. Intergrating existing components wirtten in Java, are easily intergrated with JSP.

PHP is supported more by web-hosting companies, if you're looking for cheap low requirements hosting. JSP is widely supported for dedicated hosting. Every propper linux/unix distribution does Java+Tomcat out of the box.

Gerrit
A: 

JSP is widely used and supported.

Google for JSP Tag library to see the amount of 3rd party support available.

LenW
+2  A: 

JSP all the way in this situation. Firstly you can choose from myriad different frameworks - Struts and Tiles, Spring, Hibernate, etc, to aid in development.

Secondly the speed of development is not that much slower, if at all. In addition many of the frameworks enforce decent MVC coding practices.

I wouldn't recommend coding pure servlets and JSP these days however, given the frameworks, unless you are coding something very specific.

Other alternatives could be investigating JRuby or JPython for development in Ruby or Python - although I don't know how easy this would be as I haven't done it myself.

JeeBee
Agree that JSP is the way to go. Len W's suggestion about taglibs is also right on the money if you're going to be re-using a lot of display logic.
Ed Lucas