Python web development that resembles PHP or classic ASP

Sebastian 'lunar' Wiesner basti.wiesner at gmx.net
Mon May 26 11:49:01 EDT 2008


[ erik.oosterwaal at gmail.com <erik.oosterwaal at gmail.com> ]

> 1. I love the control I have over my html using inline, template-based
> vbscript. ASP.NET's web forms really sound like a very bad idea, also
> the approach Microsoft takes in trying to make a stateless web-app
> seem like a statefull application is IMHO a burden. I think webapps
> are inherently different than desktop apps, and should be programmed
> as such.
> [...]
> 3. I like the rapid development I can do in a dynamic, loosely typed
> language like vbscript. The performance-bottleneck of a site is mostly
> in the database-access and the http-calls and I think writing all of
> the declarations and types for a strong-typed language is overkill for
> a webapp.
> 
> So that's when I started looking at other dynamic languages for
> webdevelopment. I looked at Ruby on Rails and at the different web-
> frameworks that are available for Python. The biggest problem there
> for me is that the MVC type frameworks that are currently very popular
> are also not what I'm looking for.
> 
> I like having my directory tree conform to the structure of my
> website, so the "Controller" part of the MVC style of development is
> something I wouldn't want. What I -would- like is a separation of code
> and display logic (so being able to include libraries in a page) and
> being able to intermix code directly into the HTML.

Summarising, you are searching for a framework, which allows you to embed
much code in templates, follows the directory structure of a classic
conventional website and has ORM features, but does not resemble desktop
programming or use the MVC pattern.

In this case I feel like have to disappoint you, I don't know any such thing
for python.  You will have to put this together from different components. 

I guess, using a simple WSGI wrapper as Werkzeug or Paste, and combining it
with a powerful ORM like SQLAlchemy and a templating engine, which allows
you to embed full python code in the templates (e.g. Mako), will best suite
your needs, as it gives you the freedom to design the application following
your ideas.  

Modern frameworks like Django or Grok require a somewhat great adaption,
since they strongly restrict the programmer's freedom.  I doubt, that you
would get Django or Grok working like your asp framework.

-- 
Freedom is always the freedom of dissenters.
                                      (Rosa Luxemburg)



More information about the Python-list mailing list