[LAD] engine, validation, ui separation,
d at drobilla.net
Fri Mar 4 19:15:25 UTC 2011
On Fri, 2011-03-04 at 11:53 +0000, James Morris wrote:
> On 4 March 2011 11:33, Paul Davis <paul at linuxaudiosystems.com> wrote:
> > On Fri, Mar 4, 2011 at 6:30 AM, James Morris <jwm.art.net at gmail.com> wrote:
> >> But if multiple UIs are possible, validation effort is duplicated.
> > duplication never hurt anyone, much. especially since each instance
> > might differ in the view of what the limits are.
> What about if the engine depends on the limits to be properly set in
> order for it to function correctly?
Make your plugin robust. Plugins should not crash no matter what the
host throws at them.
In theory, yes, we could define a bunch of strict rules and such to
remove this burden from plugin authors, but in practise that road leads
to flaky software.
> I suppose the obvious answer is to put this validation in the set and
> get methods of the engine.
> I just wondered if someone could define a case where it would be in
> the set/get methods of engine, and another case where it should be in
> the UI.
The reason to do it in the "UI" (actually host) is performance.
<insert famous quote about premature optimization here>
More information about the Linux-audio-dev