[ZODB-Dev] ZEO for GUI applications
robert at gravina.com
Thu Mar 29 16:55:16 EDT 2007
On Mar 30, 2007, at 5:24 AM, Rodrigo Senra wrote:
> [ Robert Gravina ]:
> |short version:
> |Is anyone using ZEO to build mutliuser networked applications outside
> |of Zope?
> Well, I have developed a trivial in-house desktop-based
> employee activity control (Argh!) a couple of years ago.
> It started as a ZODB+wxPython standalone exercise, and changing
> one line the application (from FileStorage to ClientStorage) ;o)
> ... and adding ZEO ... it became a client/server desktop apps.
It always amazes me that in ZEO you can do that. When I'm coding apps
for users to manage some kind of shared data, that's the kind of
level I like programming at. Why is it with other frameworks I have
to jump through hoops to do something which, to me, seems like every
multi-user networked application is going to need?
> It impressed some folks down here and it was in production use
> until it was finally replaced for a Web version integrated to
> our Zope/Plone portal.
Yeah everyone wants to go web these days. I don't understand how
users put up with web pages trying to be GUI forms when they could
just have a proper GUI :) Anyway I'm getting off topic...
> Having said that, I believe that is not the list to discuss it.
> |longer version:
> |I've been designing and coding (and re-designing and re-coding) a
> |multi-user GUI application in Python for some time now. At this
> |stage, it's mainily just GUI forms for editing data and some logic to
> |share objects with users, keep them from editing the same entry at
> |the same time etc. I'm currently using Twisted and a a python object-
> |reational DB called Axiom, built on top of sqllite.
> I did a curious experiment during a cross-language event that took
> place in Sao Paulo/Brazil. Several guys presented their favorite
> programming languages and frameworks: Java-something, Rails, PHP-
> and Python (me). While the Java presentation was taking place, I have
> coded (on the fly) the same example presented there.
> As an introduction to my talk (last in the day) I presented to the
> my crude ZODB+Twisted version, that had the strengths of all
> and yet was much smaller and coded by a mediocre developer while
> by a Java-something talk ;o)
:) I actually was using ZODB+Twisted before I used Axiom+Twisted, but
without ZEO it really doesn't matter what DB I use.
It's a shame to have wasted all this time I've spent on the Twisted
version, when really I should have written a small ZEO test
application to see if my ideas would work out. I think this weekend I
will do just that, and think about if I should spend the time
"porting" my app to ZEO. There are so many ways I can think of this
cutting down on the code I write - e.g. GUI forms for editing the
main types of objects in the app could start a transaction when they
are created, allow the user to modify the attributes as they see fit,
and commit when Save is clicked, or rollback if there was a
validation error. Currently there is so much code in my app for a
simple update like this - first I make deep copies of objects so
users don't edit the original versions, then if it validates OK I
send to the server where it copies attributes accross and updates
lists etc. etc. then notifies clients that the object has changed.
It's not that I am lazy, I just don't trust the code I write to do
all this and keep clients in sync, even with tests. It's a hard
problem to solve.
> The full history is here , even though in Portuguese, the Python
> is Universally readable.
>  http://article.gmane.org/gmane.comp.python.brasil/21504/
> That is precisely what I did in the first example I have mentioned,
> and it worked just fine. But I had a very controlled environment (our
> tiny little company) and very savy user base (all Python developers).
> If your application have many more reads than writes you will be
> fine. In case you want to discuss this in PVT, feel free to
> email me.
Yes, my application definitely will have more reads than writes.
i think I'll spend some time trying to get the current incarnation of
the app going with ZEO over the weekend and see how I go.
> Rodrigo Senra
> GPr Sistemas
> For more information about ZODB, see the ZODB Wiki:
> ZODB-Dev mailing list - ZODB-Dev at zope.org
More information about the ZODB-Dev