Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2021-09

Freepascal for web

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Santiago A.

Not sure if this question should go for fpc-freepascal list or fpc-others list.

I'm starting a new project, a simple accounting system, with the data in a server in internet. It is an experimental pet project, just to try new technologies (new for me). Although it is just an experimental pet project, I want to use technologies that allow to scale in the web.

I don't want to do it in PHP (I got enough of it years ago), so I want to consider a more advanced language.
First, I thought about something with a python backend, but I've read that it doesn't scale well because it doesn't support multithreads.

I am almost decided to node.js in the backend and vue.js in the frontend. Node.js is what almost everybody uses and has a lot of libraries/modules and future. And vue.js looks powerful and simple with a nice learning curve.

But I'm not still happy. Why can't I use a native compiled program for the backend?, it should faster, and more robust that any script, dynamic, JIT language. Pascal for this is my first thought as it was my first love. I'm thinking about a freepascal backend  and vue.js frontend , or even a three-tier with json messages between frontend in vue.js and server.

Have you any experience in freepascal for web?
Any hints, suggestions or advice?

Saludos Santiago A.

Reply by email

Michael Van Canneyt
to Santiago A.
Santiago A. wrote 26 lines
Not sure if this question should go for fpc-freepascal list or fpc-others list. I'm starting a new project, a simple accounting system, with the data in a server in internet. It is an experimental pet project, just to try new technologies (new for me). Although it is just an experimental pet project, I want to use technologies that allow to scale in the web. I don't want to do it in PHP (I got enough of it years ago), so I want to consider a more advanced language. First, I thought about something with a python backend, but I've read that it doesn't scale well because it doesn't support multithreads. I am almost decided to node.js in the backend and vue.js in the frontend. Node.js is what almost everybody uses and has a lot of libraries/modules and future. And vue.js looks powerful and simple with a nice learning curve. But I'm not still happy. Why can't I use a native compiled program for the backend?, it should faster, and more robust that any script, dynamic, JIT language. Pascal for this is my first thought as it was my first love. I'm thinking about a freepascal backend  and vue.js frontend , or even a three-tier with json messages between frontend in vue.js and server. Have you any experience in freepascal for web?

I've been doing FPC back-ends for 12 years now.
This is not a problem, everything is available.

The question is: what do you need ?

FPC has RPC-JSON for RPC mechanisms. You have SQLDBRestbridge to create a REST backend on top of SQLDB. It can be used as-is, no code required for simple cases.

FCL-Web allows you to write a service as a standalone executable, fastcgi, cgi, apache module. You have advanced routing.

There is also the 'Brook' framework written on top of fcl-web. I'm not sure how well it is maintained.

And you can use pascal client-side as well.

Since 2 years I also do the front-end in pascal: pas2js allows you to write your client-side logic in pascal as well. I have several sites running like this for our clients. There is a series of components available.

If all goes well, we expect to have design-time functionality in the Lazarus IDE to create web-applications that render, design and run in the browser within a year (fingers crossed) - using the abovementioned components.

Michael.

Reply by email

Julius
to Santiago A.: Not sure if this question should go for fpc-freepascal list or fpc-others list. I'm…
Santiago A. wrote
But I'm not still happy. Why can't I use a native compiled program for the backend?, it should faster, and more robust that any script,

Personally I love pascal (also a first love) and Lazarus.

But you also might want to look into golang. It builds standalone executables, and is completely outfitted for web/internet.

--- ====== Julius PGP Fingerprint: EA2A 2496 18EA 7700 AE4E 0703 0699 ABF8 F5B7 1178 -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210926/141ae9a7/attachment.sig>

Reply by email