[Lazarus] creating a Lazarus package "NoGUIApplication"

Michael Schnell mschnell at lumino.de
Mon Mar 15 13:18:53 CET 2010


On 03/15/2010 12:31 PM, Joost van der Sluis wrote:
>
> It works perfectly. You can use it to compile any fcl-web application
> against. So that there are no dependencies on external gui-libraries
> (like gtk, qt etc)
>   

OK. "Works" here obviously means that it helps the application to be
compiled, but it does not provide much functionality to the Application.
Especially (other than the other 8 Widget Types) it does not implement
an event queue (or attach to one provided by the OS). That is why a
TTimer will not be usable.

The NoGUI Widget Type does allow for "fcl-web" applications, that are
normal CGI program. I.e. started by the web server and is provided with
information by same via environment variables, a web page is only
transferred to the web server when the cgi program closes.

The NoGUI Widget Type does not allow for "persistent" CGI applications.
I.e. the cgi program keeps running and is provided by the web server
with informations via a pipe or TCP/IP connection. It send a web page to
the web server via a pipe or the TCP/IP connection appropriately. (Not
all web servers allow for this method; Apache does.

To do a decent "persistent" CGI applications you need to use timers,
TCP/IP, threads etc: all this stuff creates asynchronous events that
need to fire application "events" in the main thread, which keeps on
waiting for such events independently of the CGI activity, On top of
this, on the Web Client site there are methods (provided by Java script
applets) that allow for monitoring the activity of such a program using
a kind of polling on a kept-open HTTP connection. This is based on AJAX
and is called Comet.

While doing a  "persistent CGI program" is one application for an
event-queue enabled NoGUI Application (that avoids any dependencies on
external gui-libraries) my target is embedded devices which don't
provide any hardware that could enable a GUI.

That is why I am planning to enhance it (supposedly calling the result
"Linux-NOGUI" Widget Type)

-Michael




More information about the Lazarus mailing list