This repository has been archived on 2020-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
hugo-blog/content/posts/leopold.md

159 lines
7.4 KiB
Markdown
Raw Normal View History

2020-02-18 17:25:18 +00:00
+++
2020-02-16 20:27:51 +00:00
draft = false
2020-02-09 19:04:45 +00:00
date = 2020-02-01T18:54:46Z
title = "Marc Leopold Photography"
2020-02-18 17:22:37 +00:00
description = "Developing a portfolio website using October CMS and Vue.js."
2020-02-19 21:12:41 +00:00
tags = ["October CMS", "Vue", "CMS"]
2020-02-09 19:04:45 +00:00
categories = ["Portfolio"]
2020-02-09 20:01:45 +00:00
featured_image = "/images/leopold/large-1.jpg"
2020-02-18 17:17:53 +00:00
series = ["Portfolio"]
2020-02-09 19:04:45 +00:00
+++
2020-02-09 20:01:45 +00:00
**Marc Leopold** is an apocryphal photographer and visual artist based in Chicago, USA.
2020-02-18 18:39:30 +00:00
He recently decided his previous (and rather imaginary) website, whose purpose was to showcase his work, was beginning to look dated.
He decided that it was time for a modern, up to date portfolio site.
2020-02-12 14:46:57 +00:00
Being a photographer's portfolio site, the requirements are fairly basic.
Aside from the portfolio items, we just need some brief background information and an outline of the services provided along with a contact form.
2020-02-09 20:01:45 +00:00
## The Front End
2020-02-14 20:08:53 +00:00
{{<
figure
2020-02-14 20:34:27 +00:00
src="/images/logos/vue.svg"
alt="The Vue logo."
class="icon-inline icon-right sm-order-rev svg"
caption="For the front end of this project, I went with [Vue.js](https:/etcvuejs.org) &mdash; a fast, modern JavaScript framework used to create web interfaces."
2020-02-14 20:08:53 +00:00
>}}
2020-02-12 14:46:57 +00:00
2020-02-18 18:39:30 +00:00
The site's content will mainly consist of examples of Marc's portfolio Photography.
These are organised into a number of galleries.
The main task of a visitor will be browsing and viewing these images.
I feel that using a **Single Page Application** will give a nice user experience whilst browsing and viewing the images.
2020-02-12 14:46:57 +00:00
2020-02-18 18:39:30 +00:00
The images will be dynamically loaded when required.
There will be no need for full page reloads.
We only need to update the required on-screen images.
2020-02-12 14:46:57 +00:00
Instead, we can dynamically update page components to create a fast, responsive site.
2020-02-09 20:01:45 +00:00
## The Back End
2020-02-14 20:34:27 +00:00
{{<
figure
src="/images/logos/october-icon.png"
alt="The October Content Management System's icon."
class="icon-inline sm-order-rev"
caption="For the backend I decided to use [October](https://octobercms.com/), a Content Management System, based on the [Laravel](https://laravel.com/) framework, which is a popular, open source, PHP based framework."
>}}
2020-02-09 20:01:45 +00:00
2020-02-18 18:39:30 +00:00
The major requirements of a backend for this type of project is to store and organise images.
2020-02-12 14:46:57 +00:00
2020-02-09 20:01:45 +00:00
It would be possible to create a fully bespoke image based CMS to handle these requirements.
However, this would involve a considerable amount of work and a lot of considerations, such as security best practices, browser compatibility, testing of code, etc.
2020-02-12 14:46:57 +00:00
Fortunately, there are already a number of actively developed libraries and frameworks available that have already solved these issues:
* they have the advantage of being tried and tested with real world use by many users,
* using one of these shortens development time considerably,
* we are able to build upon and extend functionality rather than reimplementing these features from scratch.
2020-02-09 20:01:45 +00:00
So for a relatively basic CMS, in which there are no particularly special requirements, it makes perfect sense to make use of a pre-existing platform.
2020-02-12 14:46:57 +00:00
In this case, I chose **October** for a number for reasons.
2020-02-14 22:28:49 +00:00
{{<
figure
class="cheat-october-list"
src=""
alt="TODO - do properly with shortcode"
>}}
2020-02-12 14:46:57 +00:00
* **Performant**
October isn't bloated with unneeded functionality.
It instead provides a base in which features and functionality may be added if required.
2020-02-18 18:39:30 +00:00
This makes it faster than some alternatives, such as WordPress for example, which can suffer from having a large amount of features included as a base.
2020-02-14 21:12:34 +00:00
It also has useful default features such as minification of CSS and JavaScript. The templating engine, Twig, generates static HTML, giving the speed benefits of a static site, without database lookups.
2020-02-12 14:46:57 +00:00
2020-02-14 14:54:09 +00:00
* **Developer Oriented**
2020-02-12 14:46:57 +00:00
October is targeted towards developers.
2020-02-18 18:39:30 +00:00
High quality documentation and a clean and modern codebase makes it easy to extend and add functionality.
Plugins are entirely separate - they have their own database and namespaces preventing conflicts between them.
2020-02-12 14:46:57 +00:00
The templating system and text file based website structure allows for separation of data and presentation and gives easy version control management.
* **Community**
There is a large developer community.
2020-02-18 18:39:30 +00:00
This means a large number of plugins and themes provided by the community.
Not as many as WordPress but many of the WordPress plugins can be considered to be poor quality, particularly among the free ones.
2020-02-12 14:46:57 +00:00
It can also be difficult to extend WordPress plugins.
* **Secure**
Relatively secure when compared to alternatives like WordPress.
2020-02-18 18:39:30 +00:00
There is a single point of entry into the application, with only one file that can ever be accessed, `index.php`, reducing the potential attack area.
2020-02-12 14:46:57 +00:00
There is also more rigorous approval process for plugins and themes, that with some alternative platforms.
2020-02-14 22:42:19 +00:00
Each one must undergo a strict verification progress.
2020-02-12 14:46:57 +00:00
* **Customisation**
It is simple and straight forward to customise the administrative interface.
This is very useful for a site that will involve a lot of users with the ability to manage their accounts and decreases development time substantially.
2020-02-18 18:39:30 +00:00
So, these reasons are why, in this case, I consider a platform like October to be better for building a backend CMS than, for example, WordPress.
It is easier to customise and add the required functionality without the inherent bloat of some alternatives.
2020-02-12 14:46:57 +00:00
2020-02-18 18:39:30 +00:00
Having said that, it may sound like WordPress just isn't very good.
Not when compared to something like October.
This, however, I don't feel to be true.
2020-02-14 14:54:09 +00:00
2020-02-14 21:02:43 +00:00
{{<
figure
src="/images/logos/wp-logo.png"
alt="The WordPress icon."
class="icon-inline sm-order-rev wp-icon"
2020-02-18 18:39:30 +00:00
caption="WordPress is very good at what it actually is -- a platform that allows users, who may have limited technical ability, to publish a website. For this it is very successful, after all it powers [over 30%](https://wordpress.org/news/2019/03/one-third-of-the-web/) of the world's websites."
2020-02-14 21:02:43 +00:00
>}}
2020-02-14 14:54:09 +00:00
2020-02-12 14:46:57 +00:00
However, it is also a victim of its own success.
2020-02-14 14:54:09 +00:00
2020-02-12 14:46:57 +00:00
It is a very high profile target with a lot of effort expended in finding exploits and vulnerabilities.
2020-02-18 18:39:30 +00:00
Combined with its start as a blogging platform, with CMS features bolted on over time, this can make leaner, more focused alternatives more appealing to developers.
2020-02-09 20:01:45 +00:00
## The Design
2020-02-14 14:54:09 +00:00
As the primary purpose of the site was to display a portfolio of images, then naturally the focus should be on those images.
I felt that having striking, interesting images on the home page would create interest.
2020-02-18 18:39:30 +00:00
Interest that would engage visitors and encourage exploration of the site further.
2020-02-14 14:54:09 +00:00
The site has a colour scheme that is intentionally, lacking colour and fairly dark.
This is to draw the attention of visitors to the full colour photographs that are intended to be the focus of attention.
2020-02-09 20:01:45 +00:00
2020-02-18 18:39:30 +00:00
![A screenshot of the website of Marc Leopold Photography as seen on a mobile device.](/images/leopold/medium-2.jpg)
2020-02-14 20:34:27 +00:00
2020-02-14 21:02:43 +00:00
## The Deployment
2020-02-14 14:54:09 +00:00
The website is hosted on a Virtual Private Server using [Docker](https://www.docker.com/).
The main advantage of using Docker containers in this case, is in how it simplifies development and deployment.
Using containers ensures the development environment is identical to the deployment environment.
The Dockerised services we require, are simple to set up and having these services isolated in containers, we eliminate any issues caused by conflicting services or other aspects of the environment.
Deployment is also simplified in that the containers can be easily pushed to production servers.
2020-02-09 20:01:45 +00:00
2020-02-14 21:02:43 +00:00
{{<
figure
src="/images/logos/docker-vertical-monochromatic.png"
alt="The Docker logo."
class="logo large"
>}}