Web Development In… Pascal?

If you were asked to make an e-commerce website in 2025, what language would you reach for? Show of hands: JavaScript? Go? Pascal? Well, there was at least one taker for that last one: [jns], and he has an hour-long tutorial video showing you how he made it happen. 

The site in question is the web store for his personal business, Photronic Arts, so you cannot say [jns] does not have skin in the game. From the front end, this is HTML and could be anything upto and including Shopify under the hood. It’s not, though: it’s a wholly custom backend [jns] put together in FreePascal, using the Lazarus IDE.

There’s a case to be made for Pascal in the modern day, but when we wrote that we weren’t expecting to get tips about web development.  Ironically enough [jns] spends so much time giving the technical details in this video he doesn’t delve that deeply into why he chose FreePascal, especially when it’s clear he’s very familiar with C and C++. In his associated writeup on his Gopher page (link though Floodgap) [jns] simply declares it’s a language he’s quite fond of, which is reason enough of us. The source code is available, though on request, to avoid AI scraping. It’s a sad but understandable response to these modern times.

If you’re not into web development and want to see a deep-dive into how the backend works, this video is worth watching even if you don’t particularly care for Pascal. It’s also worth watching if you do know backend development, and are Pascal-curious. If neither of those things interest you, what about this Pascal Library for Arduino?

Thanks to [jns] for the tip! If you’re doing modern work with questionably-modern tools, we call that a hack and would love to hear from you.

 

24 thoughts on “Web Development In… Pascal?

      1. PLC structured text is arguably a Pascal variant, and very much alive.

        More like a Modula-2 or Ada variant. Since those were bona-fide Pascal successors, the fact that their derivatives Structured Text, VHDL and so on are still in use says little more about Pascal than it does about Pascal’s predecessors ALGOL-W and ALGOL-60.

    1. There’s noting wrong with hacking in a dead language. If someone has server time to burn and trains an LLM to spit out runes in Old Gothic, or hieroglyphs in Egyptian, we might report on that if we got a tipoff. Plus, languages don’t have to stay dead.

      The expected reaction here isn’t “wow we should all switch to pascal for backend work” but “Huh, FreePascal has tools for that? Neat!”

    2. I do actually get so tired when someone says Pascal is dead.

      It is by no means dead, actually there is a large and active community around FreePascal and Lazarus, and programs can be compiled to nearly all platforms.

      I myself are making web development in FreePascal, based on the Pascal Server Pages, later known as Powtils by L505 – I am using a subset of version 1.6 with my own additions.
      On top of that I have made a large framework, so nearly all HTML can easily be build from FreePascal.

      In contrast til PHP it is compiled to binary CGIs, is extremely fast, and very secure.

      I have used it for building a booking system, a system for digital signage, reporting system for waste and many other things.

      I will claim that my productivity is probably 5-10 times higher than if I had to fight with at type weak programming language, and not have the help of the extremely good FreePascal compiler.

    1. Here in Germany, I think, Turbo Pascal 6/7 and Borland Pascal 7 were still popular throughout the 90s.
      Not on 8088 PCs, but 286-586 PCs with Super VGA graphics, CD-ROM drive and soundcards.

      The many BGI drivers really helped to make Turbo Pascal programs run fine on any system.
      Thanks to the Turbo Vision environment, many professional looking applications had been written at the time.

      On Windows, Turbo Pascal for Windows 1.0/1.5 and Borland Pascal 7 Windows allowed easy development.
      There even was a WinCRT unit that allowed porting DOS text-mode applications to Windows.
      TPW and BPW were the pre-runners to Delphi 1.0 in many ways.
      Delphi 1.0 still supported the old OWL, besides the new VCL.

      But yeah, I understand, many oldtimers had used Turbo Pascal 3 in mid-80s for uni. On an old dino PC..
      It’s the classic version that would create tiny COM files on DOS an CP/M systems.

      The later Turbo Pascal 4 with Turbo Grafx add-on was a totally different beast, though.
      It could create EXE files for writing complex applications.
      It was when Turbo Pascal got more user friendly and more flexible.

  1. It’s not a dead language – indeed lazarus is what all the schools and unis should be using to teach programming.

    Why did he use it instead of c++? I find I tend to use lazarus for gui things, as there hasn’t been a useful integrated gui/ide for c++ on the market since Builder c++ version 6 (all later versions suck). In fact, I’ve written back ends in rust or c++, and front ends that talk to them in lazarus, quite a bit recently..

    1. It’s not a dead language … should be using

      Speaking as somebody who still used Pascal on account of the unparalleled Lazarus IDE, that sort of statement does nobody any favours.

  2. Another nice thing, that apparently [jns] isn’t aware of, is that you don’t need to write the frontend in javascript: you can write it in pascal, using the same Lazarus IDE, and pas2js will transpile it to javascript.
    There’s a menu option in Lazarus to install/update pas2js, so that’s really easy.

  3. On the bright side we can keep extending the P in LAMP… PHP, Python, now Pascal ;) ..

    Big soft spot in my heart for Pascal, I once wrote a Pascal compiler for a class. That experience ( and lots of assembly ) really helped me understand whats going on behind the code. That said, the C family made up most of the rest of my dev years.

    But I love seeing all the recent attention on Pascal :)

  4. Cool!

    Turbo Pascal came out when I was in college. It was great because I could program at home and then ‘upload’ to the VAX for school projects. And of course Pascal is really a nice language to work with. Way more intuitive than say Rust is today. Went on to use it and other Borland/Inprise products at work. It was an easy transition to C after working with Pascal too as we used ‘C’/assembly for the real-time side of the company. I still write code in FreePascal today (on Linux of course). I also kick around Ultibo as well for older RPIs.

    Come to think of it, the industry goal should be to develop languages that are ‘easier’ to use … not harder. At least Python fits that bill today.

  5. I haven’t looked at how he did it yet but I am thinking one can still code a website in any language they want without any major hack can’t they? Just throw the path to the interpreter in the hash bang and use it as a cgi script. Right?

Leave a Reply to lucaCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.