[Lazarus] creating a Lazarus package "NoGUIApplication"

Michael Schnell mschnell at lumino.de
Wed Mar 17 11:08:36 CET 2010


On 03/15/2010 04:24 PM, waldo kitty wrote:
> i'm very intrigued by your proposal and work on this... i'm very
> interested in it for a idea i've had for a long time but had no real
> pointer to how to accomplish it...
Same here. I have been discussing this issue in the fpc-develop mailing
list already years ago. In fact I feel that support for an
OS-independent event queue is better done in the RTL than in the LCL,
but as traditionally - since Delphi - the event queue is done in the
same units as the GUI basics, this would needs basic changes as well on
the FPC as on the Lazarus site. Something I'm not able to initialize and
manage. So I changed to this mailing list to discuss the issue.

I always did know how this could be done technically and in fact I do
have a working version. But right now I am trying to create a decently
integrated Lazarus package for the function.

> especially when it comes to this persistent interface with a web
> server...
Here NoGUIApplication is only a basic tool to create a "persistent" CGI
application.

The communication with the web server (via a byte stream - pipe or
TCP/IP) is defined by the Apache people. AFAIK, most major web servers
support this, as well, but many "small" web servers don't.

On top of the AJAX/Comet specification define the way the web client
polls for updates of the web page the user watches. This is done by the
CHI hanging the HTTP request until an update is necessary or a HTTP
timeout is due. On the client site this usually is done by a standard
Java script package. (See the topic "New version of WebDesign available"
in this mailing list).
> why limit your NoGUIApplication, by name or otherwise, to linux only?
> what would it have to do differently on other OS'??
On a Windows box a GUI API is available, anyway, so you can use a
standard application do do a persistent CGI or any other daemon /
service alike GUI-less programs just by ignoring the GUI. So a
dedicated  NoGUIApplication is not necessary. Of course it can quite
easily be done if the Linux version is in place.

I learned that there are reasons to keep the pure "nogui" name in place,
even though I think "dummy"  would be more appropriate, as it only
provides hooks for the compiler, but no function. Can you suggest a
different name ?

-Michael




More information about the Lazarus mailing list