开发者

Which python project to choose for a database-heavy application

I plan to develop a rather database heavy (~100 tables) web application in python. The focus is on providing a nice and task-optimized inte开发者_运维技巧rface for people that edit or navigate through the data. Other focuses are:

  • Handle lots of data and complex queries.
  • Internationalization (translation, timezones, currencies)
  • Mailings (bulk emailing as well as notifications)
  • Easy integration into other websites (pull data from or push data to the application)
  • A role based authentication scheme. (ideally enforcing one role at a time)
  • It should be easy and fast (for python programmers) to create custom forms and workflows to work with the data.

I've read a lot about django, turbogears, pyramid, webcore, … but I'm still having a hard time to figure out where to start.

My current evaluation would suggest that turbogears is the way to go. Pyramid seems too much to learn about. Django seems to be too publishing focused. WebCore seems a bit to immature to base such a project on it.

Am I overlooking something? Are there other more suitable python frameworks? Is my information about some of them plain wrong? Which framework would you choose for this project, and why?


Imo the only part of django that might be "too" publishing orientated is the admin, but I have seen plenty of django applications doing stuff neatly.

Django has plenty of apps available covering what you want to do, but the only road block you might find is the part of: handle lots of data and complex queries. You will probably move out of django ORM land, but you might even move out of SQLAlchemy land too. Most of these projects use ORM's, so I would look into SQLAlchemy first, and evaluate how to use it for your needs.

Second, I would just go through the tutorials of the following projects, reading about them is good, but a small little tutorial/project (or mini prototype) is the only way to see if the project fits your programming style: pyramid, turbogears, and django. They have afaik the largest communities. The best tool will be the one you feel more confortable with. They all have good, excellent documentation, good supportive communities, and are mature enough for solid projects, and for very subtle differences, you probably can use any of them for your needs.


I have to agree with you: if you already have a database model, Django is not potentially the best way to go.

As of database binding, SQL Alchemy is definitely worth checking out, regardless of which framework you choose.

Some additions to your list:

  • Web.py - A little low-level, but a nice, mature framework (for SQLAlchemy usage, see cookbook on SQLAlchemy)
  • Tornado - Very good performance, supports Websockets which could be of a concern for some applications.

Edit: nowadays I would recommended Flask instead of Web.py. Tornado works really nicely with it as well.


The number of tables is not relevant for speeds etc. and not relevant for the choice of the framework. Recommendation: use SQLAlchemy as ORM between database and application. Go for Pyramid as web framework. Pyramid is easy, well-documented, test and very flexible in all aspects. Forms etc. can be easily created using "colander" + "deform" add-ons.


My gut says you want to use SQLAlchemy as the ORM. Turbogears does this out of the box, and probably is the largest player in the "not Django" space.

There was some work on pulling in SQLAlchemy for (or in addition to!) Django's ORM, but I don't know how current that work is (a quick google search found articles from 2008-2009 as the top hits)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜