I have been using Turbogears for a personal project. I have read that this framework, and others, do not support the use of views. I thought this was nonsense. I have run the following test, and found that I can select from a view very easily – Turbogears thinks the view is a table. The key is the following:
class vw_type(SQLObject): . . . . class sqlmeta: . . . . . . . . table="vw_type" . . . . . . . . fromDatabase=True
I am not sure I want to select from a view. I know that my models will perform more slowly than stored procedures against a database, but, you never know – it may come in handy. Sometimes, a view might just be faster that a sql statement that is build by the framework on the fly. It’s just good to know that views can be used.The reason I am using the an mvc framework is that I want to preserve the ability to use different database back ends without changing my code much. I also considered Ruby on Rails and PHP Cake. I settled on Turbogears because there are some Python libraries I very much need to use for this project. I am not pleased with the documentation that comes with Turbogears, but I bought the excellent book.
If I had not needed to use specific libraries that are only available in Python, I might very well have settled on Ruby on Rails. First, RoR is supported by a large community, and there are some great resources out there. The documentation is very good. In the end, though Turbogears won out. My impression is that the project needs help with documentation, and I think I am going to try to find a way to help, if I can. We’ll see.