[Lazarus] GUI development for web UI
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Wed Nov 24 14:43:29 CET 2010
On Wed, 24 Nov 2010, Lee Jenkins wrote:
> On 11/24/2010 4:21 AM, 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.
>>
>> 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.
>>
>
> I started a framework like that in question, actually had a decent working
> prototype that used Adob Flex as the front end. The problem is as you
> explained in that there is a tremendous amount of traffic for all of that
> user I/O that must be tracked for every click, etc.
>
> My customer got spooked when Apple decided not support Flash and later
> disallowing non-native apps (since retracted?) and we opted for a different
> direction using lazarus/fpc on the server providing a remote data Model and
> left it up to the client (in this case HTML5) to create and implement its own
> Controller and View. In our case, we created the client web app with dojo.
> This was a much better solution in the end.
My view exactly. But using ExtJS in my case. But that is irrelevant :)
The main point now is to generate
- HTML/CSS from the form definition.
- JavaScript from the pascal event code.
So I can continue to code in Lazarus/FPC.
Michael.
More information about the Lazarus
mailing list