We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
开发者_高级运维 Improve this questionI am looking for a php web framework that supports multiple databases with the same schema/model. Every customer of us will become his own webserver with his own database. On top of this we want to develop a central administration app that works on all customer databases, which are all have the same schema/model. Is there a php framework that supports such things?
I'd recommend using Doctrine as an ORM. This makes it effortless to communicate with various databases without modifying code.
http://www.doctrine-project.org/
Your Models in the MVC will most likely use Doctrine. The rest of your application (the VC in MVC) can be built in Zend, Symfony, or whatever you'd like.
There's a couple good frameworks. Off the top of my head, CodeIgniter, CakePHP, Symfony, Zend...but in any case I'm willing to bet you're going to need to roll your own code to do exactly what you want to do.
You can do this with any framework. I dont know whether you want to keep the codebase same or different. Assuming the codebase of all the installations are same, You can tweak the controller based on client session. The database connections and data directories (image, file folder etc) should be initialized based on client session and can live as persistent global variables.
A note on architecture : I dont know the nature of your application, but having multiple database and multiple codebase is a big maintenance issue. A full blown SaaS architecture save a lot of maintenance cost (http://en.wikipedia.org/wiki/Software_as_a_service)
Get in touch if you need further clarification.
精彩评论