[Lazarus] GUI development for web UI

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Nov 24 10:31:44 CET 2010

On Wed, 24 Nov 2010, ik wrote:

> On Wed, Nov 24, 2010 at 11:21, <michael.vancanneyt at wisa.be> wrote:
>> On Wed, 24 Nov 2010, ik wrote:
>>  Hello List,
>>> Well I know about the framework fur Javascript library in Lazarus, but I'm
>>> thinking in the past year or so, what will it take to design a gui
>>> application using Lazarus, and make it work like a web app that act the
>>> same
>>> as the desktop version, without any specific components for it.
>>> Then today I found the following link:
>>> http://blogs.gnome.org/alexl/2010/11/23/gtk3-vs-html5/ and it looks like
>>> someone made something like that on GTK3.
>>> The problem is that I do not have the time to do it myself (or I would
>>> have
>>> created at least the start for it), what will it take to create something
>>> like that for Lazarus that is not dependent on the widgets (it will not
>>> care
>>> if it's GTK, Qt, WinAPI etc..), and take also 3rd party components for it
>>> ?
>> You should first answer the question this man asks:
>> "Now, I want to know, Is this useful?"
>> The answer IMHO is: no.
>> Each and every GUI or user action/change/whatnot will result in a request
>> from the browser to the webserver (with corresponding result sent back), and
>> will cause a lot of traffic.
> I did not want to use it on the server side but on client side. The server
> side should be contacted only when there is a requirement and not for
> everything.

Unless they plan on translating the whole of GTK3 to Javascript, I don't see
how you can do that ? How to create a hover effect, tooltips, whatnot,
whenever the mouse moves ? What to do when a user clicks a button ?
All GUI/business logic - of necessity - would reside on the server ?

(unless I'm missing something fundamental, of course)

>> While this is fine and doable for small apps, it is not scalable at all. If
>> 100 users use your system, it will crash under the load (if not earlier).
>> More to the point would be the morfik approach:
>> - Design and code your app as you do now.
>> - Translate the lot to Javascript+HTML+CSS
>> Because then, the browser does all the GUI work, and only when necessary
>> (get
>> data from server or store data on server) does the server get a request.
>> I am building all blocks for the latter approach, but it is slow progress.
> Is that what the fpWeb will do at the end ?

fpweb will be used to do the server part, yes.


More information about the Lazarus mailing list