Using a Java server with a PHP-created interface

  Does anyone have real experience in creating such a project? I would like to get away from questions about “is this a good idea or not,” but focus on possible solutions. I see one simple way - HTTP GET / POST + xml / json - and another elegant one - AJAX / DWR. As for the first - I understand that this is possible, but requires a lot of coding. Regarding the second method - is it possible to use the Java DWR mechanism with the PHP interface? Is the DWR language independent for the client side (since it uses only JavaScript)?
  Would it be a problem that the client page was generated by one web server (e.g. apache + php) and served on the server side by another (e.g. tomcat)? I suspect Tomcat will complain about the sessions. Can I fix this problem with cross-domain AJAX?
Thank you in advance.
Denis

+3
source share
3 answers

If you want (as I suspect) to use PHP to build your web pages while the “business logic” is written in Java, I would suggest using PHP / Java Bridge (LGPL and MIT licenses)

+2
source

Both Java and PHP are server technologies. Your front-end will be written using HTML, CSS and JavaScript - although you could use PHP (or JSP) templates to render parts of the interface.

If you use PHP as a "front-end", you will need to act as a proxy server, passing requests back to the Java web server.

+2

, Java mod_perl '. naysayers - , Java /API-, , HTML, WAP, SMTP, SOAP ..

mod_perl XML-RPC. , . Java, Perl PHP JSON - /. , mod_perl ( PHP) JSON-RPC , .

, , .

, , , , .

"Java front-back" OSGi, ; Java , .

+1

Source: https://habr.com/ru/post/1749214/


All Articles