How to implement a combo Web and Desktop app in python.

Dieter Maurer dieter at handshake.de
Fri Sep 14 02:34:33 EDT 2012


Shawn McElroy <luckysmack at gmail.com> writes:

> ...
> So I need to find a way I can implement this in the best way...

It is in general very difficult to say reliable things about the "best" way.
Because, that depends very much on details.

My former employer has created a combo destop/online application
based on "Zope". "Zope" is a web application framework, platform independent,
easily installable, with an integrated HTTP server. It is one of
the natural choices as a basis for a Python implemented web application.
To get a desktop application, application and Zope was installed
on the client system and a standard browser used for the ui.

The main drawback of this scheme came from the limitations of
the browser implemented ui. It has been very difficult to implement
"deep integration" with the desktop (e.g. "drap & drop" in and out of
the application; integration with the various other applications
(Outlook, Word, ...)) and to provide "gimicks" provided by the
surrounding environment. Thus, after 8 years, the application started
to look old style and the browser based ui was replaced by a stand alone
desktop application that talked via webservices with an online
system (if necessary).

Thus, *if* the ui requirements are fairly low (i.e. can fairly easily
be implemented via a browser) you could go a similar route. If your
ui requirements are high, you can replace the browser by a self
developped (thick) ui application that talks via an
abstraction with its backend. Properly designed, the abstraction
could either be implemented by direct calls (to
a local library) or by webservice calls (to an online service).
This way, you could use your client application both for the (local)
desktop only case as well as for the online case.


Your description (stripped) suggests that you need special support
for "offline" usage. The is separate functionality, independent of
the desktop/online question. For example, highly available distributed database
systems must provide some synchronization mechanism for resynchronization
after temporary network connectivity loss. Another example:
transactional systems must not lose transactions and
can for example use asnychronous message queues to ensure that
messages are safely delivered even in the case of temporary
communication problems or failures.

Thus, look at these aspects independent from the desktop/online
szenario -- these aspects affect any distributed system
and solutions can be found there. Those solutions tend to be
complex (and expensive).




More information about the Python-list mailing list