Date Tags Python

Let me summarize our recommendations for Python web frameworks:

  • Pylons: for database-driven applications
  • Plone (built on Zope3): for CMS (content management systems)
  • Twisted: for multiple/custom network protocols or extremely high volume

Overall, the Python web community is seeing a lot of active
development and evolution in solutions. Whereas the Ruby community has
one go-to web framework (Ruby on Rails), the Python community has a
plethora of choices. Luckily, a Python standard was created, PEP 333aka WSGI
(pronounced "whiskey" but stands for Web Server Gateway Interface),
which provides a standard component architecture for Python web
servers. All of the above frameworks support this standard now. This
interface standard allows plug-and-play middleware.

We recommend Pylons for database-driven application development because internally it is built on WSGI. If TurboGears 2.0
development proceeds as designed and it is written on top of Pylons,
then we will recommend it. Here are the middleware components that we
recommend using with Pylons, and the features of each that we really
love:

Database ORM: SQLAlchemy

  • well designed: provides nice object interface to SQL tables, but also let's you get to underlying SQL if you want to
  • really efficient: can load entire graph of objects in one SQL query
    • e.g., load item and line item details in one round-trip to the
      database

Templating: Mako

  • fast: it's the fastest of the Python templating engines
  • simple: you use standard Python in your templates, instead of custom tag libraries

Request Dispatching: Routes

  • flexible: regular expressions with intelligent name binding to map tidy-looking urls to your internal object hierarchy

Form handling: ToscaWidgets

  • no repetition: you model your form elements using Python objects, and use this model both for display and validation
  • flexible: you can either use the default or specify your own template for html generation

Every category of middleware above has competition, but these are
our current recommendations. Even though Pylons is a relatively new
project, it is built on more mature components that are on at least
their second major version.


Comments

comments powered by Disqus