Are there other web frameworks?
进入python世界也能发现很多web frameworks ,如何选择又一次成为一个问题。还是先看看介绍吧。来自
http://wiki.pylonshq.com/display/pylonscookbook/Concepts+of+Pylons
引用
Django
Django is oriented to programmers who deal mainly with content. The makers of Django are from the newspaper business. They say that they were often asked to implement certain features on their web site with tight deadlines. So they wrote their own framework. Django does not re-use many components. Even their way to access databases (the so called object-relational mapper) is home-made.
If you have similar requirements as Django's makers you will find that it is an excellent framework. But it is not meant to have its components replaced easily in case you don't like them. Their templating language is not very "pythonic" - it is a language of its own although an easy one. A nice feature is their admin frontend - it will create HTML forms for you to easily manage the data in your database. And it comes with a nifty way to map URLs to certain functions in your application based on regular expressions.
AJAX is basically possible with Django but not very comfortable. They have a web server built in but they suggest you run Django applications on an Apache with mod_python. One thing that can truly be said about Django: they have good marketing. Django is well documented, has a large community and there is even a book currently written. All in all Django is a "don't worry - be happy" framework that is tightly integrated and which will help you get things done quickly if you don't care too much which components it uses and don't expect all parts to look perfectly pythonic. It's a bit magical.
面向内容的应用。admin管理后台很强。文档很好,大社区支持
引用
Turbogears
Turbogears makes use of existing components. Their web server runs on CherryPy, their HTML templates come from Kid, they access databases through SQLObject and even include a good way to write interactive AJAX applications through the use of a Javascript library called Mochikit that is tightly integrated.
They make it easier than Django to replace certain components in case you don't like them. For example you can throw away SQLObject and use SQLAlchemy instead; although many parts of Turbogears still lack full support for SQLAlchemy. Turbogears's URL mapping scheme is less explicit. You can't tell what is supposed to happen for certain URLs. Instead a program of the same name as the first part of the URL is called. So the URLs the user sees may appear less nifty.
A nicer feature is their set of web-based utilities. Among them is their WidgetBrowser to browse the library of supplied form elements - or Catwalk - a database administration frontend similar to that which Django provides. Turbogears is well documented and has a large community, too. All in all Turbogears has nifty features like its widget library or a good set of utility functions that make life easier.
Its documentation is somewhat incomplete and contains recipes and examples rather than a nice reference. A move to SQLAlchemy has been publicly announced but many features currently only work well with SQLObject. Turbogears may be a nice choice for programmers who are scared by the magic of Django and like it a bit more explicit.
引用
Pylons
Pylons isn't exactly new but appears to have a smaller community than Django or Turbogears. That does not mean it's technically worse than other frameworks. It is unique in that it is more minimal and flexible than other frameworks. Basically you need to learn the basics of the components it uses. Next you need to understand how these components are controlled from within a Pylons application. So Pylons is the glue between the components with an additional powerful package called "Webhelpers" that aids in many areas from AJAX to RSS feed creation.
Pylons' flexibility means that you can exchange the components very easily. You don't like SQLAlchemy? Use SQLObjects. You read that Myghty is superseded by Mako? Use Mako. Pylons may not always hold your hand but it will try to make it easy to use different components than what Pylons uses by default. And you will likely be happy with what Pylons offers by default. The components are carefully chosen by looking at what other web frameworks do wrong.
The documentation for Pylons is still lacking and there is no "Pylons Handbook" yet. It seems like some fans of Pylons tried it because they generally liked the idea of web frameworks but were frustrated with Django or Turbogears. Some say that Pylons is the Ruby-on-Rails written in Python.
简单的说就是python版的ror 组件概念强 文档不全
分享到:
相关推荐
"webframework-0.2.2.tar.gz" 是一个Python Web框架的压缩包,版本为0.2.2,它包含了用于构建Web应用程序的源代码。在这个压缩包中,我们可以预期找到一系列的Python模块和文件,这些文件构成了Web框架的基础。 Web...
这份手册详细介绍了Robot Framework的架构,包括以下几个关键知识点: 1. **框架结构**:Robot Framework是一个层次化的框架,由核心库、测试库和测试数据三部分组成。核心库负责执行测试,测试库包含可重用的测试...
"python_framework-0.1.10-28.tar.gz"这个文件就是从PyPI官网上获取的一个Python库,它的命名遵循了PyPI的标准格式,下面我们将详细解析其背后的知识点。 首先,"python_framework"是该库的名称,暗示这可能是一个...
在Python Web开发中,有几个核心知识点是必须掌握的: 1. **基础语法**:Python是学习Web开发的基础,熟悉Python的基本语法、数据类型、控制结构、函数和模块是必要的。只有对Python有深入理解,才能更好地运用到...
这通常包括以下几个部分: 1. **用户管理**:用户注册、登录、权限控制,可能还包括教师和学生的角色区分。 2. **试题库管理**:创建、编辑、删除试题,支持多种题型,如选择题、填空题、判断题和简答题等。 3. **...
- **测试框架设计**:一个好的测试框架应该包括以下几个部分: - **需求分析**:明确测试的目的和范围。 - **环境搭建**:准备测试环境,包括硬件资源和软件配置。 - **测试用例设计**:根据需求设计测试用例,...
Python在Web 2.0网站中的应用主要体现在以下几个方面: 1. **Web框架**:Python有许多优秀的Web框架,如Django和Flask,它们极大地简化了Web应用程序的开发。Django提供了一站式解决方案,包括ORM(对象关系映射)...
标题中的"Python库 | robotframework_lsp-0.16.0-py2.py3-none-any.whl"指的是一个Python库,名为`robotframework_lsp`,版本为0.16.0。这个库通常是一个可执行的Python二进制包,通过`.whl`文件格式分发,这种格式...
在这个“Simple Calculator”应用中,我们可能看到以下几个关键部分: 1. **Models**: 在这个简单的计算器应用中,可能没有直接与数据库交互的模型,因为计算操作不需要持久化存储数据。 2. **Views**: 视图函数会...
一个典型的 Tornado Web 应用程序通常包括以下几个部分: - **主模块**:负责启动 Tornado 的应用实例。 - **处理程序类**:定义了具体的 HTTP 请求处理逻辑。 - **路由配置**:将 URL 映射到对应的处理程序类。 - ...
文章继续列举了多个Python测试库,每个库针对不同类型的测试需求。例如,seleniumbase是一个端到端的自动化测试框架,它提供了一套丰富的API来简化测试脚本的编写。pytest是一个功能强大的单元测试框架,支持自动化...
Web2Py的设计理念主要围绕以下几个方面: - **简洁性**:Web2Py追求简洁的代码和清晰的逻辑结构。 - **易用性**:该框架易于学习和使用,适合各种技能水平的开发者。 - **安全性**:内置了强大的安全机制,确保应用...
书中的内容可能包括以下几个方面: 1. Python基础:首先,书籍可能会介绍Python编程语言的基本概念,如变量、数据类型、控制流语句、函数、模块和异常处理。这对于初学者来说是必不可少的,确保他们对Python有扎实...
在"Food Ordering System"项目中,你将学习到如何结合Python的Web开发技术,从零开始构建一个完整的订餐系统,涵盖用户管理、菜品展示、订单处理等多个环节。这将帮助你提升Python实战技能,并对Web后端开发有更深入...
根据给定文件的信息,我们可以提炼出以下几个核心知识点: ### 一、Python Web开发概述 - **Web开发**:指的是创建和维护Web应用程序的过程,主要包括前端(用户界面与交互逻辑)和后端(处理数据和业务逻辑)两...
通过这个库,开发者能够结合 Python 的强大功能和 Web 开发的灵活性,创建出高效、美观的桌面应用程序。在实际项目中,可以深入学习 `pywebview` 的文档,进一步了解其特性和用法,以充分利用这个工具带来的便利。
本项目旨在介绍如何利用Python3、Django2.0框架、Django REST Framework(DRF)、CentOS7操作系统、uWSGI服务器以及Nginx反向代理来开发和部署RESTful API项目。 1. **Python3**:Python3是Python编程语言的最新...
Robot Framework由以下几个主要部分组成: - **Core Library**:这是Robot Framework的核心部分,负责解释测试数据并执行测试。 - **Standard Libraries**:这些是随Robot Framework一起提供的标准库集合,它们涵盖...
文档还提供了关于如何编写第一个Python程序的简要指南,介绍了几种编写和运行Python代码的方法,包括在终端使用Python解释器、使用IPython以及利用文本编辑器(如Sublime)创建和运行Python文件等。通过这些方法,...
书中的内容可能涵盖以下几个方面: 1. **IronPython简介**:介绍IronPython的历史、设计目标和与其他Python实现的区别,包括如何安装和配置IronPython开发环境。 2. **Python与.NET的交互**:讲解如何使用Iron...