[Tutor] web software applictions

Alan Gauld alan.gauld at btinternet.com
Fri Jun 7 20:48:12 CEST 2013


On 07/06/13 16:25, Matthew Ngaha wrote:
> ... A web app is simply a web page, their is no program or UI.

That's not true. The program is there but its running on the web server 
not on the user's PC. The UI is defined using HTML which is generated by 
the web program as its output. This is one reason that traditional web 
apps are inherently slow and clunky compared to desktop apps - they have 
to send both the data and the UI in every transaction payload whereas a 
desktop app only needs the data.

Modern web technologies address that issue with tools like Ajax, JSON 
and JQuery which allow the UI code to be sent once and then other action 
on a page to just send data and the browser updates the UI
with the changes.

> applications on the web similar to gui toolkits, for instance a
> graphical web calculator with ui specific widgets like buttons etc.

You can actually write a calculator program in pure HTML/Javascript
and it will work without a web server. But...

> can the usual python web frameworks design this?

The usual web frameworks can indeed deliver a calculator or any other 
kind of web app. All web apps consist of a web page presenting the UI 
and a set of response functions/methods that react to user input. Each 
function returns either a new web page or an update to the existing one.

> tool in Python i can use that comes with GUI widgets etc that can
> create these graphical web applications.

It depends how sophisticated you want the widgets to be. The basic form 
widgets - text boxes, radio buttons, scroll bars, list boxes, buttons 
etc are all just HTML. If you want fancier widgets then you have to 
design the look yourself and present them as images and then manually 
code up the event handling which is equivalent to creating your own GUI 
widget on the desktop - but there are fewer widgets to start with in 
HTML. For things like drag n drop you need to use Javascript/Jquery type 
code.

Finally you can create Java applets and embed them in your HTML page but 
for several reasons this has gone out of favour. And with HTML5 bringing 
lots more features for building apps there is even less need for Java in 
the browser. (Unfortunately HTML5 is not completely supported in the 
popular browsers yet)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list