The magic of Express.js

You know what I love about Node.js?  Express.js!

I’ve really been getting into Node.js lately, and I have not stopped enjoying it. I am building a fairly big application with Express.js and so far so good. Every month or two I get around to cleaning up the codebase and find myself feeling proud of it. I’m still learning more and more about Express.js, and this enables me to continuously be more organised and write cleaner code.

I get a kick out of how unopinionated it is. You structure it how you like, and that’s the beauty of it. It makes working with the backend a joy. I’ll always use Express.js and I will be an expert at it in a few years, I guarantee that.

I’d also like to put it out there that I will be learning about testing Express.js servers and about the best ways to secure your Express.js application. I will share my learnings here. More on this at a later date!

Oh wow… ⌥

In VS Code, you can highlight some code and hold down the ⌥ option key and press up or down. This is one of the simplest and most powerful techniques I’ve learnt in a long time. Wow.

A boilerplate for app development

Check out my GitHub page to find all the code I’ve been working on over the last few months.

I’m giving you a link to my latest boilerplate for building a web app.

Ideally you need to have an understanding of Gulp, PostCSS, Pug, Express, Model View Controller (MVC), maybe some JavaScript and Webpack.

For those of you who are familiar with pug (formerly known as jade), express.js and node.js and are interested in building your own application, then here is a build for you to start with. Simply pull the repository or download it to your local machine, enter into the main project directory within the terminal and type ‘npm install’ and wait for the packages to install. Then type ‘gulp watch’ and boom! You’re set to start coding.

You’ll be synced with the browser, so the browser will refresh and all files will be compiled upon saving.

All of the directories you’d need to edit yourself are in the ‘public’ folder.

Enjoy 😊

Automagically returning objects

In Javascript, all functions are objects:

function Person(firstname, lastname) {
this.firstname = firstname;
this.lastname = lastname;

Constructors (shown below) make use of the ‘new’ operator and the ‘this’ variable to create empty objects. When the ‘new’ operator is used to construct an object, the function is invoked and an empty object is automagically returned.

var taylor = new Person()
console.log(taylor) // Person {}

The constructor invokes the function and will return an empty object unless. If you wish to do so, you can pass parameters when constructing a new empty object like so:

var bob = new Person('Bob', 'Smith')
console.log(bob) // Person {firstname: 'Bob', lastname: 'Smith'}

Each time you construct a new object, The ‘this’ variable now points to a new empty object in memory. You can then set the parameters passed into the function to properties of the ‘this’ variable using dot notation i.e this.firstname.

2018 – the year for designers and developers

Since I started coding in 2016, there have been an amazing amount of resources to choose from. However, 2017/2018 has been astonishing in terms of resources and I’m sure a lot of other designers and developers think so too. Here are some highlights for me:

Its been going well and I’m extremely grateful to have all these different resources to choose from. It certainly makes this learning journey even more exciting.

Programming in JavaScript is fun!

I’ve been learning Javascript intensively over the last few months. Here are the three main resources I use:

All three of these resources take a learn-by-doing approach to programming. I will also be obtaining knowledge from other resources such as:

The more time I spend building algorithms in Javascript, the more I find coding with the language fun. What a day and age to be alive!

Check out my Github repositories for some of the completed exercises I mentioned above.

Developing a community through transformational leadership

As a novice web developer I want to learn more and learn faster because my time at university is slowly coming to an end. I know I will never get the chance again to have so much free time available to do the things I like.

Teaching myself web development has been a fun learning journey. I’ve successfully helped myself and now I feel confident enough to help others to learn too. I believe mentors are extremely powerful in the value they provide in terms of learning. I know this from experience as I had a mentor during the summer holidays this year.

The learning curve for web development is quite steep in the beginning and then it tapers off slightly as things become more difficult. Below is a good representation of what the typical learning journey looks like for a front-end web developer. (more can be found here

My point is that it is a complex learning process. Having a group of people or a mentor who can help you learn is invaluable, and that’s what I was missing. That’s why I started the FXU Web Design & Development Society. To bring designers and developers together to enable each other to learn more effectively. To foster a sense of community around a topic that is cardinal to a creative arts university today.

Go ahead and sign up on the FXU website for free and I will add you to the Facebook group. We will be posting updates here regarding free workshops, socials, speakers and events all things web design and development.