Reputation: 8148
Is it possible to build a Java web application which has a PHP front end ?
I want all my web pages to be coded in PHP. Most of them will be forms.
I want all the data submitted by a form to go to a Java Code.
I want to do all manipulation in back end and all rendering of web content on the front end.
This is just a general question as I was probing for different options for my java web application.
Upvotes: 0
Views: 246
Reputation: 158005
According to your edition, it looks like you don't need PHP at all. You confused it with HTML.
Upvotes: 0
Reputation: 28905
You can use Quercus, a Java implementation of PHP, to run PHP from within Java (and thus have easy access to Java classes).
Upvotes: 1
Reputation: 346556
A web application, by definition is already a frontend (or at least includes it).
If you meant a PHP webapp built on top of a Java backend, sure, that's possible. If you use SOAP or REST for communication between the layers, it's actually relatively easy. The only drawback compared to a pure Java (or pure PHP) app would be the overhead of those protocols, so you have to be careful to avoid too fine-grained service interfaces.
Upvotes: 2
Reputation: 26733
It depends on where the two meet. You could have, for example, have Java backend and PHP frontend communicating via web services. I however see no benefit in such a combination.
Upvotes: 1