Are Python-based web frameworks reliable enough?

G

Gilles Ganault

Hello

Until now, the modest web apps I wrote were all in PHP because it's
available on just about any hosted server.

I now have a couple of ideas for applications where I would deploy my
own servers, so that I'd rather write them in Python because I find
the language more pleasant to write with.

I read that the traction for the mod_python module isn't as strong as
mod_php, so I guess I should consider the alternative, which is
writing a long-running process with some framework like TurboGears or
Django.

To make an informed choice, I'd like your feedback on this:

1. Is mod_python a bad choice today? If yes, are there other PHP-like
modules available, ie. the Python code is hosted in pages that are
loaded every time a user calls them?

2. If you think I should consider long-running processes, are the
frameworks reliable enough so that I shouldn't fear crashes every so
often?

3. What about performance as compared to equivalent PHP/MySQL apps?

Thank you for any feedback.
 
K

Krishnakant

Hello

Until now, the modest web apps I wrote were all in PHP because it's
available on just about any hosted server.

I now have a couple of ideas for applications where I would deploy my
own servers, so that I'd rather write them in Python because I find
the language more pleasant to write with.
Certainly, You will be much much more productive if you use python provided you are not going to do it the old "cgi " way.
I read that the traction for the mod_python module isn't as strong as
mod_php, so I guess I should consider the alternative, which is
writing a long-running process with some framework like TurboGears or
Django.
Why not give a try to pylons? While turbogears is great and very
powerful, it any ways uses most of pylons and pylons is not just rock
solid and robust, it also has very very good documentation.
Not to mention the fact that heavy production applications are today
running pylons.
To make an informed choice, I'd like your feedback on this:

1. Is mod_python a bad choice today? If yes, are there other PHP-like
modules available, ie. the Python code is hosted in pages that are
loaded every time a user calls them?
Even if it was a good choice, cgi method of programming is no more suitable in today's www, because the requirements of a web developer today are much beyond just oepning a connection to a database and sending some processed response in plain old html.
Today's web applications do much more than that so a web framework is
almost always a better choice.
2. If you think I should consider long-running processes, are the
frameworks reliable enough so that I shouldn't fear crashes every so
often?
No not really, although it is always a better idea to run your
production web app behind apache. This will keep the server up on very
heavy loads and you will not have to worry about http requests and
responses. let that be taken care by the best tool (apache ) and let
your application handle how to manage the logic and send out views.
3. What about performance as compared to equivalent PHP/MySQL apps?
Performance is very good if you use the right tool in the right place.
This is the biggest advantage of some web frameworks like pylons or tg
over other.
happy hacking.
Krishnakant.
 
B

Bruno Desthuilliers

Gilles Ganault a écrit :
Hello

Until now, the modest web apps I wrote were all in PHP because it's
available on just about any hosted server.

I now have a couple of ideas for applications where I would deploy my
own servers, so that I'd rather write them in Python because I find
the language more pleasant to write with.

I read that the traction for the mod_python module isn't as strong as
mod_php, so I guess I should consider the alternative, which is
writing a long-running process with some framework like TurboGears or
Django.

To make an informed choice, I'd like your feedback on this:

1. Is mod_python a bad choice today? If yes, are there other PHP-like
modules available, ie. the Python code is hosted in pages that are
loaded every time a user calls them?

I indeed wouldn't use mod_python for web app development, unless I need
really strong integration with apache and don't care for portability (=>
deploying on other web servers).

And while we're at it, the server page model (PHP etc) is just braindead
for anything more complicated than a simple personal home page. FWIW,
even PHP coders tend to go away from it and turn to more "structured"
frameworks like Symfony or CakePHP - which look much more like Django,
TG, Pylons or (for CakePHP) Ruby On Rails.
2. If you think I should consider long-running processes, are the
frameworks reliable enough so that I shouldn't fear crashes every so
often?

My experience is that they are usually much more reliable than most PHP
code around.
3. What about performance as compared to equivalent PHP/MySQL apps?

The right question here would be "what about performances as compared to
equivalent PHP apps of equivalent quality written using similar
frameworks, deployed on equivalent web servers and getting equivalent
loads".

Ok, to make a long story short: I never had any performance issues so
far with app written in Django, and never heard of anyone reporting such
issues. <troll>I whish I could say the same about Zope/Plone...</troll>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top