Using J2EE and PHP together
An anonymous reader writes "There's an article in the May issue of the WebSphere Developer Technical Journal at IBM's developerWorks site on Pairing PHP with Java to meet the needs of a familiar web application scenario. The example consists of a Struts application deployed on WebSphere Application Server, which serves as the private content management tool, and a PHP 5 site to display that data to the public. Both parts of the application share a single Apache and DB2 instance."
The answer to the "Why would you want to do this?" section was pretty much "because you can" and that PHP is supposed to be easier to learn vs JSP. Doesn't JSP provide the same functionality as PHP? Given the fact that you would have to know Java to do the J2EE part, I don't see how the JSP part can be a problem.
It looked like a lot of work to get it running as well versus just dropping an EAR (or WAR) file and ask the app server to deploy it.
Just go the whole java way - use something like tapestry:httpjakartaapacheorgtapestry Throw away the the parameter parsing and the buggy nightmare that is scripting languages imbedded in html.
That's way too many frameworks. I just use one of them, it's called Freemarker, check it out. Lots of features, decent speed, very easy to use and great documentation. Sure puts JSP to shame. I used it on my forum software with ldap authentication (shameless plug) and it made my life easier.
Open Source Java Web Forum with LDAP authentication
If you RTFA it isn't talking about JSP. It is about using Java in the middleware (WebSphere) and PHP in the presentation layer (Apache).
There is actually a lot of use for this as a web developer is often someone on a seperate team as the application business layer team.
Why should a PHP web site be rewritten in Java/JSP to use a existing Java middleware module?
We've been using this mix ourselves for a little while now... the main core of the application is deployed on JBoss, where all the heavy processing occurs, with scheduled jobs etc running via Quartz
:-)
The web-based components that the users interact with are written in PHP5 - a decision that was not made based on any sort of execution speed differences that may or may not exist between PHP and JSP, but on the shorter development time we were going to have with PHP
Whole thing works very well
The revolution will not be televised. It won't be on a friggin blog either
My client was already sold on the system (they reviewed three competing products), and my promises of ease-of-extensiblilty utilizing PHP was icing on the cake :-)
Need a Linux consultant in New Orleans?