I use Minilang mostly to deal with incoming parameters from http requests. I would think that any
issues with reading those parameters would've been centrally and conveniently handled at the
"Webapp" engine. If not, they should.
Even reading uploaded temporary files can be pre-checked by the underlying
OFBiz engine.
Sanitizing of incoming parameters is a common design pattern meant to simplify codes further
downstream. It's like "Quality Control" (QC), making it easier for me to plug a harddisk into my
computer without first checking for exceptional circuitry in the harddisk that might feedback
harmful currents into my computer.
Also like how you can easily "assert" (assume) that I can read English, and not have to consider
the exceptional case that I might come from Mars. :) (Do they speak English?).
Jonathon
Ean Schuessler wrote:
On Monday 11 June 2007 11:54:25 pm Jonathon -- Improov wrote:
With Minilang, you don't. Just do some pre-checks of incoming data (for
CRUD operations). Often, checking incoming data in a consolidated "pre"
section can be neater than throwing it all into a "try" block.
You can certainly write pre-check intensive code without try/catch blocks in
most any language. The point with exceptions is that some things can't be
checked in advance (ie. IOException).
I think most/all CRUD operations are straightforward, and don't require
complex try-catch blocks.
That is an optimistic outlook. :-)