Learning To Code By Building CMSs

Learning To Code By Building CMSs

It’s easy to use Facebook or other CMS every day without thinking about how the code works. This summer I have coded two CMS using Linkedin Learning. One of these CMS was running with PHP and MySQL and the other was running with Ruby On Rails and MySQL.


In the process I learned how to install MySQL, how to get MySQL and PHP to talk to each other. How to organise files between private and public folders on a web server and more. Getting MySQL to talk with the web server was a challenge that took a few days to get right.

With the PHP CMS I learned about arrays, about interacting between PHP and MySQL and I learned to be attentive to using the correct syntax. Sometimes though, a single typo would block my progress for a period of time. It wasn’t rare for me to compare the code I wrote with the code written by the instructor line by line to find my typos.

I could have cut and pasted the code but I found that simply typing the code character by character was enough to force me to read the code carefully. When I made typos it taught me to attentive to details as well as to be more aware of the syntax.

Ruby On Rails

Ruby on Rails was an interesting learning challenge. I got stuck before I even finished setting up the project. As a result of this I went back and followed a course on essential Ruby. This worked as a nice complement to what I learned from that point on.

During the project configuration process I got stuck because I created the project with the wrong database connection type. I left it on the default and when I tried to correct this I failed, and failed, and failed again. Eventually I decided to delete the application and create a new one, with the right database connection and this time it worked well.

The challenges I faced were that the Puma Server wouldn’t start because a gem was missing, that the CMS wouldn’t start because of a mistake in the routing file and more. Eventually I would restart the server but I spent a lot of time debugging.

One of the most persistant problems I had with Ruby on Rails is that it’s hundreds of lines of code across multiple files and although the error messages are obvious you need to learn to read them. For two or three days I couldn’t find what the error was, despite looking through every page and its code. Eventually I found that I had written “visible” and forgotten a “:visible”. That error crashed the Puma server consistently.

With Ruby On Rails, I learned to work within a framework. This knowledge is transferrable to working with other frameworks. I’ve gone from knowing how to install and use a CMS like WordPress, Joomla, and Drupal to learning how to create one and to understand how arrays and functions work. I have also learned how to think about security and how to use blowfish and other encryption technology to keep passwords etc. more secure.

With Ruby Gems I could work on projects of my own and be less reliant on other websites. One project I would like to work on is creating a heatmap of all my walking activities and the easiest way to do this would be to find some code and adapt it to have the functionality I desire.

The Next Step

The next step is to learn to use JavaScript. I will then know how to use HTML/PHP for content, CSS for layout and finally JS for interactivity.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.