PDA

View Full Version : Is it feasible to use Quercus with Java/Hibernate/Postgres with WordPress?


gr8fanboy
01-22-2010, 05:34 PM
As you can probably tell from my bio, I'm Grails addict.
I'm wondering if it would be feasible to abstract out the data layer in Java, Spring or Grails with Hibernate and then create the PHP to generate a WordPress front end.
Only I'd like to stick with one database, Postgres and still have all the benefits of WordPress for Digg & Ping-O-Matic style goodness.
Is this something that Quercus would facilitate and has someone blogged about such a topic.
Any articles that could direct me down the correct path assuming this is feasible would be greatly appreciated
Cheers.

nam
01-23-2010, 12:47 AM
In our Wordpress on the Google App Engine demo, we did the same thing that you're trying to do. From experience, it is not feasible to abstract out the Wordpress data layer. For one, Wordpress, like other PHP applications, depend on MySQL so they didn't put much effort into abstracting the data layer from the presentation layer. You will see SQL sprinkled throughout the base code and plugins.

On a positive note, it is easy to replace MySQL with Postgres in Quercus. It's just a simple config setting:

http://www.caucho.com/resin/doc/quercus.xtp#datasource

The only thing you would need to do for Wordpress is to rewrite the MySQL specific queries to their Postgres equivalent (i.e. SHOW TABLES).