[Lazarus] Quick Video: A Web Application

Michael Van Canneyt michael at freepascal.org
Wed Nov 8 16:39:41 CET 2017

On Wed, 8 Nov 2017, Michael Schnell via Lazarus wrote:

> On 08.11.2017 13:12, Michael Van Canneyt via Lazarus wrote:
>> ExtPascal way (or UniGUI for that matter) is the wrong way to do 
>> things. Interesting as a toy, but not suitable for
>> a) Large, scalable websites
>> b) serveless applications.
> Agreed ! But if doing a server based application (ore one that includes 
> the web-server) that mainly does unattended, "embedded" work,  and tghe 
> GUI is only used for configuration and monitoring, such a 
> toy-functionality might be useful, nonetheless.

Maybe, but since we're aiming for the more general case, 
this 'toy' is an avenue we're going to skip...

> From the view of the application programmer, doing a Rich Internet 
> Application with pas2js is a similar endeavor as Microsoft intended by 
> Silverlight (which has been canceled some time ago) : Design an 
> application and define "bridging points" that "somehow" shift the 
> execution between server and browser.
> With Silverlight, both parts would be compiled to CIL byte code and run 
> an a CIL (aka .NET) framework, with fpc, the server part would be 
> compiled to a native executable while the Browser part would be compiled 
> to JS (or maybe later to WebAssembly).
> The user source code would not necessarily need to contain much more 
> than appropriate definitions of the bridging points (supposedly some 
> kind of inter-class interface), and the Lazarus infrastructure would 
> take care of the communication.

I think you're better off coding it as a real client/server application,
which is what it actually is.

Trying to hide that aspect is IMO futile and will in the long run lead 
to problems anyway.

I spent too much time fighting such frameworks, and believe that you should
embrace the platforms you're using. That means: browser as client, webserver as
server, and HTTP or websocket as the transport layer.


More information about the Lazarus mailing list