Designing website

Tim Chase python.list at tim.thechases.com
Thu Jan 24 12:50:21 CET 2008


> I am planning to design a website using windows, apache, mysql,
> python.

You don't mention what sort of website...low-volume or
high-volume, basic text or graphic-intensive, simple design or
complex web-application logic.  Each of these factors into one's
choice.

> But I came to know that python cgi is very slow. I came across
> mod_python also but no good documentation are available for learning
> mod_python. Suggest me a good solution for this as I don't know other
> languages like PHP; I prefer python.

If you're coming from CGI development and planning a small app,
I'll give a plug for the WebStack[1] framework which basically
reduces just about every option out there (CGI, mod_python,
built-in BaseHTTPServer, and several othes) to a common API.

However, I'd also recommend looking into one of the more powerful
frameworks that abstracts away the server interface a bit more.
I'm personally a Django[2] guy, but for some folks CherryPy[3],
Pylons[4], TurboGears[5] or Zope[6] fills the bill.

They do the grunt work of interfacing with your web-server
(whether through mod_python, FastCGI or WSGI, or possibly other
options such as a Twisted[7] internal server) as well as make a
lot of other web-development aspects easier through separation of
concerns.  In most, business logic is kept separate from
presentation logic which are both kept separate from the data
layer.  This allows developers to focus on a particular aspect at
a time.

There are also deployment issues.  If you have your own server,
it's not a big deal.  However, if you're looking for cheap
low-end shared hosting, the resources made available on such a
machine are usually a bit constrained for these more powerful
schemes.  Sadly, this does make PHP look inviting for deployment
on low-end hosting services despite its warty language.

HTH,

-tkc

[1] http://www.boddie.org.uk/python/WebStack.html
[2] http://www.djangoproject.com
[3] http://www.cherrypy.org
[4] http://pylonshq.com
[5] http://turbogears.org
[6] http://zope.org
[7] http://twistedmatrix.com









More information about the Python-list mailing list