views:

367

answers:

2

In the context of RoR and multiple disperate database connection, I was given this comment.

What is my alternative on an Apache server (mac)? PHP, no MVC, and a mess?

Also, this is not a comment about PHP. It just allows the classic asp mess that I have now, but fwiw, the "mess" works and has served well for many years. I wanted to updated it to a cleaner more maintainable way of doing things, but I am now at a loss on how to design this.

Any comments are appreciated.

EDIT: I suppose I could do this, but I believe I am back at square one.

A: 

Most ORMs allow you to connect to as many databases as you want. They don't allow you to necessarily do joins across databases or stuff like that.

Also, you can use a PHP MVC framework--my favorite is CakePHP. Comes with a built-in ORM, and I find it very preferable to straight-PHP in just about every situation.

mgroves
how do you connect to multiple databases with it?
johnny
With Cake? It's cake--just define multiple databases in database.php and then define $useDbConfig in each model class.
mgroves
A: 

If you are looking to do something with databases which Ruby On Rails' ORM cannot do, try using a different one. For example, Sequel is a fairly flexible Ruby ORM.

Just because your framework comes with an ORM doesn't mean you must use it.

Jack M.