ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zodb-dev
zodb-dev
Re: [ZODB-Dev] Pre-announce: Oscar 0.1
by Greg Ward other posts by this author
Sep 4 2001 6:58PM messages near this date
Re: [ZODB-Dev] Pre-announce: Oscar 0.1 | Re: [ZODB-Dev] Pre-announce: Oscar 0.1
On 02 September 2001, Christian Robottom Reis said:
>  Sure, but it's ready and implemented there, isn't it? Or do you suggest I
>  could use the same descriptive format for another tool I would right that
>  could use Grouch's parser?

Good point.  I was thinking from the point-of-view of Grouch's
implementor.  If all I wanted was something to validate user input, I
wouldn't have come up with Grouch.  Now that Grouch exists, though, you
might as well use it for something other than its original purpose.

>  How do you process and validate user input in your project?

Two words: typed widgets.

Philosophy: the UI should constrain the user as much as it can to make
sure they enter the right stuff.  The code that does that constraining
should be as close to the user as possible, in order to make error
reports as useful to the user as possible.  Since our application is a
web application, we have classes corresponding to all the major
"widgets" you can have in an HTML form.  We subclass those for
type-related constraints, eg. a string input box that requires integers.
Some widgets are inherently value-constrained -- eg. radio buttons and
select lists -- so our widget classes let you specify a constraint.
Others are inherently unconstrained (text areas, string entry, or string
entry that only accepts integers), and our widget classes leave them
as-is.

The particular implementation we use -- the Quixote Form Library -- will
be part of Quixote 0.4.  (Quixote is the web application development
tool we developed after abandoning Zope.)

I imagine you could cook up a similar toolkit for GUI development in
Python; the ideas from the Quixote Form Library are sound, and you are
welcome to steal them.  The implementation is highly web-centric,
though.  I would be surprised to learn nobody has already implemented
such a library, though.

        Greg
-- 
Greg Ward - software developer                gward@[...].org
MEMS Exchange                            http://www.mems-exchange.org
Thread:
Greg Ward
Chris McDonough
Jeremy Hylton
Christian Robottom Reis
Greg Ward
Christian Robottom Reis
Andrew Kuchling
Greg Ward
Christian Robottom Reis
Greg Ward
Christian Robottom Reis
Greg Ward
Christian Robottom Reis
Greg Ward
Michel Pelletier
Greg Ward
Christian Robottom Reis
Andrew Kuchling
Christian Robottom Reis
Christian Robottom Reis
Chris McDonough

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved