Re: [LAD] engine, validation, ui separation,

From: David Robillard <d@email-addr-hidden>
Date: Fri Mar 04 2011 - 21:15:25 EET

On Fri, 2011-03-04 at 11:53 +0000, James Morris wrote:
> On 4 March 2011 11:33, Paul Davis <paul@email-addr-hidden> wrote:
> > On Fri, Mar 4, 2011 at 6:30 AM, James Morris <jwm.art.net@email-addr-hidden> 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>

-dr

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Mar 5 00:15:04 2011

This archive was generated by hypermail 2.1.8 : Sat Mar 05 2011 - 00:15:04 EET