Re: Trying to understand Python web-development



On 29 Jan, 18:11, walterbyrd <walterb...@xxxxxxxxx> wrote:
I don't know much php either, but running a php app seems straight
forward enough.

I think that this (the ease of PHP application deployment) is one of
the things that keeps Python framework developers up at night,
regardless of whether the cause is technical (what processes or
components are running) or social (that hosting providers install
enough of the useful PHP stuff for people not to care about wanting to
install more).

Python seems to always use some sort of development environment vs
production environment scheme. For development, you are supposed to
run a local browser and load 127.0.0.1:5000 - or something like that.
Then to run the same thing in a development environment, I have to
configure some files, or touch all the files, restart the web-server,
or something. Why is that?

You can deploy Python Web applications using anything as simple as CGI
(which only requires a single change to the Web server setup), right
up to the full application server configuration. For a long time I've
advocated the ability to be able to do this without having to switch
frameworks and rewrite your code: that's what my WebStack package [1]
is all about, and I guess that given the availability of the right
adaptors and framework support, WSGI should let you do this as well.

Python also seems to require some sort of "long running processes" I
guess that the python interpretor has to running all of time.

Not so: deploying anything as a CGI script/program means that the
application code is only run when a request is made to the
application. Lots of Python software can use this approach: MoinMoin,
ViewVC, Trac... (All these things have, notably, implemented their own
mechanisms for abstracting away the deployment technology, since they
also work with things like mod_python. Another sad example of the
community not coalescing around standards, although I think they're
all looking into WSGI now.)

I am not really sure about what wsgi is supposed to accomplish.

It's supposed to decouple the deployment technologies from the
framework technologies, or at least that's what I'd use it for, and if
all frameworks supported it, you'd supposedly be able to take, say,
your Django application and run it on Zope 3, or your TurboGears
application and run it on Twisted. Of course, you'd write your Django
code differently from any Zope 3 code in your application, and the
TurboGears code wouldn't look a lot like Twisted code, but that's
another issue entirely.

Paul

[1] http://www.python.org/pypi/WebStack
.



Relevant Pages

  • Frameworks for "Non-Content Oriented Web Apps"
    ... There are great Python Web Application Framework. ... meant for content oriented web apps. ... I am a web developer, using PHP for living. ...
    (comp.lang.python)
  • Re: Dabo in 30 seconds?
    ... >> You might want to look at Dabo, which is a database application ... >> framework for Python. ... The wizard isn't the only way to create Dabo apps, ... The framework then takes care of populating the controls with the ...
    (comp.lang.python)
  • Re: Core Impact
    ... securityforest and atk are just exploit GUIs ... and framework. ... > platform of attack against internal hosts... ... The "standard" you refer to in quotes, is python, and not only is it ...
    (Pen-Test)
  • RE: Could a single web framework popularize Python?
    ... and am now rewriting it in Python. ... > framework isn't ... > that's no way to build confidence in the standard either. ...
    (comp.lang.python)
  • Re: Deployment from MDX Sample Framework
    ... are you sure the proper .NET framework version and MDX version is deployed ... before the app deployment process occurs? ... > public bool IsDeviceAcceptable(Caps caps, Format adapterFormat, Format ...
    (microsoft.public.win32.programmer.directx.managed)