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/flowmm.md

145 lines
6.7 KiB
Markdown
Raw Normal View History

2020-01-31 13:33:56 +00:00
---
title: "Flow Model Management"
2020-02-09 19:15:24 +00:00
date: 2020-02-08T12:27:18Z
2020-01-31 13:33:56 +00:00
categories: ["Portfolio"]
tags: ["Vue", "Nuxt"]
2020-02-06 20:56:50 +00:00
featured_image: "/images/flowmm/flowmm-home.jpg"
2020-02-16 20:27:51 +00:00
draft: false
2020-01-31 13:33:56 +00:00
---
2020-02-14 17:59:14 +00:00
**Flow Model Management** is a fictitious modelling agency.
2020-02-16 21:29:06 +00:00
They were created solely for the purpose of giving me a reason to create their [website](https://flowmm.rayelliott.dev).
2020-01-31 13:33:56 +00:00
2020-02-09 15:57:38 +00:00
However, despite being imaginary, the owners of Flow Model Management felt that it was about time their business should have an internet presence.
And so, discussions with the stakeholders began.
It quickly became apparent that the primary purpose of the proposed website would be to provide an attractive and stylish platform that would encourage visiting candidates to apply to join.
Essential to this, would be to provide a simple process for users to submit an application.
2020-02-06 20:56:50 +00:00
## The Front End
2020-02-14 17:59:14 +00:00
{{<
figure
src="/images/logos/nuxtjs-icon.svg"
alt="The Nuxt icon."
class="icon-inline sm-order-rev svg"
caption="For this project I wanted to build a **Single Page Application** using [Nuxt.js](https://nuxtjs.org/), which is an open source framework based on Vue.js."
>}}
2020-02-09 15:57:38 +00:00
One advantage of an SPA is speed.
SPAs are fast.
Instead of reloading an entire page, when maybe only one small component of the page needs updating, a client may request only the much smaller data needed to update that component.
So, once the initial page is loaded, the amount of data that needs to be transmitted can be greatly reduced.
This also has the benefit of an improved user experience.
2020-02-11 15:25:44 +00:00
Navigation and updates to the state of the site appear to be almost instant, similar to a native application, rather than more lengthy page reloads typically associated with websites.
2020-02-09 15:57:38 +00:00
2020-02-14 17:59:14 +00:00
{{<
figure
src="/images/logos/vue.svg"
alt="The Vue logo."
class="icon-inline icon-right svg"
caption="**[Vue.js](https://vuejs.org/)** is a modern JavaScript framework for creating web interfaces. It makes use of the virtual DOM, is small and fast, and is an ideal foundation for an SPA."
>}}
2020-02-09 15:57:38 +00:00
However, Vue along with other SPA frameworks do have some disadvantages.
2020-02-11 15:25:44 +00:00
A major disadvantage is regarding **Search Engine Optimisation**.
2020-02-09 15:57:38 +00:00
SPAs can require a relatively long initial page load, and aren't as efficiently crawled by search engine crawlers due to the heavy use of JavaScript.
2020-02-06 20:56:50 +00:00
2020-02-09 15:57:38 +00:00
This means sites requiring SEO, need to take steps to mitigate these issues.
One solution is to render the HTML on the server, rather than the client.
The HTML can be quickly displayed by the client browser, reducing the initial page load, with updates to the site being handled by Ajax calls, as with a conventional SPA.
This may be taken even further, if desired, so that *all* pages are rendered on the server. In effect, creating a static site.
This will then bring all the benefits of a fast, easily indexable static site.
2020-02-11 15:25:44 +00:00
These, **Server Side Rendered** applications can require a lot of setting up.
2020-02-09 15:57:38 +00:00
There are also a number of pitfalls and considerations that need to be kept in mind.
2020-02-11 15:25:44 +00:00
To name a few:
* there are no requests for new pages and so the browser history needs to be managed,
* there are many threats of security vulnerabilities and exploits,
* although browser standards have improved over time, there are still a number of differences in behaviour between the many devices and browsers in use.
2020-02-09 15:57:38 +00:00
2020-02-14 17:59:14 +00:00
{{<
figure
src="/images/logos/nuxtjs-logo.svg"
alt="The Nuxt logo."
class="nuxt logo svg"
caption=""
>}}
2020-02-09 15:57:38 +00:00
This is where a framework such as **Nuxt.js** comes in.
A lot of the tedious scaffolding is taken care of and being a fully tested, mature framework, we can be confident that many common, and not so common, issues have already been solved and tested for.
A further benefit to using Nuxt.js, is the client application can be easily extended.
For example, it may be decided in future that the features commonly found in **Progressive Web Applications** are desired, in which case these can be more easily added due to already being supported by Nuxt.
So, above, are the reasons I would use to justify using Nuxt.js to build an SPA for this project.
However, a very large factor, to be entirely honest, was that I had been gaining experience in using Vue.js and wanted an opportunity to use Nuxt.js to create an SPA with server side rendering.
With SPAs being an important component of the modern web I wanted this project to further my experience and understanding of the technology and techniques involved.
2020-02-06 20:56:50 +00:00
## The Design
2020-02-14 19:27:04 +00:00
![]( /images/flowmm/flowmm-model.jpg )
2020-02-06 20:56:50 +00:00
The design brief from the non-existent owners of Flow Model Management was quite
2020-02-09 15:57:38 +00:00
simple. A visually appealing, elegant site, with some background information and an easy
2020-02-06 20:56:50 +00:00
to use method for applicants to sign up with.
2020-02-09 15:57:38 +00:00
A monochromatic colour scheme was chosen. I felt that a primarily black and
2020-02-11 15:25:44 +00:00
white colour scheme that uses the brand colour of orange as an accent would give a classy and
2020-02-09 15:57:38 +00:00
elegant feel to the site.
**Montserrat** and **Lato** were the fonts chosen for the headings and body text respectively.
These are both clean, easily readable fonts.
Montserrat was chosen for its classy and elegant qualities.
It is formal, but not too formal, reminding me of the classy, stylish fashions of the early 20th century, and yet still appearing modern.
2020-02-06 20:56:50 +00:00
2020-02-09 15:57:38 +00:00
Lato, which goes well with Montserrat, is also modern and elegant, much like Montserrat, and keeps with the formal but not overly so, feel of the site.
2020-02-06 20:56:50 +00:00
2020-02-14 19:27:04 +00:00
{{<
figure
src="/images/flowmm/flowmm-model-1.jpg"
alt=""
class="icon-inline icon-right flowmm-model-thumb"
caption="As the site is for a modelling agency, I decided that making the models a prominent feature would be an ideal way to make the site visually appealing. By bringing the models to centre stage and focusing attention on stylish images of the models, this focuses the aesthetic of the site towards an elegant, stylish look."
>}}
2020-02-06 20:56:50 +00:00
2020-02-09 15:57:38 +00:00
## The Deployment
2020-02-06 20:56:50 +00:00
2020-02-09 15:57:38 +00:00
The project is hosted on a **Virtual Private Server**, using [Dokku](http://dokku.viewdocs.io/dokku/).
2020-02-06 20:56:50 +00:00
2020-02-09 15:57:38 +00:00
**Dokku** is a [Docker](https://www.docker.com/) based, open source, Platform as a Service in which Heroku compatible applications can be deployed to and hosted upon.
2020-02-06 20:56:50 +00:00
2020-02-14 17:59:14 +00:00
{{<
figure
src="/images/logos/docker-horizontal-monochromatic.png"
alt="The Docker logo."
class="logo"
>}}
2020-02-09 15:57:38 +00:00
Using Docker during development has many advantages.
2020-02-09 16:04:23 +00:00
When using Docker, the application is encapsulated within a consistent environment.
This brings many advantages.
One such advantage being the development environment can exactly match the deployed environment, ensuring there will be no compatibility issues after deployment.
2020-02-06 20:56:50 +00:00
2020-02-14 17:59:14 +00:00
{{<
figure
src="/images/logos/git-orange.png"
alt="The Git logo."
class="git logo"
>}}
2020-02-09 15:57:38 +00:00
Combining Docker with Dokku also allows for simple deployment, which can be done with just a [Git](https://git-scm.com/) push.
2020-02-14 19:35:46 +00:00
&nbsp;
![]( /images/flowmm/flowmm-home-footer.jpg )