Where to begin?
Published on Thursday 14 April 2016. Tagged as General.
Definition of a blog. My motivation to start this blog. Basic rules to overcome the Website Obesity Crisis for your own pages.
What is a Blog?
Blog is short for Web Log.
"A blog is a frequently updated online personal journal or diary."
(Source: What Is a Blog? - Blog Basics)
"A diary (sometimes referred to as journal or notebook) is a record (originally in handwritten format) with discrete entries arranged by date reporting on what has happened over the course of a day or other period. A personal diary may include a person's experiences, and/or thoughts or feelings, including comment on current events outside the writer's direct experience."
(Source: Diary - Wikipedia )
So this is the start of my personal notes on the techniques I use when developing and modifying web applications and websites. I will publish them almost every day.
One of the reasons I started blogging is the current trend for websites to involve an huge amount of code, resulting in heavy pages loading very slowly, especially on mobile devices. The term 'Website Obesity Crisis' was cornered first in this incredibly funny but very true presentation by Maciej Cegłowski.
How to avoid this error and make pages that load as fast as possible? In my opinion, there are a number of basic rules to obey:
- Compute and assemble the page after it is modified and not every time when the page is requested. Static websites are the future! Wordpress will have to be abandoned. A good system is making a CMS that outputs static HTML files. In PHP, you can mix static parts in separate files with a minimum of PHP coding to assemble the page and yet allow for dynamic content and even user interaction. Since I have found no existing system in PHP that serves my needs, I'm building my own here in parallel with the blogging itself.
- Limit the number of HTTP requests. This involves combining all CSS in one external file or even consider embedding the CSS needed for basic display in a
- Did I mention 'no advertisements'? I hate advertisements, and they usually implement scripts running from another server which you cannot control. And they only add to the load.
Think of the difference in making an average car compared to making a Formula 1 car. To make performant web pages, in the end, every request and every byte counts.
Why the duck?
There's no specific deep reason. I simply like the iconic presence of this modest rubber bath accessory. I don't own a real one. I just like its icon.
Happily Reinventing the Wheel
I'll be developing my own tools instead of relying on what others made before me. There's a number of reasons for this.
- I want a system that renders pages as fast as possible. No existing tool can render pages as fast as I think it can and should be.
- And finally: I am astonished how few good articles I can find on the internet nowadays explaining techniques without the use of these out-of-the-box frameworks or toolkits.
If you are shocked: walk away. If you are intrigued: watch this space. You will be surprised how few lines of code are necessary to do amazing things - and render them fast.