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.
Hahah.. I hope this is a lower volume app. I'd be curious to know a bit more about the memory footprint of this combo.
Is there any language out there that ports like java and run faster? I am sick of java. There was talk of it being faster when everyone buys faster CPUs. It's obviously not the case, java applets on the majority are still slow today. It's bloated, over rated. Is there any university/lab developing anything better nowadays?
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.
I have tried going back to the old PHP - JSP way of doing things and it is sooo painful.
http://jakarta.apache.org/tapestry/
Why do people try to create solutions for problems that don't exist?
Some people like PHP, some people like JSP, let's just leave it at that. For the people that like both, USING both would not only be confusing but extremely resource intensive.
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
isn't Java bad enough already?!
just imagine all the verborragic redundancy of Java/Struts + loads of xml with PHP's "1 millions inconsistently named functions in the same namespace" + global variables abound...
plus, both interpretetive performance hogs...
I don't feel like it...
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?
If I use Apache at port 80 and say Tomcat at port 8080 then I can use the Apache proxy to handle both Java and PHP requests. Unfortunately the Apache proxy can be abused by spammers (relaying). Is there any solution for this problem?
This is just stupid. I will use PHP on servers without Java, but that is it. I like both languages, but PHP is rather limited for large projects. PHP has no Interfaces and it is not really object oriented.
Take a look at Concerto. Yes, I work for this company.
dominionrd.blogspot.com - Restaurants on
An interesting discussion exists at Java vs PHP
Some strong arguments in favor and against using Java, PHP and both of them together.