I am writing a web application that is comparable to a content
management system used in blogging. I really want to use Python after
having done some evaluation coding using Python 2.3.5 with mod_python
3.1.4 running on Apache 2.0 with the Publisher handler.
However, I am still very hesitant to settle on Python. All my research
brings up the same collection of scant articles and old mailing list
messages that reference each other. I am not interested in using
frameworks, partly because I am confused by them, but mostly because I
don't want to add another layer of software complexity on top of my code
since I already am expecting a hard time finding low-cost dedicated
hosting with Apache 2 and mod_python 3 support.
I have made a few assumptions regarding Python and mod_python's value.
Hopefully the experts here can help correct any of my assumptions and
give me some more comfort in committing to Python.
1. I want to use CGI through Publisher handler, instead of CGI handler
or PSP. Despite the speed increase mod_python gives me, there is a
problem of persistence that can be a problem when dealing with a site
that will hosts potentially hundreds of simultaneous users.
2. I have found nothing to quantify the stability and reliability of
mod_python 3, and in the absence of a list of major commercial sites
that use mod_python, I am left feeling as is there might be technical
(read as stability/security) reasons to favor mod_perl over mod_python.
3. I am not very attracted to PSP because I want to separate the logic
from the presentation as completely as possible, and PHP and other
template languages including PSP seem difficult to do that in. Learning
template systems like PyMeld is an unattractive option for me since I
don't understand their benefit. Why can't I just use req.write() to
output my markup, relying completely on external CSS after the fact? My
thought is that HTML templates provide a minimum set of static code that
doesn't require extra processing, thus keeping performance up. However,
if I minimize my use of req.write() will it make a difference?
4 A final question, is mod_python 2.7 suitable for use in a commercial
production system? All I'm doing is text processing, string
manipulation, database calls, and some very minor mathematics. If the
Apache 1.3 series mod works fine, can I relieve myself of some stress
and go with that combo?
I'd appreciate some practical advise on this. I am funding this myself
on a small budget with no hard deadline, so it is critical to me that I
choose a language that will minimize my costs. Are my assumptions
correct, or am I falling prey to FUD?
Anthony 6 1891
Anthony L. wrote: 1. I want to use CGI through Publisher handler, instead of CGI handler or PSP. Despite the speed increase mod_python gives me, there is a problem of persistence that can be a problem when dealing with a site that will hosts potentially hundreds of simultaneous users.
What problem? Could you elaborate further?
3. I am not very attracted to PSP because I want to separate the logic from the presentation as completely as possible, and PHP and other template languages including PSP seem difficult to do that in.
In theory, people use these templates to /improve/ the separation
between logic and presentation. When you just use req.write() you're
inevitably mixing logic and presentation. At least with the template
systems, you do the presentation once and the logic fills in the gaps.
It's even possible to edit the presentation in many WYSIWYG web editors
without affecting the code.
Why can't I just use req.write() to output my markup, relying completely on external CSS after the fact?
You can, and in fact this is largely what I do. But the HTML/CSS divide
is not exactly in the same place as the template/CGI-style divide. You
can still delegate most of the presentation work to CSS no matter how
you emit your HTML.
It as not easy to work with the CGI-style code in a WYSIWYG web editor
as it is to edit a template, which is probably the main reason for
their use. Also, coding everything with req.write() means that each
page is very idiosyncratic, making for poor code-reuse. In theory.
My thought is that HTML templates provide a minimum set of static code that doesn't require extra processing, thus keeping performance up. However, if I minimize my use of req.write() will it make a difference?
I don't think performance is a factor, really. HTML templates tend to
exist so that you can structure the page without worrying about the
Python code. They work well for fairly uniform pages that largely
require the same sort of data on each page. I am more of a programmer
than a designer so I prefer to think in terms of code and emit HTML as
it suits me.
I'd appreciate some practical advise on this. I am funding this myself on a small budget with no hard deadline, so it is critical to me that I choose a language that will minimize my costs. Are my assumptions correct, or am I falling prey to FUD?
Python is a good language for rapid development and hence testing. So
you could probably create a quick mock-up of your system and then write
some scripts to place it under heavy stress to see how well it holds
up.
--
Ben Sizer
Anthony L. wrote: I am writing a web application that is comparable to a content management system used in blogging. I really want to use Python after having done some evaluation coding using Python 2.3.5 with mod_python 3.1.4 running on Apache 2.0 with the Publisher handler.
This looks like a resonable choice.
However, I am still very hesitant to settle on Python. All my research brings up the same collection of scant articles and old mailing list messages that reference each other. I am not interested in using frameworks, partly because I am confused by them, but mostly because I don't want to add another layer of software complexity on top of my code since I already am expecting a hard time finding low-cost dedicated hosting with Apache 2 and mod_python 3 support.
I came to the same conclusion a couple of years ago. Working directly
with the mod_python interpreter ain't that complex. You're guaranteed
to reach great performances whilst using a decent language
(no perl or c here).
When i started to work the publisher was not ready for production,
so i even skipped the thing. No problem. You can code code mod_python
"straight to the metal", the cgi way or use any upper level scheme.
I have made a few assumptions regarding Python and mod_python's value. Hopefully the experts here can help correct any of my assumptions and give me some more comfort in committing to Python.
1. I want to use CGI through Publisher handler, instead of CGI or PSP. Despite the speed increase mod_python gives me, there is a problem of persistence that can be a problem when dealing with a site that will hosts potentially hundreds of simultaneous users.
Caring for performance. That's on your side, as a developper.
mod_python itself will care for its part of the job.
2. I have found nothing to quantify the stability and reliability of mod_python 3, and in the absence of a list of major commercial sites that use mod_python, I am left feeling as is there might be technical (read as stability/security) reasons to favor mod_perl over mod_python.
mod_python clearly lacks the kind of recognition (and associated
support) that mod_perl has enjoyed for years.
The documentation is clearly at the level of the product itself.
Win32 support is poor. However is great.
3. I am not very attracted to PSP because I want to separate the logic from the presentation as completely as possible [...]
In view of your project why not consider cherrypy as well? It may
be an alternative to consider.
if I minimize my use of req.write() will it make a difference?
The kind of mod_python apps we devised work this way.
Building up the http string (from various sources including db
calls, some caching ..) the old way.
No rocket science here and performance is very decent.
4 A final question, is mod_python 2.7 suitable for use in a commercial production system? All I'm doing is text processing, string manipulation, database calls, and some very minor mathematics. If the Apache 1.3 series mod works fine, can I relieve myself of some stress and go with that combo?
Why not? But why not work with apache 2.x. mod_python works fine on
this platform.
I'd appreciate some practical advise on this. I am funding this myself on a small budget with no hard deadline, so it is critical to me that I choose a language that will minimize my costs. Are my assumptions correct, or am I falling prey to FUD?
no FUD here. Read the mod_python carefully, run your tests and make up
your choice. This is definitely a workable environment.
Francois
"Ben Sizer" <ky*****@gmail.com> writes:
[...] It as not easy to work with the CGI-style code in a WYSIWYG web editor as it is to edit a template, which is probably the main reason for their use. Also, coding everything with req.write() means that each
[...]
You seem to believe CGI is incompatible with templating. Why? The
two are entirely independent of each other.
John
In article <11**********************@g14g2000cwa.googlegroups .com>,
"Ben Sizer" <ky*****@gmail.com> wrote: Anthony L. wrote: 1. I want to use CGI through Publisher handler, instead of CGI handler or PSP. Despite the speed increase mod_python gives me, there is a problem of persistence that can be a problem when dealing with a site that will hosts potentially hundreds of simultaneous users. What problem? Could you elaborate further?
Hi Ben. This is what I myself am trying to find out. From what I gather,
hosts dislike long running processes, and so one reason for not
supporting Python and mod_python is that, plus multiple instances of the
python interpreter. Granted, a lot of this looks like old information
combined with FUD, so I am suspicious. After all, high-traffic sites
using mod_perl seem okay.
In theory, people use these templates to /improve/ the separation between logic and presentation. When you just use req.write() you're inevitably mixing logic and presentation. At least with the template systems, you do the presentation once and the logic fills in the gaps. It's even possible to edit the presentation in many WYSIWYG web editors without affecting the code.
Yes, I see your point. In this case it works for me (at the moment)
because the HTML design will remain as is without subject to editing,
whereas the look and feel (controlled by CSS) will be user-editable.
I don't think performance is a factor, really. HTML templates tend to exist so that you can structure the page without worrying about the Python code. They work well for fairly uniform pages that largely require the same sort of data on each page. I am more of a programmer than a designer so I prefer to think in terms of code and emit HTML as it suits me.
Okay, I might have been unfair in looking away from PSP then. Thanks Ben.
Anthony
In article <43***********************@nan-newsreader-07.noos.net>,
Francois Lepoutre <fr***************@caramail.com> wrote: > 3. I am not very attracted to PSP because I want to separate the logic > from the presentation as completely as possible [...] In view of your project why not consider cherrypy as well? It may be an alternative to consider.
Hi Francois, I'm getting more open to considering other frameworks. As I
mentioned earlier, I am aware that I am swimming against the current by
not simply using Apache 1 and PHP, so I wanted to avoid investing in yet
another esoteric piece of software. Thankfully, after a discussion with
some prospective hosts today, I have the freedom to consider CherryPy
and Django. > manipulation, database calls, and some very minor mathematics. If the > Apache 1.3 series mod works fine, can I relieve myself of some stress > and go with that combo?
Why not? But why not work with apache 2.x. mod_python works fine on this platform.
Oh, it's not that I have anything against Apache 2. My preference is to
work with mod_python 3, and that requires Apache 2, which I want. I was
just considering a less desirable pythonic option. Even among commodity
shared hosting providers I've found the presence of earlier versions of
python and mod_python.
no FUD here. Read the mod_python carefully, run your tests and make up your choice. This is definitely a workable environment.
Francois
Thanks Francois. I am going to stick with Python for this. As it turns
out, I'll have the freedom to use the software configuration I want, so
now I don't have to worry about committing to Python, only discover that
my Python code is useable only as a prototype for PHP or Perl. :)
Anthony
In article <ma**************************************@python.o rg>, jj*@pobox.com (John J. Lee) wrote: "Ben Sizer" <ky*****@gmail.com> writes: [...] It as not easy to work with the CGI-style code in a WYSIWYG web editor as it is to edit a template, which is probably the main reason for their use. Also, coding everything with req.write() means that each [...]
You seem to believe CGI is incompatible with templating. Why? The two are entirely independent of each other.
John
He was just referring to the idea of me perhaps editing the HTML markup
in my Python code using an IDE like Dreamweaver and having a difficult
time. I agree, editing an HTML doc in a WYSIWYG environment would be
easier than me fishing through my req.write() calls and my strings to
find my markup - which is what I am doing at the moment.
Anthony This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim |
last post by:
....just starting to work with mod_python. There are a number of details and
pitfalls: any suggestions on where to get some decent tips and tricks. I can
comprehend the provided docs but...they are...
|
by: Rolfe |
last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow
these instructions verbatim and you shouldn't have any trouble. These
instructions are based on...
|
by: wolf |
last post by:
i would like to briefly share my experiences with
installing mod_python on a w2000 box. i must say that i
believe the installation process to be unnecessarily
complicated by the simple fact that...
|
by: Nancy |
last post by:
Hi,
I follow the Mod_python manual and try to let my form.py to handle
html form. The form.html and form.py are copied from
http://www.modpython.org/live/current/doc-html/tut-pub.html,
after I...
|
by: flab ba |
last post by:
Hello:
I am new to web app programming, but need to create a web app. I would
like to do it in Python
After extensive googling, reading news groups, blogs, and outdated /
incomplete "web app...
|
by: David Bear |
last post by:
I will be running zope, and I would also like to run mod_python. The problem
arised when zope wants a threaded version of python and mod_python wants
no_threads.
I've been searching the...
|
by: Robert J. Hansen |
last post by:
I'm not entirely certain comp.lang.python is the proper newsgroup for
mod_python questions, but "comp.lang.python.web" doesn't seem to exist,
so... my apologies in advance if this is considered...
|
by: treelife |
last post by:
I'm getting and internal server error when | run the following
mod_python script. I am actually trying to run Django.
Script:
from mod_python import apache
def handler(req):...
|
by: yinglcs |
last post by:
Hi,
I am trying to setup Apache with Trac which uses mod_python. I get the
following error:
assert have_pysqlite 0
And I have verify this via command line as well, that seem no
problem....
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |