473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to create "cross-backend" python web app

Hi all-

I'm trying to port an ajax spell-checker
(http://www.broken-notebook.com/spell_checker/index.php) to use with
the moin moin wiki and have been somewhat successful. (By successful I
mean I can spell check using the php backend and my python port running
as cgi-bin).

My question is this: moinmoin runs on many python web backends
(cgi-bin/mod-python/twisted/standalone). My spell-checker backend runs
as cgi (disclaimer: I've done a bit of php and java(struts) web app
programming, but the last python related web programming I did was Zope
about 5 years ago (does that even count ? ;) )) because that was the
easiest for me to get up to speed on. What is the best way to write
cross-backend python web apps? Is there any abstraction I can use?
With cgi-bin, I use the python "cgi" module, which gives me easy access
to form variables, but I'd like to be able to deploy in the other
backends as well. What's the best way to do this? Or is a rewrite
required for each one?

thanks

matt

Jul 21 '05 #1
2 2266
"matt" <ma*************@gmail.com> wrote in message news:<11*********************@g43g2000cwa.googlegr oups.com>...
Hi all-

I'm trying to port an ajax spell-checker
(http://www.broken-notebook.com/spell_checker/index.php) to use with
the moin moin wiki and have been somewhat successful. (By successful I
mean I can spell check using the php backend and my python port running
as cgi-bin).
That looks like an interesting application/component.
My question is this: moinmoin runs on many python web backends
(cgi-bin/mod-python/twisted/standalone). My spell-checker backend runs
as cgi (disclaimer: I've done a bit of php and java(struts) web app
programming, but the last python related web programming I did was Zope
about 5 years ago (does that even count ? ;) )) because that was the
easiest for me to get up to speed on. What is the best way to write
cross-backend python web apps? Is there any abstraction I can use?
Although a kind of Web "middleware" standard called WSGI [1] has been
proposed to somehow alleviate these kinds of problems, I'd recommend
using WebStack [2] to implement a "cross-backend" solution which will
run on CGI, mod_python, Twisted, BaseHTTPServer and other
technologies.
With cgi-bin, I use the python "cgi" module, which gives me easy access
to form variables, but I'd like to be able to deploy in the other
backends as well. What's the best way to do this? Or is a rewrite
required for each one?


Some might argue that writing directly to WSGI would allow you to
re-use your CGI-based code moderately easily whilst having some
backend portability. I'd argue that WebStack's API is slightly more
high-level and that the WebStack distribution should provide you with
everything you need to deploy your application on the backends you've
chosen (plus others). Either way, you certainly don't need to rewrite
your application for every different environment any more.

Paul

[1] http://www.python.org/peps/pep-0333.html
[2] http://www.python.org/pypi/WebStack
Jul 21 '05 #2
Thanks Paul-

I'll look into WebStack.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Walter Quirtmair | last post by:
Hello, I have a C# WinForms Application that contains various "old" ActiveX-Controls. Due to some unknown reasons recently the "red cross" - problems appears quite often. Without any know...
4
by: J Fisk | last post by:
Hi, I've been banging my head on the wall over this for about two days now so any thoughts are much appreciated. I have a static .svg file with embedded onclick="open()"'s all over. The svg...
8
by: Pieter | last post by:
Hi, I'm having some weird problem using the BackGroundWorker in an Outlook (2003) Add-In, with VB.NET 2005: I'm using the BackGroundWorker to get the info of some mailitems, and after each item...
4
by: Mau Kae Horng | last post by:
Hello, I have a C# Windows Forms application for machine. Due to some unknown reasons, the application face problems with unexpected exceptions happening, resulting in two red lines forming a...
3
by: Pieter Coucke | last post by:
Hi, In my VB.NET 2005 application I'm generating and sending emails using the outlook-object model (2003). When a mail is Send (MailObject_Send), I raise an event in a global class, that is...
11
by: taoberly | last post by:
A few months ago I posted a question about using a file on my hard drive to perform cross-frame scripting and pull data from a server on my company's intranet. I eventually got this working using...
1
by: Luis Freitas | last post by:
I have a table with the following Fields: Article and 8 fields that are Dates. Under each date is a quantity. I would like to run a query that would have only 3 columns: Article, Date and...
0
by: Peter Duniho | last post by:
Okay, I'm guessing I'm overlooking something simple here, but I'm obviously not going to find it. Someone please tell me the exact name of the "Cross-thread operation not valid" MDA, as seen in...
11
by: Ahmedhussain | last post by:
hey everyone... I have a code which gives me this error. Error : Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on. I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.