Reputation: 1
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?
Upvotes: 0
Views: 1009
Reputation: 943510
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.
Upvotes: 1
Reputation: 37506
Use MySQL Connector/J to talk to MySQL from Java via JDBC and then just call the PHP as REST services...
Upvotes: 1