On Friday 04 March 2011 12:30:13 James Morris wrote:
Just a quick question, where does validation of
parameters belong?
Invalid params might crash the engine, so some validation should go there.
But if the job of validation is down to the UI, the engine can be more
efficient.
The engine doesn't have to do the validation in the realtime-processing
thread. Just check for the limits where the values enter the engine. This can
easily done when using functions to set the values and thus hiding the
internal queues (to get the new values to the realtime-engine without blocking
either side).
But if multiple UIs are possible, validation effort is
duplicated.
Well, checking the limits once to many doesn't crash the engine. Not checking
the limits might...
Have fun,
Arnold