Recent

Author Topic: How to convert a desktop app into a web app?  (Read 5724 times)

trev

  • Sr. Member
  • ****
  • Posts: 258
  • Former Delphi 7 and Delphi 10.2 User
Re: How to convert a desktop app into a web app?
« Reply #15 on: August 12, 2019, 05:05:28 am »
It's been 20 odd years since I last used Delphi 5 and webbroker (required Delphi Pro version), but it was fairly trivial at the time to convert my various tax calculator programs to run as ISAPI DLLs under the IIS webserver.

I'm not sure Lazarus has anything equivalent...

(The calculators were originally distributed in DynaText ebooks on CDROM, but the company moved to also using the DynaWeb webserver for DynaText ebooks, hence the need for both desktop and web calculators.)
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Thaddy

  • Hero Member
  • *****
  • Posts: 9293
Re: How to convert a desktop app into a web app?
« Reply #16 on: August 12, 2019, 09:04:44 am »
Well, ISAPI can be done in Freepascal too, although not with components, but based on classes or procedural code.
You write: "fairly trivial" so I suppose the logic is already sufficiently separated from the user interface?
In that case there are many more modern libraries/web techniques available too.

Ludo Schmal has a good introduction how to do it in Freepascal here: https://www.gocher.me/ISAPI with examples how to use the ISAPI extensions. (in German)

TMS has a good (commercial) library built on top of the pastojs transpiler with good UI web components for Lazarus and Pas2js can already be used with many JavaScript web UI libraries.
In a company setting I would recommend the above: the cost is fairly low and it is a reputable company with usually high quality code..
https://www.tmssoftware.com/site/tmswebcoreintro.asp You can ask for the Lazarus version (I believe they are working on it)
They are also often on this forum.
« Last Edit: August 12, 2019, 09:13:54 am by Thaddy »
also related to equus asinus.

trev

  • Sr. Member
  • ****
  • Posts: 258
  • Former Delphi 7 and Delphi 10.2 User
Re: How to convert a desktop app into a web app?
« Reply #17 on: August 13, 2019, 02:11:25 am »
Well, ISAPI can be done in Freepascal too, although not with components, but based on classes or procedural code.
You write: "fairly trivial" so I suppose the logic is already sufficiently separated from the user interface?

Yes, the logic was well separated from the UI, in part due to my having previously written an SGML publishing system for print, CD and web for the editorial department on a Sun SPARCstation 5 running the CERN webserver for the front-end UI, Bourne shell scripts for the logic and RCS for the CMS.

Quote
In that case there are many more modern libraries/web techniques available too.

Ludo Schmal has a good introduction how to do it in Freepascal here: https://www.gocher.me/ISAPI with examples how to use the ISAPI extensions. (in German)

TMS has a good (commercial) library built on top of the pastojs transpiler with good UI web components for Lazarus and Pas2js can already be used with many JavaScript web UI libraries.

Very interesting, and useful information for those contemplating desktop-web convergent programs. However, these days I'm just a simple hobbyist having retired from being a lawyer/author/programmer $working$ for commercial and not-for-profit  legal publishing entities.
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)