Recent

Author Topic: Moving a desktop application to the web  (Read 6598 times)

egsuh

  • Hero Member
  • *****
  • Posts: 712
Re: Moving a desktop application to the web
« Reply #15 on: April 05, 2021, 03:30:39 am »
As trev told, I don't think moving to web is a daunting task. I myself haven't done a large project but first I built a small program with Delphi2, later moved it to client/server program, then web-service + windows application with Delph5, and now web server application + windows application accessing the web server + accesses of the web server from web browsers (HTML/CSS/JS) in Lazarus.

The core parts - what they say business logic - have not changed much and are portable. I had to redefine some functions/procedures so that key or ID variable is included as parameters of the functions/procedures as web connection is, as you know, stateless.

But if your application has many UI forms made with Delphi or Lazarus, I cannot say anything on changing them to HTML/CSS/Javascript. I thought VirtualUI would do that, which I tested successfully (but not using right now). I have written about 2,000 line javascript script, which relieved much of pascal work.

As I'm doing this myself, I welcome any newbies? :D to Lazarus/FPC web development world.
So based on my short humble (and basically based on trial and error) experience, I suggest following step 

  1) separate server-side work and client-side work first. Or separate purely logical modules and those which need form or visual control elements. Try to use interfaces to access procedure/functions, even though you can directly access procedures/functions in another module.
  2) Define the communication rules between server and client, considering HTML server. 
  3) Separate two programs - server and client, and try to connect from client to server using THTMLclient. You may use synapse, etc.
  4) Think of moving client-side forms to HTML/CSS/Javascript.



 

TinyPortal © 2005-2018