[wxPython-users] Concept: wx Templates?

Gre7g Luterman hafeliel at yahoo.com
Tue Jul 10 21:42:22 PDT 2007


--- Josiah Carlson <jcarlson at uci.edu> wrote:

> One thing that you may want to consider is that
> using a web interface as
> the "view" isn't all that pleasant.  You get to deal
> with the pain of
> writing the AJAX interface (if you want it to be as
> reactive as the
> wxPython), dealing with session information (whether
> embedded fully in
> the client, or hosted on the server), and having to
> remember to update
> *two* views when you update.

Absolutely true, but I'm not sure if by "online" he
meant "using a web browser as a UI".

If you did, then I would suggest making the web
browser your only UI, so you don't have to struggle to
keep two different UIs looking and working the same. 
When running in the offline mode, just make your
program drive a localhost socket on port 80 so you can
surf the backend locally.  For the online mode, run
the same backend code on a server.

That way you have only one program doing one thing and
you don't have to worry about making a change in two
places at once.  Of course, that solution doesn't use
wxPython, so it's probably not what you wanted.

For a wxPython solution, consider writing a single GUI
interface that talks to some data objects.  Be very
careful to completely isolate the data objects.  When
running in the offline mode, connect up to a set of
traditional data objects that handle pulling in
whatever information is needed from local files.  When
in the online mode, instead connect up to some
xmlrpclib objects.  You will have to write a server to
serve up those xmlrpclib objects, but if you plan it
out carefully enough, you can use the same objects
from the offline version except rerolled into a server
daemon.

That's what I would do, but YMMV!

Gre7g

> 
> When the webkit is finished, you may want to offer
> your "offline"
> interface as basically just an embedded web server
> with browser.  At
> least then you only need to write one server and one
> client.
> 
> 
>  - Josiah
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail:
> wxPython-users-help at lists.wxwidgets.org
> 
> 



       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  




More information about the wxpython-users mailing list