Experiences from developing a new website
This post is part of a series of posts where I share my experiences developing, testing, and debugging the new implementation of my website, including this blog and my home page. At the end of this post, you will find links to the other posts.
I've had a side project re-implementing this blog and my web pages for a while. In January 2021, I moved the blog and web pages to a Linode-hosted web platform implemented by myself using Flask. This has worked well, but I did not use much of what Flask offered, and I felt I worked against some of the principles and ideas of Flask (e.g. Blueprints and Views).
Since I wanted to implement most of the functionality myself, I could choose a minimalistic Python-based web platform. I decided to do the second attempt with web.py. Time constraints delayed the finalization of this work, and because of that, I spent more time testing, thinking about, and fine-tuning the functionality of the platform's new version. I also tried different approaches to debug the code in a similar environment to the one on which it will be installed. My site implementation will run on a Linode-hosted, up-to-date Debian Linux computer with the content in an SQL database. I also preferred to test the new implementation with updated content from the existing site. To achieve this, the content is still in a database compatible with the old site, and the new site has been tested using a copy of the live database from the old site. However, the database has evolved with some new tables and some minor modifications of the existing tables.
The requirements and decisions for this project can be summarised in these bullet points:
- The implementation will be done in Python using a minimalistic Python-based web platform.
- I prefer to use a fresh release of Python, preferably the very latest version.
- I did choose web.py as the minimalistic Python-based web platform, but I am always considering other options (currently FastAPI).
- The web pages served from the web applications should also be minimalistic (a light-weight site without tracking software or other bloatware).
- The website will be served by a Python WSGI HTTP Server behind an HTTP proxy server.
- The Python WSGI HTTP Server I have chooses is Gunicorn.
- The recommended HTTP proxy server for Gunicorn is NGINX (NGINX open source).
- The content of the web pages and the blog posts should be stored in an SQL database.
- I did choose MariaDB based on recommendations and the active online user community.
- The static content, including pictures, CSS, and JavaScript code, will be stored in the web server's file system and handled by the NGINX HTTP proxy server.
- The implemented platform will serve different types of websites.
- My main web application is a blog where I can post posts like this.
- I will also have an ordinary, more static home page with a few sub-pages.
- I will develop a few experimental (temporal) web applications for specific use cases or to just to experiment with web technologies.
- Some requirements are based on the fact that I am the only user modifying the content and the only user who should have access to the non-public content. This might be extended to a few more users later, but never more than 2–3 other users — typically family members.
- It should be possible to log in to the web applications for extra functionality, but user management can be done directly in the database (no need the provide a web interface for this).
- The content will be edited with MarsEdit, and as a consequence, I have to implement the Moveable Type API, but then, I do not have to implement any web-based editing interface for the web applications.
- The blog should provide a web feed (RSS) so readers can subscribe to this feed and be updated when new posts are available.
- The blog should be searchable by tags, years, and text, including a combination of these.
In a few posts, I will show how I have done most of this and share some of my experiences developing, testing, and debugging such a project. The following posts have so far been published and planned: