I want to use PHP in the frontend(for UI and calling services) and java at the backend(for database interaction and creating REST services) for my web application.
I want to know the advantages and disadvantages of this kind of approach.
I want to use PHP in the frontend(for UI and calling services) and java at the backend(for database interaction and creating REST services) for my web application.
I want to know the advantages and disadvantages of this kind of approach.
If thats the case, I will strongly recommend to look at Groovy with Grails.
Assuming that the time is the main concern. By using Groovy with Grails, you can get faster development, and with all the power of Java, seamlessly.
[Edited]
From your comments to the question, it seems like you are looking for some powerful web templates, as available in Joomla or Drupal CMSs.
Ug, that sounds messy. Things like security have to either be implemented cleverly or duplicated (think form validation vs server side validation, you probably want both). Pure Java or pure PHP solutions will have things like that built in.
Next, it becomes a bit tricky to debug certain things. If you have an issues you have two logical "stacks" to sieve through.
Finally, I personally don't know of web server that runs both Java and PHP so you I bet you'll have to have two webservers which means twice the configuration and twice as many fail points.
Advantages:
Disadvantages: