I think most of the big frameworks will fit your requirements so maybe you might look at it from the perspective of the app you are writing. How much do you want to work "out of the box". Will you need user management? Will you need an admin panel etc.
I use Django and it's great when you don't want to rewrite a lot of boilerplate. It can be a bit tedious at times trying to bend it to do what you want, but once you get your head around it's intricacies , you can get things done very quickly.
In addition to the other frameworks mentioned (which are all good options), you should check out web2py. It's a feature-packed, full-stack framework that's very easy to set up, learn, and use. It was originally inspired by Ruby on Rails, so if you're rewriting an RoR application, you may find it more comfortable than some of the other Python frameworks. Here are some details regarding your requirements:
NoSQL support: Google App Engine, CouchDB (partial), MongoDB (partial)
Easy to add additional database adapters (SQL or NoSQL).
The framework is under very active development (new releases every 2-4 weeks), yet is committed to maintaining backward compatibility, so existing apps won't break upon upgrade. If you have any questions, you'll get lots of help from the friendly and responsive mailing list.
I don't think you can go wrong with any of the major web frameworks. Personally I've used Django the most and would lean that way, the ORM is really great and it's philosophies/design are closely aligned with my own personal preference. However, if you wanted to go a different route, bottle is a really fun lightweight microframework, I've found it a pleasure to develop with. If you want to go the NoSQL route, MongoDB has great Python support. PyMongo is excellent (and the recommended way to use MongoDB from Python), MongoEngine is a nice little ORM (if you care for that sort of thing).
Of the frameworks you've mentioned, Django has the most momentum and is most likely to fit your ideals of a framework, coming from a Rails background. By this I mean it has helpers that allow you to generate your forms quickly, though no scaffolding. (In fact, Django's way is a little better than scaffolding in Rails because you can use all or just pieces of it)
It has a good ORM with lots of helper methods and, one of the best features, it has a fully functional admin interface once you define your models. You can start porting data even while the site is being developed.
It also provides excellent user support, including permissions, access control, groups, user profiles.
It's easy (and fun) to create your own middleware and context processors that let you abstract out often reused pieces as plugins to the framework.
The only feature Django doesn't have that you specified above is the NoSQL support. And this is only half true. If you want to use a non relational database for some parts of your app, such as session storage, you can. If you want to use it as your exclusive backend you'll lose some of Django's awesome features unless you patch Django with django-nonrel.
I've used turbo gears which is a combination of several of the other options you mentioned. That community has some great people in it but they're currently experiencing a major architecture revamp and honestly, they're just not getting as much developer attention as Django.
发布评论
评论(5)
我认为大多数大型框架都会满足您的要求,因此也许您可以从您正在编写的应用程序的角度来看待它。你有多想“开箱即用”地工作。您需要用户管理吗?您需要管理面板等吗?
我使用 Django,当您不想重写大量样板文件时,它非常有用。有时尝试改变它来做你想做的事情可能有点乏味,但是一旦你了解了它的复杂性,你就可以很快地完成工作。
无论如何使用 Django:
MVC(严格与否)
不是MVC,但类似> http://www.djangobook.com/en/2.0/chapter05/#cn16< /a>
小团队(2-3人,包括一名设计师)
不确定框架将如何影响这一点,但是是的,您自己开发或通过版本控制与团队一起开发都很快
使用起来很有趣
这里有很多很棒的文档,因此您不用花太多时间,而且您可以很快上手,这很好
REST 支持
是的,作为一个图书馆: > https://bitbucket.org/jesperndjjango-piston/wiki/Home
多级缓存(DB查询、页面缓存)
是的> https://docs.djangoproject.com/en/dev/topics /cache/?from=olddocs
Nginx 支持(X-Accel-重定向文件下载)
同样,不确定这是否相关,但是是的。我将 nginx 与 UWSGI 结合使用,速度非常快
流量大(1,200,000 ~ 浏览量)
是> Django 是否可以扩展?
网址重写(多域不仅支持子域)
对此不确定
如果不是炒作,那不是问题
这不是 Node-js,但同样,有很多非常好的文档
如果没有插件也不是问题
有....我的上帝
开箱即用的 SQL,但支持 NOSQL > http://www.allbuttonspressed.com/projects/django-nonrel
I think most of the big frameworks will fit your requirements so maybe you might look at it from the perspective of the app you are writing. How much do you want to work "out of the box". Will you need user management? Will you need an admin panel etc.
I use Django and it's great when you don't want to rewrite a lot of boilerplate. It can be a bit tedious at times trying to bend it to do what you want, but once you get your head around it's intricacies , you can get things done very quickly.
With Django anyway:
MVC (Strict or not)
Not MVC, but similar > http://www.djangobook.com/en/2.0/chapter05/#cn16
Small Team (2-3 people included one designer)
not sure how the framework will effect this, but yes, it's quick to develop on your own or with a team via version control
Fun to use
well there's a lot of great documentation, so less time is spent pulling your hair out, and you can get going very quickly which is nice
REST support
Yes, as a library: > https://bitbucket.org/jesperndjjango-piston/wiki/Home
Multilevel caching (DB query, page cache)
Yep > https://docs.djangoproject.com/en/dev/topics/cache/?from=olddocs
Nginx Support (X-Accel-Redirect File Download)
Again, not sure this is relevant, but yes. I use nginx with UWSGI and it's very quick
Heavy traffic (1,200,000 ~ views)
Yes > Does Django scale?
Urls rewriting (Multi-domains support not only subdomain)
Not sure about this
Not a problem if it's not hype
It's no node-js, but again, lots of really good documentation
Not a problem if there is no plugins
There are .... my god there are
Either SQL or NOSQL (can be fun to try NOSQL)
SQL out of the box, but NOSQL is supported > http://www.allbuttonspressed.com/projects/django-nonrel
除了提到的其他框架(都是不错的选择)之外,您还应该查看 web2py。它是一个功能丰富的全栈框架,非常容易设置、学习和使用。它最初受到 Ruby on Rails 的启发,因此如果您正在重写 RoR 应用程序,您可能会发现它比其他一些 Python 框架更舒适。以下是有关您的要求的一些详细信息:
该框架正在积极开发(每 2-4 周发布新版本),但致力于保持向后兼容性,因此现有应用程序不会在升级时中断。如果您有任何疑问,您可以通过友好且响应迅速的邮件获得大量帮助列表。
In addition to the other frameworks mentioned (which are all good options), you should check out web2py. It's a feature-packed, full-stack framework that's very easy to set up, learn, and use. It was originally inspired by Ruby on Rails, so if you're rewriting an RoR application, you may find it more comfortable than some of the other Python frameworks. Here are some details regarding your requirements:
The framework is under very active development (new releases every 2-4 weeks), yet is committed to maintaining backward compatibility, so existing apps won't break upon upgrade. If you have any questions, you'll get lots of help from the friendly and responsive mailing list.
我会推荐 DJANGO 或 TurboGears。
I would recommend DJANGO or TurboGears.
我认为使用任何主要的 Web 框架都不会出错。就我个人而言,我最常使用 Django,并且会倾向于这种方式,ORM 真的很棒,它的哲学/设计与我个人的喜好密切相关。但是,如果您想走不同的路线,bottle 是一个非常有趣的轻量级微框架,我已经发现与之一起开发是一种乐趣。如果您想走 NoSQL 路线,MongoDB 有很好的 Python 支持。 PyMongo 非常出色(也是从 Python 使用 MongoDB 的推荐方法),MongoEngine 是一个不错的小 ORM(如果你关心这类事情)。
I don't think you can go wrong with any of the major web frameworks. Personally I've used Django the most and would lean that way, the ORM is really great and it's philosophies/design are closely aligned with my own personal preference. However, if you wanted to go a different route, bottle is a really fun lightweight microframework, I've found it a pleasure to develop with. If you want to go the NoSQL route, MongoDB has great Python support. PyMongo is excellent (and the recommended way to use MongoDB from Python), MongoEngine is a nice little ORM (if you care for that sort of thing).
在您提到的框架中,Django 的发展势头最强劲,并且最有可能符合您理想的框架,并且具有 Rails 背景。我的意思是它有帮助程序,可以让您快速生成表单,尽管没有脚手架。 (事实上,Django 的方式比 Rails 中的脚手架好一点,因为您可以使用它的全部或部分)
它有一个很好的 ORM,有很多帮助方法,而且最好的功能之一是它有一个功能齐全的管理界面一旦你定义了你的模型。即使网站正在开发中,您也可以开始移植数据。
它还提供出色的用户支持,包括权限、访问控制、组、用户配置文件。
创建自己的中间件和上下文处理器很容易(而且很有趣),让您可以将经常重用的部分抽象出来作为框架的插件。
Django 唯一不具备您在上面指定的功能是 NoSQL 支持。这只说对了一半。如果您想对应用程序的某些部分(例如会话存储)使用非关系数据库,则可以。如果你想使用它作为你的专属后端,你将失去 Django 的一些很棒的功能,除非你用 django-nonrel。
我使用了涡轮齿轮,它是您提到的其他几种选项的组合。该社区中有一些很棒的人,但他们目前正在经历重大的架构改造,老实说,他们只是没有像 Django 那样得到开发人员的关注。
Of the frameworks you've mentioned, Django has the most momentum and is most likely to fit your ideals of a framework, coming from a Rails background. By this I mean it has helpers that allow you to generate your forms quickly, though no scaffolding. (In fact, Django's way is a little better than scaffolding in Rails because you can use all or just pieces of it)
It has a good ORM with lots of helper methods and, one of the best features, it has a fully functional admin interface once you define your models. You can start porting data even while the site is being developed.
It also provides excellent user support, including permissions, access control, groups, user profiles.
It's easy (and fun) to create your own middleware and context processors that let you abstract out often reused pieces as plugins to the framework.
The only feature Django doesn't have that you specified above is the NoSQL support. And this is only half true. If you want to use a non relational database for some parts of your app, such as session storage, you can. If you want to use it as your exclusive backend you'll lose some of Django's awesome features unless you patch Django with django-nonrel.
I've used turbo gears which is a combination of several of the other options you mentioned. That community has some great people in it but they're currently experiencing a major architecture revamp and honestly, they're just not getting as much developer attention as Django.