[reportlab-users] Philosophy on validation
Andy Robinson
andy at reportlab.com
Fri May 5 13:14:31 EDT 2006
>>At the moment, we determine table width by looking at the longest row in
>>the input data. I'll also add an OPTION to accept 'ragged edge' data,
>>so you can set your tables to work that way if you wish.
This might be worth a thread.
Our position generally is to be as strict as we can about input.
Usually we're building apps which slurp in data from all over the place,
and it's better to flag up content problems early to the developers or
calling systems. In the corporate world the data is ALWAYS a problem;
the best we can do is tell the calling system that it's their problem,
not ours!
If we were 'relaxed' about input, we'd end up with more situations where
it all runs, but the wrong output ends up on somebody's bank statement
one day, or a chart is missing a series - unnoticed!
The clearest expression of this philosophy is the graphics classes,
which will complain immediately "on setting" if you set an inappropriate
colour value, rather than silently failing to display your colour later
on. But "ReportLab 3000" (don't ask for a date) will hopefully take
this further and have very clear specification of what all the published
objects are, their allowed values and constructors.
The open source "API" is not a simple one where we can examine all
input, and there are always back doors around it. In RML, we can be
much more anal about rejecting bad input because it all arrives in a file.
So, our defaults will generally be strict, but I am always happy to have
options to relax things.
Have a good weekend everyone,
Andy
More information about the reportlab-users
mailing list