[Lazarus] What is the future of NoGUI widget set?

Michael Schnell mschnell at lumino.de
Wed Jan 26 13:19:50 CET 2011


On 01/26/2011 10:28 AM, Frank Church wrote:
>
> My main concern now is how the GUI part of an app can expose an 
> interface to data modules that do not require the data module to link 
> with  GUI libraries.

You should do the "Business Logic" as number of Classes. They provide 
properties and functions/procedures that the GUI part can access. some 
of the properties would be QbjectPascal "Events" (aka callbacks, usually 
named On.... so that the GUI part can be triggered by Business Logic 
messages.

If not required by the functionality (e.g. long winding calculations or 
waiting for external events), doing separate threads for the business 
logic should be avoided.

If Threads are necessary you need to communicate between the two parts 
accordingly using critical sections, Synchronized Events and (e.g.) 
Application.QueueAsyncCall.

-Michael




More information about the Lazarus mailing list