Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'removes': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'stored': 0.12; 'wrote': 0.14; '(either': 0.16; 'ah,': 0.16; 'detects': 0.16; 'inclined': 0.16; 'inserting': 0.16; 'itself,': 0.16; 'optional': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'selects': 0.16; 'skip:n 70': 0.16; 'stored.': 0.16; 'subject:GUI': 0.16; 'subject:library': 0.16; 'syntactic': 0.16; 'timeout': 0.16; 'with?': 0.16; 'wrote:': 0.18; 'resend': 0.19; 'server,': 0.19; 'entered': 0.20; 'memory': 0.22; 'saying': 0.22; 'sends': 0.24; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'record': 0.27; 'feature': 0.29; 'away.': 0.31; 'object.': 0.31; 'allows': 0.31; 'fri,': 0.33; "can't": 0.35; 'case,': 0.35; 'but': 0.35; 'there': 0.35; '14,': 0.36; 'seconds': 0.37; 'being': 0.38; 'server': 0.38; 'ajax': 0.38; 'checks': 0.38; 'form,': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'logs': 0.60; 'transaction.': 0.60; 'gone': 0.61; 'issues,': 0.61; 'entire': 0.61; 'simply': 0.61; 'simple': 0.61; 'telling': 0.64; 'more': 0.64; 'response.': 0.68; 'frank': 0.68; 'confirmed,': 0.84; 'mean.': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Frank Millman" Subject: Re: Future standard GUI library Date: Fri, 14 Jun 2013 11:36:19 +0200 References: <20130522154233.fe5263cb231c375fc60c7c9b@gmx.net><20130523174145.22a6c46f586b0a1f656d2412@gmx.net><20130526194310.9cdb1be80b42c7fdf0ba502f@gmx.net><20130527172250.a8b0ce44f29398d63a4ec650@gmx.net><20130530184045.6d15530be70e18d96e5654ad@gmx.net><20130601201817.55d3361dda93dac387a9eab6@gmx.net><20130612222819.2a044e86ab4b6defe1939a04@gmx.net> X-Gmane-NNTP-Posting-Host: 197.87.30.6 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.4657 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371202588 news.xs4all.nl 15879 [2001:888:2000:d::a6]:52810 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48103 "Chris Angelico" wrote in message news:CAPTjJmq_m4y0UXXt3JqYThJj9CKbsvp+Z2PGF5v_31xLrgfr4Q@mail.gmail.com... > On Fri, Jun 14, 2013 at 3:39 PM, Frank Millman wrote: >> >> In my case, it is either-or. I do not just do field-by-field validation, >> I >> do field-by-field submission. The server builds up a record of the data >> entered while it is being entered. When the user selects 'Save', it does >> not >> resend the entire form, it simply sends a message to the server telling >> it >> to process the data it has already stored. > > Ah, I see what you mean. What I was actually saying was that it's > mandatory to check on the server, at time of form submission, and > optional to pre-check (either on the client itself, for simple > syntactic issues, or via AJAX or equivalent) for faster response. > > As a general rule, I would be inclined to go with a more classic > approach for reasons of atomicity. What happens if the user never gets > around to selecting Save? Does the server have a whole pile of data > that it can't do anything with? Do you garbage-collect that > eventually? The classic model allows you to hold off inserting > anything into the database until it's fully confirmed, and then do the > whole job in a single transaction. > The data is just stored in memory in a 'Session' object. I have a 'keep-alive' feature that checks if the client is alive, and removes the session with all its data if it detects that the client has gone away. Timeout is configurable, but I have it set to 30 seconds at the moment. The session is removed immediately if the user logs off. He is warned if there is unsaved data. Frank