Recent

Author Topic: Web Applications with Pascal  (Read 3623 times)

zamronypj

  • Full Member
  • ***
  • Posts: 138
    • Fano Framework, Free Pascal web application framework
Re: Web Applications with Pascal
« Reply #15 on: May 12, 2024, 12:07:05 am »
it is true that pas2js can target node.js to create server side web application, but what is the point if FPC can create it directly? If you need to write server-side application in JS, you will mostly write that in JS.

If you look at pas2js demo, most of it are applications that runs on browser. that is pas2js is for

https://gitlab.com/freepascal.org/fpc/pas2js/-/tree/main/demo?ref_type=heads
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Apache module executes Pascal program like scripting language https://zamronypj.github.io/mod_pascal/
Github https://github.com/zamronypj

Leledumbo

  • Hero Member
  • *****
  • Posts: 8761
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Web Applications with Pascal
« Reply #16 on: May 14, 2024, 06:31:24 am »
it is true that pas2js can target node.js to create server side web application, but what is the point if FPC can create it directly? If you need to write server-side application in JS, you will mostly write that in JS.
The point of Pas2JS is NOT to write JS at all. Pas2JS can be considered as a separate Pascal dialect just like $mode directive, so when you work with Pas2JS for both backend and frontend you're working with a single dialect, which could be an attraction point for those who don't want to think in different POV everytime they switch side. At the very least, consider it an option for those who need it. I do prefer ObjFPC on the backend and Pas2JS on the frontend, but my preference doesn't have to be other people's.

Thaddy

  • Hero Member
  • *****
  • Posts: 14782
  • Censorship about opinions does not belong here.
Re: Web Applications with Pascal
« Reply #17 on: May 14, 2024, 09:24:51 am »
it is true that pas2js can target node.js to create server side web application, but what is the point if FPC can create it directly? If
Yes, that s true.
You can target it with pas2js cde only, no need to write JS, if necessary you can even write the js in an inline assembler block.
The earliest demo's that came available have examples for node.js. I use it both for KIOSK mode applications that can run locally or remote and plain GUI-less server modules.
[/quote]
The point is, you don't need js, you can write everything in object pascal. Serverside and clientside.
bitrate is always calculated like this:sample rate * bitdepth * number of channels.

zamronypj

  • Full Member
  • ***
  • Posts: 138
    • Fano Framework, Free Pascal web application framework
Re: Web Applications with Pascal
« Reply #18 on: May 15, 2024, 12:41:43 am »
on server side ObjectPascal -> Pas2Js -> JS is optional

on client-side (browser) ObjectPascal -> Pas2JS -> JS is neccesity
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Apache module executes Pascal program like scripting language https://zamronypj.github.io/mod_pascal/
Github https://github.com/zamronypj

 

TinyPortal © 2005-2018