0

I am using Java as front end and PHP as back end. is this possible to connect Java to a Mysql server in XAPP? Which driver i have to use and what is the total process? Is there any java to php bridge?How to install that bridge in ubuntu?

Thanku for your suggestion but i m doing the standalone applications( desktop application). the backend is php so the database is maintained using php.

But in my application i want some data in database for validation and here the front end is java and that too it is a stand alone application not web-based. So please suggest me what to do now?

1
  • 1
    If your back-end is PHP, then why are you trying to connect from front-end to the database directly? You should connect from your java front-end to PHP (using HTTP, I presume), have PHP deal with DB and send the results back to your front-end. Commented Aug 9, 2011 at 11:23

2 Answers 2

1

Use MySQL Connector/J to talk to MySQL from Java via JDBC and then just call the PHP as REST services...

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

Comments

1

Traditionally, when you have a PHP backend you will expose your API by implementing a web service.

These days it will usually be at least vaguely RESTful and use JSON as the data format.

Your front end will then make HTTP requests to the web service and process the JSON responses. This eliminates the need for the front end to even know that the database exists.

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.