I built my first Python project, ‘Guestbook’, which uses Common Gateway Interface (CGI) and is a throwback to the web of yesterday (“Web 1.0“). Check it out on GitHub and let me know what you think. Perhaps you can help with some of the outstanding issues!
When I first started using the Internet, guestbooks were popular. I’d be able to go to a website like Lissa Explains (which serves as the inspiration for this project) and leave a message with my name and a comment to the author of the website. It was a way of messaging people before you had your Facebooks and your Twitters.
For me, it was my first understanding that people all over the world could converge at the same place at the same time, to talk to each other.
Common Gateway Interface (CGI) was what these original guestbooks were powered on. CGI was introduced in 1993 and kickstarted the move from websites just displaying static HTML to being able to run scripts on your web server and displaying the results on your website.
I worked on this on and off over the last week. Some days it was smooth sailing, other days I spent eight hours debugging absolute nonsense. I learnt more about the process of building something and had a lot of fun doing so. It’s not as good as it could be, there are a few things I want to do with it that I can’t wrap my head around just yet, but it’s something I can definitely come back to.
Something I learnt more about was the temptation and reliance on frameworks to do our bidding. I specifically chose not to use something like Django for this project as not only is it so-totally-not-web-1.0, I also wanted to understand how useful frameworks were in the first place and I concluded that they were very useful. But in this instance (I do love Django), I conclude with annoyance.
I encountered a lot of problems when making this script, partly due to lack of experience but also because of how things exist on the web these days (people don’t seem to really use cgi anymore). When searching for solutions, a lot of people told me to just port it to a framework like Flask, webpy or Django. That was very frustrating.
Yet I do understand, because I can’t expect someone to sit me down and explain the nitty gritty details of my project on their own dime and it’s easier to just tell me to go for an easy solution. I imagine (and may as well go and try it) that building this guestbook using Django would have been much easier, but I probably wouldn’t have learnt as much as I did.