[Lazarus] GUI development for web UI

Dariusz Mazur darekm at emadar.com
Wed Nov 24 18:22:46 CET 2010


>
>
> On Wed, 24 Nov 2010, Dariusz Mazur wrote:
>
>> W dniu 2010-11-24 10:21, michael.vancanneyt at wisa.be pisze:
>>>
>>>
>>> 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.
>>>
>>> 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).
>>
>> That's not true. Transfer every action to server is very simple task, 
>> and computing results also. Thus (on my web app) it took less than 
>> 10ms and every user very rare generate more actions than 1 per 
>> second.  Computing and sending pdf reports took much more (more than 
>> 90% of working time). As I observe two on core machine can work 100 
>> users concurent without problem. With more can be problem, but  with 
>> memory.
>
> Yes, I remember my discussion with you. I also remember that the round 
> trip time I observed is over 100 ms, which is noticeable. (maybe not 
> on intranet, but definitely on internet)

You told about scalability.
10ms is on server, on user side You should add transfer as ping (but 
this not load server)

>
> Secondly, you have not very demanding users and/or GUI, it seems :-)
Of course this is not game application, but on every ERP application 
(like my)  are places with rather sophisticated GUI.

> I'll describe an interface which I currently have: A grid with about 
> 600 checkboxes (don't ask why, they want it so).  Users click the 
> checkboxes in rapid succession, thus generating much more than 1 event 
> per second.

I have forms with similar widgets too. Second: faster than clicks is 
keyboard.  But even that: its no problem when response arrive after next 
click. If response is under 300ms users thinks : "that is at now"




>
> But if you believe in it: why not cooperate with the Lazarus team and
> create a web widget set ? All options must be explored, you obviously 
> have a good basis for it, so why not share it 

I try to share my work  (without this hope I simply not write this post) 
but nobody is interesting.
link: http://www.emadar.com/fpc/xwebdemo.zip



-- 
   Darek








More information about the Lazarus mailing list