Perl blog software
Today the term website has almost been replaced by the word blog. Most are run by a programming language named PHP. Prior to that, blogs (the few that existed) were run by Perl or ASP (Windows). Does this affect your blogging?
Yes. Let's face it, all you want to do is upload your images, post an entry, answer comments and have your Facebook or Twitter link etc. You really don't care how the back end works, just as long as it does. Right? Course you do. But if that software behind your blog has tons of other stuff in that you don't need and/or will never usethen it is redundant for a blog. It is overkill to the extreme andslows your site down.
Just what exactly is a blog anyways?Bottom line, a blog is nothing more than a very simple message board with replies to individual messages. Smaller than forums, but larger than a personal diary. Everything else is bells and whistles (or froth and fiddledepending on how you look at it) made more difficult when run by website design/development software which weighs in at around 10 to 50+ MB, before you've even posted anything.
When I first thought about running a travel blog I looked at what is out there and couldn't believe what I found. WordPress was huge, MovableType even more so and Drupal in another galaxy. To add insult to injury all were extremely complicated and I was left with more questions than answers. It was quite disappointing to be honest.
Then I figured that if I can code trading/commodity websites and their custom built relational databases (no SQL or any other extra stuff had to load), advertising sites, e-commerce ones and the content management to support it all (without destroying the design and layout), then I could write my own blog software. First, though, I looked to see what was out there written in Perl, because I was used to that programming language.
Some early Perl blog software was named GreyMatter, I took a look to see what it was like and the thing was over bloated for what little it did. So another named Bloxsom was found, but it was a total messhalf their site didn't even work, so I wrote it off as a waste of space and began the work on my own package.
Having rejected MYSQL, a new method had to be sought. I looked at Google's Big Table and realized that I had already been doing something very similar for some years, so shrunk the idea to a small manageable size and set to. Now I just use a tiny flat-file database which relates to static files for entries and their comments. The same concept is used for drafts. Site pages are even simpler. This is termed: Flat Content Management Software (Flat CMS). You are looking at the result.
Why use Perl?Because it works, each time every timeand I have never received, from any webhost, a notice about problems with Perl Exploits. PHP on the other hand is a nightmare, I was getting emails several times a year about PHP exploits (they've finally given up telling us about them now, there are too many), because PHP is extremely vulnerable. Hosting services have to implement massive amounts of security to protect all the PHP run blogs they host.
As of January 2017, Perl is used by 0.4% of websites globally (nearest figure). the Version is Perl 5, which consists of about 20+ sub versions. When I updated my blog software a while back, I checked with a lot of web hosting companies and the oldest version on a host was Perl 5.002 (several), but nobody used it. Unless a bot finds some reference to a .pl or .cgi file that host will, more than likely, not be logged as Perl being used on their hosted websites. So, just in case I decided to share the blog engine, I made sure that it would work on the lowest common denominatorVersion 5.002. Being Perl, it will work on all webhosts running any version of Perl 5. My current web host runs Perl 5.10.1, as you can see everything works.
PHP versions are not exactly backwards compatible with themselves. Perl is. When it comes to huge amounts of data handling Perl excels. I have even seen some PHP sites which, to handle the data well, use Perl to serve it out (so why even bother with PHPjust HTML it).
Why don't more people use Perl then?That's a hard question to answer. I am not what could be termed a hard core programmer (more an artist than that), just someone who years ago, set out to help a client with a database. I think the main problem with Perl is, its almost spatial concept. If there is 1 way to do something there are 100 and it doesn't matter what order some stuff is in, older programmers couldn't handle that. They were, like myself, used to linear solutions (220.127.116.11 or a,b,c,d). Perl can be 1, m, 36, b9 or whatever and it will still run. If I had tried that in RPG or COBOL the program would break, A programmer I used to know couldn't handle Perl, it was too flexible for him and he would get lost in the code.
Perl has been termed a difficult programming language and people wanted something easyor did they? Back around the turn of the millennium, a bunch of programmers on the web decided to make programs and software extremely difficult in order that people would hire them to sort it all out. We see the conclusion of that in very large systems like WordPress or Drupal etc. In other words people, we've been ripped off.
You do not now, nor ever, need a system on the scale of WordPress (PHP) or MovableType (Perl)to run something as simple as a blog! The backlash has hit big time and not a few people are getting totally fed up with it all. To combat this mentality of bigger and more complicated is better, the Flat CMS is emerging in various formats and programming languages. But, the most dangerous is still PHP because of where it lives.
Is there an answer?Earlier I mentioned Flat CMS. I can hear the rants now, "But what about huge amounts of data? You need MYSQL for that." Rubbish! Google handles more data than you possibly imagine in your entire lifetime and does it very quickly ("scales to hundreds of petabytes automatically, and can smoothly handle millions of operations per second."). It's called Big Table and while I know only the basic concept, it works. So much so that I used the idea for my blog dataget the ID from the table and go to a file.
Perl has a lot of modules which can be used or loaded, but for the most part you end up calling this huge bit of code in and only use a tiny portion of it. More time wasted. Some guys use a template module, but for a blog it's way to big. What I have is just one simple template with one line. A blog has a homepage, the entry pages and maybe a few site pages (like an about or contact page). No html template is needed, everything is coded into the operations which spit it out.
How mine works
This could be applied to other programming languages besides Perl, but please, do not use PHP.
This is incredibly simple.
A main Flat-file database record:
20161121214218|The post title|CAT|cc|
The break down
The ID field points to the text file with all content of the blog post (20161121214218.txt) and it's comments file (20161121214218-c.txt), which is a flat-file database (FFDB) for all the comments, saves server space. A thing named a Query String (and its Parser) is used to denote that entry to the blog. The Category field pulls in another FFDB for it's info and also a file with a list of links within that category. So it is relational, but in a very small form and extremely fast. To make it even faster for my blog I have not broken down the dates with all kinds of code, but written them in for the formats used on the blog and xml filesa plain read is faster than redefining.
The result is a blog engine/CMS which can have site pages in addition to blog pages, mail outs for comments, several homepage settings and a whole bunch more. All in a base install of less than 160kas opposed to megabytes! It builds its own data structure without pulling in anything remotely like SQL.
All editing is handled by an HTML markdown editor so that there is consistency across browsers and is there to manage the contents onlynot to build a website (it weighs under 20kwith all the button images, JS code and Perl HTML). PlusI can use it on my smartphone, tablet, desktop or laptop.
For any programming languageThe Flat CMS does not depend on one language. I use Perl, you could use Python, Ruby or whatever as long as all the code resides in the CGI Bin where it is relatively safe. Having server-side code in the public-html area makes it vulnerable and is a security risk without very heavy, additional, measures to keep it safe (which slows stuff downdoesn't it).
The basics are easy. Read, write or delete files. Some HTML layout. Conditionals for various functions and the HTML pages themselves are not served out by hundreds of megabytes of extra invoked software. They have one line each, a Server-side include to a very tiny Perl script, that kicks in the whole thing and Apache with Perl (which are already running) does the rest. It provides for others, if I share it.
Is your blog package available?No. There are two aspects to this post. For you bloggers to realize what ii is you're dealing with when blogging.
For programmers, blogs and site development are two different thingsjust let them use a replacement theme and be done with it. Stop thinking bigger is better and head for something else that fits the bill for the average blogger without overloading them with a bunch of stuff they don't needwe're fed up with that.
There are a number of Flat CMS blogging packages around, but they are PHP. The Perl ones I've seen are pathetic and geared only to geeks, the same goes for Python. A lot of stuff is on a thing named GitHub. Unless you are some kind of strange, serious geek you will not make heads or tails of it so give it a wide berth. If a programmer cannot make available from their own website something they have written by clicking only one button to download it and almost the same to install the thing, then they've lost the plot.
Now, I want to get back on the road and not mess about with code for a long timeI have better things to do. So comments will be turned off shortly for this post.
Jan 21, 2017
Comments are now closed
for this entry