3

I'm designing a web application.

I was wondering if it was feasible to design 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.

1
  • 3
    Title of this question sucks. Commented May 18, 2010 at 21:50

6 Answers 6

6

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

3 Comments

Agreed. OP hasn't indicated why on earth he'd want to split the site into two languages like this. If there's a compelling reason, he should say so.
I've learned to mostly take these O_o questions at face value.
You could answer similarly and say why wouldn't you just develop everything with Java-based technologies and not PHP? ;-)
0

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.

3 Comments

PHP runs on the server too. Why split the language for the back end?
It's the OPs problem to deal with the "why?" I assume he has a reason, why bother him with asking him his life story? Just answer the question.
The OP asked if it was feasible and for our thoughts on the implementation. The "why?" is very relevant when answering that.
0

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."

Comments

0

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.

Comments

-1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.