A little Levure-oriented question

Trevor DeVore lists at mangomultimedia.com
Tue Feb 20 18:43:42 EST 2018


On Tue, Feb 20, 2018 at 5:15 PM, Graham Samuel via use-livecode <
use-livecode at lists.runrev.com> wrote:

> I’m following the Levure discussion and of course Trevor's pronouncements
> with great interest. One thing strikes me - is there really a universally
> understood meaning to the term “UI stack”? I do understand the concept of
> separating the UI from the logic of an app, but any UI must contain
> **some** logic, mustn’t it? In the LC world, by ‘logic’ of course I really
> mean code. What level of coding is permissible to allow in a UI stack, do
> people think? I have a feeling that some folks’ idea of this is going to be
> very different from some others’. Perhaps there is an orthodoxy about this,
> but I am not familiar with it.
>

In Levure a UI stack is just a stack that is used as a window to display a
user interface to the user. In LiveCode the term stack is overloaded. It
can be a library, a front script, a back script, or a stack that is
actually displays to the user. Actually it can be both a stack that
displays an interface to the user and a library/frontscript/backscript). So
Levure encourages you to organize your stacks based on how they are used.
In Levure a UI stack will be added to the list of stackFiles property of
the main Levure app stack. This allows you to reference the stack by name
(e.g. stack “MyStack”) without having to load all of the UI stacks into
memory when the application starts up.

My general rule is that I place all code that is specific to a specific UI
stack in the behaviors attached to the stack, cards, and controls of that
stack. Any code that is shared is pushed down into a library.

The controls in my stacks have very little code. They simply call handlers
that reside in the card or stack behaviors.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list