Fwd: Re: [Web-SIG] Client-side support: what are we aiming for?
moof at metamoof.net
Fri Oct 24 10:50:36 EDT 2003
David Fraser wrote:
> Actually HTML parsing would be fantastic for testing web
applications, > so maybe that could be related to the Web API.
Actually, that is a very important point. Many python programmers are
fans of Test-driven development. I'm currently developing an app with
Webware and Cheetah, and find it very difficult to write tests for a lot
of the stuff I do. This is mostly due to a huge amount of background
work I need to do to set up an emulation environment first (make sure my
request and session objects work correctly as far as I need them to for
my testing, replacing the Page write and writeln methods, and so on) and
even then, verifying a whole generated page is a pain.
So a standard HTML parser would be nice, as well as keeping TDD in mind
when we design request and response (and possibly session) objects.
> The parsing doesn't have to be very intelligent or do validation,
HTML > syntax is fairly simple.
> I think that does belong in the standard library.
Speaking of validation, a sort of standard form validation library would
be nice: something to say "I'm expecting this value to be an int between
1-31" or "I'm expecting this to be a string with the following legal
characters" and so on. It's not that difficult to write yourself, but I
seem to find myself reinventing the wheel every time I do. A standard
"best practice" way of doing this would be wonderful.
Giles Antonio Radford, a.k.a Moof
Sympathy, eupathy, and, currently, apathy coming to you at:
More information about the Web-SIG