[Lazarus] New component - Delphi Form to HTML Converter (F2H) component

Michael Schnell mschnell at lumino.de
Mon Feb 28 11:50:35 CET 2011


On 02/28/2011 11:09 AM, Felipe Monteiro de Carvalho wrote:
> In my idea
> there would be a new widgetset in Lazarus, called for example "web"
> and it would implement converting the LCL object structure to HTML.
> There would be no GUI code, because it would be completely separted
> from other widgetsets, like gtk.
>   
While IMHO this would be very good to have, this seems like a huge work
to do.

1) Creating and dynamically modifying the  GUI in the browser:

The Widget type design is: at designtime  streaming the visual
"published" properties of the Forms and their objects into a resource
and on runtime create them when appropriate. As the design is done using
a standard GUI, the "standard" properties will be stored. At runtime,
the "remote browser GUI widget Type" component would need to create in
the browser a look and work alike as the originally designed GUI. IMOH
this only is possible using Java script (such as EXTJS).

To do this, I feel that appropriate identifiers (type-, instance- , and
property- numbers) would need to be assigned to all objects, to allow
for a decently formalized communication between the pascal and the JS code.

Of course modifying visual properties after creation of an object would
work in the same way.


2) GUI-events:

I don't think that using the standard HTML components' "events" would be
useful. Some java script code would need to notify the pascal code of
the user's input.



3) Non-GUI events:

Of course timers, inter-process events (e.g. TThread.Synchronize) etc
would need to be working. As those traditionally are implemented in the
GUI-handling code, here a GUI-free implementation needs to be done from
scratch.


4) Asynchronous Events toward the GUI.

Of course e.g. Timer- and other main-thread-events need to be able to
modify the GUI in the browser. I suppose this is the hardest part, as
HTTP does not allow for this direction of communication. So some kind of
"advanced polling" needs to be implemented (e.g. based on "Comet"
technology, that I was informed to have some caveats).

-Michael




More information about the Lazarus mailing list