开发者

PHP front-end and Java back-end for a web app?

I'm designing a web application.

I was wondering if it was feasible to desig开发者_StackOverflown a php front end (using some php framework e.g. CakePHP), which stores and retrieves data to display to the user.

Then develop a java backend which listens to the database for changes, and depending on what was changed, performs some actions and updates the database.

Any thoughts on this type of implementation would be appreciated.


Sounds difficult to handle when the need arises to interact between the outside display, and the Java business intelligence in some way. And trust me, the need will arise.

Where would you handle things like input validation for example. In Java? Then your Java instance has to talk to the PHP app all the time. In PHP? Then you'll have business logic in the PHP part, and it sounds like you don't want that.

Unless you have a really, really good reason to split it like that, I would stick with one platform. It's certainly doable this way but I think it will produce a lot of unnecessary overhead.


Yes it is feasible, but why wouldn't you just develop everything in php?

To be specific: why do you need a Java backend? Answering this question would be easier if we knew why you want to implement your web application this way.


This is totally doable. Though you won't be able to do it in some sort of virtual hosting environment, I've never seen a webhost that gives you that kind of access to the server on a virtual/shared hosting plan. but yeah, if you had your own server you could just build the front end with php/html/javascript/whatever and build a java app to run on the server and do whatever backend operations you want. no prob.


It would be better if the PHP front end "notified" the Java back end about changes, rather than having the Java backend simply polling the database for changes. You could simply have a Java web app end point taking notifications from the PHP code "Hey, go look at order 1234, it's new/just changed/etc."


I hope this helps someone, facejar is a social media built in Java and PHP which uses SOAP and Javascript to communicate with each other by passing messages.


I have an idea, you can pack all php data in web services mode(xml) to send to java(axis2) server.bu

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜