Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm working on a project where multiple (several hundred perhaps) users will need to run an application remotely. We thought that running a web app would be the best course of action to go. (Note: when I say web app I mean a program where a user can type in a URL that will then allow the user to run the application we're working on remotely without any installations or limited installations to the browser they're using)

My problem is not knowing where to start in creating a web app. The way that I see it (and correct me if I'm wrong), there are two types of web apps out there. A Rich Internet Application which:

has many of the characteristics of desktop application software, typically delivered either by way of a site-specific browser, via a browser plug-in, independent sandboxes, extensive use of Javascript, or virtual machines.

wiki

or a 'regular' web app similar to gmail. I'm very familiar with Python and desktop GUI development using wxPython. Is it possible to write a program in Python, and then run it as a webapp?

If so, How?

share|improve this question
    
You cant port desktop guis to a web application and "regular web app" and "RIA" are the same thing. gmails is a RIA –  Raynos Sep 20 '11 at 18:06
add comment

5 Answers

up vote 5 down vote accepted

... there are two types of web apps out there. A Rich Internet Application and a regular Web App similar to Gmail ...

Sorry but that's wrong! Web Application and Rich Internet Application are one and the same thing.

Make it simple...

  • A Website is a set of pages (static or dynamic) and is fairly simple to build and maintain.
  • A more complex and feature rich manifestation of the same website which includes technologies/paradigms/practices that evolved in the last 5 years is what they call a Web Application.

    • Technologies: JavaScript, REST, Social Web, APIs, improved standards, NoSQL, Clouds, etc.
    • Paradigms: Ajax, perceived responsiveness, UX, mashups, etc.
    • Practices: accessibility, multiple devices, etc.

So, Gmail is NOT the regular thing, it is one of THE most successful Web Applications (or RIA if you will).

Next, to answer you original question...

Creating a Desktop-cum-Web application is a non-trivial task. Of course it can be done. Look at gTalk -- it's both Desktop and Web App.

You need to identify the common and disparate components of your system and then architecture it accordingly. You may need a complex MVC setup also. You'll also have to carefully plan your deployment and maintenance strategy. More importantly you'll need an upgrade mechanism that works for both Desktop and Web versions of your App.

I am not trying to scare you off -- but realize that what you want is NOT simple.

Now if you don't have any idea where to start for the Web App part, then (in my humble opinion), you should first master Python Web Application programming and then approach this thing. As you already do GUI apps, it won't be long before you'll start feeling confident about this system and you'll have all the knowledge and context to answer this question yourself.

share|improve this answer
1  
-1: it is a good answer, but the inappropriate language is not necessary. –  Morgan Herlocker Sep 20 '11 at 19:37
3  
@ironcode I edited the post to remove the sentence I think you objected to. Don't forget that you can always edit the post to correct its wording, especially if it's inappropriate. –  Anna Lear Sep 20 '11 at 19:43
add comment

The only case I know of where you can write something as if you are writing a desktop app and have it also be able to run as either a desktop or web app is when using Pyjamas. From their web site:

"Pyjamas is a Rich Internet Application (RIA) Development Platform for both Web and Desktop...It contains a Python-to-Javascript compiler, an AJAX framework and a Widget Set API."

However, I don't know how far along and usable the project is yet. It's a great idea in any case.

There are some cases in which people have made a desktop app that is meant to be used through the web. One is Dabo Springboard. The idea is you would have your users install the "client" once, and then all interactions, updates, data handling, etc, would be done via the internet. So you get the advantages of a web app with the GUI advantages of a desktop app. Plus, for your purposes, Dabo is a wrapper for wxPython.

share|improve this answer
add comment

Start learning Django, a web framework which is Python-based. It still requires a web-server to run on, but you may be able to re-use some of the code. You probably won't be able to re-use any existing wxPython GUI code, that will have to be translated into HTML/CSS.

share|improve this answer
add comment

If you are working with Python and need to do something on the web, then Django Framework is the first thing you should get to know. It will get you speed up into the process of developing an Internet application.

From there on, you build on any web service you like to have on your server. As far the UI is concerned, you will work with HTML. Javascripts, flash, AJAX are supplementary for achieving an interactive and responsive API.

You can visit Django Tutorial to start and see how things work on the web using Python and HTML.

share|improve this answer
add comment

If you are willing to develop web applications as if you were developing desktop applications, I would recommend:

  • for the Java world: Vaadin
  • for the Python world: muntjac (which is Vaadin actually, but converted to Python)

I have a shell script which installs muntjac and creates a skeleton for a simple web application in one go. Simply follow these steps:

  1. create a separate folder

    $ mkdir hello

  2. dowload install_muntjac.sh and run it inside the folder you've just created

    $ cd hello
    $ /path/to/shell/script/install_muntjac.sh

    note: when you run the shell script, it uncompresses two .zip files and some files will be overwritten. That's OK, no worries. Simply respond A, meaning (A)ll when it asks about overwritting files.

  3. run the web application

    $ python portal.py
    Serving on 0.0.0.0:8080

  4. open the web application in your browser
    server: localhost, port: 8080, context: /portal

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.