[Tutor] web intefaces?

Alan Gauld alan.gauld at btinternet.com
Sun May 7 01:12:34 CEST 2006


> what do you think that is the best software option to design
> web user intefaces with python?

That's a very broad question! A web UI is just HTML, normally
expressed using tables and forms. So you can use any HTML
editor to design the UI. And it is generally held to be a good
idea to separate the code from the UI as much as possible so
typically the UI resides in a separate file from the code and
the code simply reads it and displays it.(classic CGI style) or
the code is imported into the HTML by some mechanism
(ASP style)

> the web server should run in the machine of the user
> of the program.

But why you would want to do this rather than build a GUI
is somewhat mysterious. By doing so you limit the functionality
of your GUI to all the horrors of HTML and incur a significant
performance penalty as well as soaking up a lot of your users
machine resources (memory, CPU and IO!) You might also
introduce security holes, cause conflicts with their own local
web server, and run foul of firewall software.

Even if you can guarantee a foolproof installation and a big
powerful PC you still have to cope with the potential myriad
of browsers. What do you do if the default browser is lynx say?

The benefits are few and if you design your code and UI to
be cleanly separated then they are even fewer. Web applications
are very useful for allowing a wide body of users on many
platforms to remotely access your applicatiojn, but they are
rarely a good way to go on an individual PC - IMHO of course!.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 





More information about the Tutor mailing list