is it possible to have a hybrid PHP+Java web application on Google App Engine?

删除回忆录丶 提交于 2020-03-05 07:59:07

问题


I want to create an application that submits same/similar data to sites containing web forms. These sites use PHP scripts...

I have a php script with me, that submits data in the manner that i require, to such forms. What I want to do is, design an entire web app around this code... I tried to obtain equivalent java code that does what the php code is doing, but could not obtain such code...

Since Google App Engine supports Quercus framework for PHP, what I am thinking now is, use the PHP code for actual submission of forms to their actions, and rest of application (that tracks all submissions and does other stuff like login/logout...) is in Java.

This would require some method by which I can pass the relevant form parameters from Java code to the PHP script, then some way for the php script to return the response of each submission back to the java code.

Is such an application doable? Pls keep in mind that I want to use Google App Engine for this purpose.


回答1:


Nowadays it is possible to use different languages in different modules of the same app.

See Using both Java and Python with the new "Module" feature on AppEngine?




回答2:


It should be doable with Quercus. We deploy a Python app that has some Java/Clojure backend processors but both languages are "native" to GAE. Using PHP will be a serious pain and not worth it all. I suggest that you just learn Python you will master it faster than using Quercus on GAE.

If you also go after PHP you stick to your LAMP knowledge. I suggest thay you do now!

Disclaimer: I wanted to use JRuby on AppEngine but I had a lot of difficulties (plus you have to know how everything works optimally on GAE) so I took up Python



来源:https://stackoverflow.com/questions/7193984/is-it-possible-to-have-a-hybrid-phpjava-web-application-on-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!