Recent

Author Topic: Is Pascal suitable for Web Development?  (Read 1787 times)

giahung1997

  • Full Member
  • ***
  • Posts: 113
Is Pascal suitable for Web Development?
« on: June 07, 2019, 10:05:16 am »
I mean backend only. I'm learning backend web development with Java now. I'm not yet learn any framework. Thing like listen to a port, programming sockets and connect to database. Is Pascal suitable? I see the trend now is languages that code as short as possible, Pascal is too wordy, as bad as Java, will it unproductive when using Pascal? Java has many frameworks that do-it-for-you, somehow mitigated this. Tks  :)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8888
  • FPC developer.
Re: Is Pascal suitable for Web Development?
« Reply #1 on: June 07, 2019, 10:14:16 am »
Yes, No.

440bx

  • Hero Member
  • *****
  • Posts: 2046
Re: Is Pascal suitable for Web Development?
« Reply #2 on: June 07, 2019, 10:47:11 am »
will it unproductive when using Pascal?
Unproductive is bugs as a result of a typing mistake such as "=" instead of "==" or "|" instead of "||"... and many of those.  Not only that is rather unproductive, it is a regrettable waste of time due to the outstanding built-in mediocrity of those more "succinct" languages.

It's much better to say it in 10 words and be right than to say it in 2 words and be wrong.  The latter is a very productive way of being unproductive.

FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 10568
Re: Is Pascal suitable for Web Development?
« Reply #3 on: June 07, 2019, 12:25:21 pm »
I have worked with a team of about 40 fte + 20+  testers on a website for 500.000+ customers that is fully written in Object Pascal, a tiny bit Java and Oracle (clustered) running on 40+ servers.
So, yes, and it even scales much better than some web oriented languages like PHP. https://www.alex.nl/
Many forum members know that.....
There are more examples....(e.g. coolblue.nl ) that are mostly written in Object Pascal.

These examples are not large scale, but huge scale.

Rainbow6

  • New Member
  • *
  • Posts: 18
Re: Is Pascal suitable for Web Development?
« Reply #4 on: June 07, 2019, 02:05:31 pm »
It's much better to say it in 10 words and be right than to say it in 2 words and be wrong.  The latter is a very productive way of being unproductive.

I couldn’t have said it any better.

And above this - Code it much more often read than written, so productive is, what’s good to read and understand. This is a question of philosophy - say “C-like vs. the rest of the world”.

howardpc

  • Hero Member
  • *****
  • Posts: 3579
Re: Is Pascal suitable for Web Development?
« Reply #5 on: June 07, 2019, 02:25:29 pm »
I see the trend now is languages that code as short as possible, Pascal is too wordy, as bad as Java, will it unproductive when using Pascal?
Pascal was not designed to be trendy. Its slight verbosity and type-safety-by-design are not cool by standards of trendiness.
However, what is "productivity"? If it is just the ability to write code as quickly as possible, then Pascal is less productive than some other languages (though a good IDE minimises these differences in lots of clever ways).

If you take readability and maintainability into account, however, Pascal quickly shines brightly, even though it is not perfect.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8279
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Is Pascal suitable for Web Development?
« Reply #6 on: June 09, 2019, 04:19:37 am »
Is Pascal suitable?
Yes
will it unproductive when using Pascal?
No, verbosity won't make you unproductive, at least not as much as:
- runtime typing errors (commonly happened with dynamically typed languages)
- buffer overflow errors (commonly happened with unsafe languages)
- unmaintainability due to unreadability of overly short code that's difficult to understand

The first two can be helped by both the compiler and runtime system of Pascal, with the latter removeable as you wish (i.e. when it passes all kind of tests that you have) for higher performance. Only the last one is up to your ability to write well written code.

Last but not least, when you count every single character, Pascal code often ends up more compact because a lot of functionality has been available as library entities. For instance, Process.RunCommandInDir is often translated to multiple method calls in other languages, some also enforces the use of threads/asynchronous call to handle reading the stdout, which is very error prone. This single function call gives you both stdout content and exit code in one call and even the internal implementation doesn't use threads/asynchronous call. Not just shorter, but also more lightweight.

Kristof

  • Newbie
  • Posts: 1
Re: Is Pascal suitable for Web Development?
« Reply #7 on: June 14, 2019, 01:14:58 pm »
I have worked with a team of about 40 fte + 20+  testers on a website for 500.000+ customers that is fully written in Object Pascal, a tiny bit Java and Oracle (clustered) running on 40+ servers. (...)
There are more examples....(e.g. coolblue.nl ) that are mostly written in Object Pascal.
These examples are not large scale, but huge scale.

Hi Thaddy, it is very interesting! Can you explain what technology was used: Delphi or Free Pascal?
And what kind of solution you recommend for small pascal backend: fcl-web/embedded server, fastcgi or mormot?

Thaddy

  • Hero Member
  • *****
  • Posts: 10568
Re: Is Pascal suitable for Web Development?
« Reply #8 on: June 14, 2019, 03:37:40 pm »
Delphi was used. We did not use any third party libraries, everything was developed in-house with a minimum of components used. Actually the back end and middle ware was completely without components, just classes and code-generators. Because the team is large and very talented, that gave us much, much better results. All have at least a b.sc in computer science.
« Last Edit: June 14, 2019, 03:56:04 pm by Thaddy »

 

TinyPortal © 2005-2018