On the way to durable applications with PSKOV static site generator as an example
Hi, my name is Michael Kapelko. I have been developing software professionally for more than 10 years. I develop games and game development tools in my spare time.
This article describes my first durable application for desktop PCs: PSKOV static site generator.
A durable application is an application that functions without a single change on operating systems released in years 2010-2030. In other words, a durable application has backward compatibility of 10 years and has the stability to run for 10 years. Actually, PSKOV runs even under Windows 2000, so PSKOV has backward compatibility of 19 years.
Such an implementation gives PSKOV the following features:
- it can be copied without restrictions
- it can be hosted anywhere
- it can run locally
- it can operate without Internet
At the same time, each web browser application has a serious restriction called sandbox, a deceptive name for a cage. The cage prevents access to both local file system of users and almost any Internet resource without its owner's explicit permission (CORS). As a result, the application can only communicate with users either through the distinct server, or by offering files to download manually. Downloading files one by one or as an archive is inconvenient, that's why nowadays server oriented approach reigns the world. I'll touch problems of that approach in a moment.
To free PSKOV from the cage, LFSA was created, a tiny Python script that needs to be run manually while PSKOV is running. LFSA allows PSKOV to access the user’s local file system. Python was selected because Linux and macOS have Python installed by default, and users can easily install Python on Windows (even Windows 2000).
PSKOV has been successfully used to create the following small sites:
Now let's see why PSKOV was created as a durable application for web browsers.
Reason №1: collect and keep knowledge in an accessible form
I have been creating convenient game development tools for several years now. So far the collected knowledge was represented by native applications for desktop PCs, education articles for related technologies, and showcase videos. Such forms of the collected knowledge are basically dead:
- few would download an unknown application
- few would watch some videos
- even fewer would read some articles
In many ways, this death is due to inaccessibility: one has to make an unknown amount of effort to achieve an unknown result. Hardly anyone would have interest in this. A web browser application, potentially accessible anywhere, is a totally different deal: you only need to make a known effort, click a link, to achieve an unknown result. The history of conducting twitter revolutions proves that almost anyone can open a link and "like" the change of a "bloody regime".
Reason №2: rule by people
Nowadays any Internet activity is performed by the means of services that almost always belong to some company: messages, maps, search, music, source code, etc. Such power usurpation leads to shutdowns of services that their owning companies deem unprofitable. They usually do it without any consent with those users who brought life to these services in the first place.
Other times companies simply block competing browsers from accessing their service, as it was recently the case with the web version of Skype. Luckily there are people who don’t agree with such politics. Thanks to them, unlocking tools appear.
As for me, I deem such a way of handling things as inappropriate. However, savage business is not the only one to blame here; average users, every one of us is guilty, too. You may argue that users have no choice, that someone else (government, aliens, underline what you like) made this world unfair. Some people even blame government/aliens directly and believe that without them, life would be amazing. However, human history tells us a different story: "the state is not some enemy horde that occupied the society, but that which grows out of society and mirrors it".
Being part of the people, I decided to start with myself and use my power for the best: create applications that I need in such a way to make them usable and accessible to everyone everywhere. PSKOV is the first attempt, which already exceeded my expectations. Sure, PSKOV has limitations like LFSA and unencrypted HTTP; there's a lot to do to increase the accessibility of PSKOV, however, I'm ready to dare anyone: current PSKOV version will keep functioning for 10 years to come without any maintenance.
That's it for describing my first durable application for desktop PCs: PSKOV static site generator.