落就是一道风景线……

BFG

04.20.2010 · Posted in Python

BFG is a Python web application framework based on WSGI. BFG is also referred to as repoze.bfg.

BFG shares version control facilities with the Repoze project, and is developed by the same primary developers, but its goals are different than the overall goals of the Repoze project. BFG is inspired by ZopePylons and Django. "Under the hood", BFG makes use of technologies from the Zope project.

repoze.bfg 介绍

repoze.bfg 是一个python Web框架。他最早受到了Zope发布器的启发, 使用了 Zope 库来完成大部分的工作。 但bfg没那么多野心,其特性比任何一个Zope发布版本都少很多。

repoze.bfg 使用 WSGI 协议来处理请求request和响应response , 集成了 Zope, Paste, 和 WebOb 库来构建一个简单的web对象发布框架。

What makes BFG special

It's Tested If it ain't tested, it's broke. We strive to test BFG 100% completely via unit tests.

熟悉
作为web开发人员,多年来,我们已经开始习惯于使用一个非常特殊的方式开发 (尤其是使用Zope 2)。 而这个框架是适合我们大脑的实践经典 (如何翻译? a canonization of practices that "fit our brains").

Simplicity: BFG attempts to be a "pay only for what you eat" framework in which you can be productive quickly with partial knowledge. We contrast this with "pay up front for what anyone might eventually want to eat" frameworks, which tend to expect you to understand a great many concepts and technologies fully before you can be truly productive. BFG doesn't force you to use any particular technology to get your application written, and we try to keep the core set of concepts you need to understand to a minimum.

简单
repoze.bfg 试图成为一个 "只为你吃的买单" 的框架,只需要掌握部分知识,你便可快速变得高产; 而不是 "为每个人最后可能都会吃的预先买单" 的那种框架,那种框架在你能真正高产前, 会要求你完全理解非常多的概念和技术. repoze.bfg 在你开始写程序前,不强制要求你使用某个特殊的技术, 我们力求你需要理解的核心概念最小化。我们扔掉了笨重的盔甲。

Minimalism: BFG provides only the very basics: URL to code mapping, templating, and security. There is not much more to the framework than these pieces: you are expected to provide the rest.

最小化

repoze.bfg 仅仅提供了最基本的概念: URL映射到代码模板, 和 安全性. 框架除了这些就没有了:剩下的由你来提供。

Documentation: Because BFG is so minimal, it's relatively easy to keep its documentation up-to-date, which is helpful to bring new developers up to speed. It's our goal that nothing remain undocumented about BFG.

文档
因为 repoze.bfg 这慢小,相对来说比较容易让文档保持最新, 这对让新手跟上非常重要。我们的目标就是, repoze.bfg 中没有未经文档的东东。

Speed: BFG is meant to be fast, capable of serving on the order of 100-1000 requests per second on today's commodity hardware for views that do "real work" given proper application implementation. The "hardware is cheap" mantra has its limits when you're responsible for managing a great many machines: the fewer you need, the less pain you'll have.

速度
repoze.bfg 意味着非常快,支持在当今一般的硬件上,为正确实现的真实应用,提供每秒100+请求。 硬件很便宜 的咒语在你需要管理大量机器的情况下也会有限制:如果需要得少,你的麻烦就少很多。

BFG官网:http://bfg.repoze.org/

Tags:

Leave a Reply