featured_small

How to Get Started with Backend Web Developement

In How-To Guides by Rune

The web is a powerful platform. Names such as Google, Facebook, Amazon, Alibaba, Wikipedia are well known today. These organizations have leveraged on the power of the web and built solutions that have solved some of the world’s problems.

Staying away from web applications is a difficult task today. Your emails, social media, writing tools etc all live on the web and are evidences to the fact that web applications are now an integral part of our lives.

If we decide to keep talking about the power of web applications, we would probably write a whole book and still not be done talking.

Trying to become a web developer is a glorious pursuit. Web developers have the power to change the world from their computers. They have the skills to break boundaries and disrupt industries.

For this reason, companies pay their web developers hundreds of thousands of dollars a year especially the very skilled ones.

Welcome to this journey of web development, it has lots of perks and brings a lot of fulfillment. Afterall you are impacting the lives of people with every line of code you write, what could be better?

Components of a web application

A web application is made of two sides, the frontend (client side) and the backend (server side). Let’s have a brief look at what the frontend is before we shift to the backend which is our point of concern.

The frontend of a web application is the part you see and interact with as a user. It is that part with the colors, animations, text, buttons and font formatting etc. It is majorly made of HTML, CSS and then JavaScript.

On the other hand, the backend is the side you cannot see—it’s literally at the back. To visit a website, you type in an address in your browser and wait for it to load.

In that time, your browser is making a request to a server somewhere, asking for the files which make up the frontend and then the server sends those files to the browser which renders it for you to see. That server side where requests are being processed is known as the backend of the web application.

Let’s use a vehicle as a metaphor:

Think of the backend of a web application to be the engine of a vehicle. You do not see the engine when using the vehicle, but it is working in the background and is crucial to the performance of the vehicle. Without it the vehicle would not move no matter how beautiful it looks.

The job of a backend web developer

A backend web developer is responsible for writing the code at the server side of a web application, this code processes the logic of the web application such as the business logic.

They usually develop all of the server side logic, maintain the central database and optimize the performance of the web application from their end. Most times, they are also responsible for integrating the frontend elements with the server side logic.

In summary, backend web developers write server side logic, reusable code, libraries for future use, optimize the application for speed and scalability, implement strategies to increase the security of web application and protect the data it processes.

What does a backend developer have to know?

Now we know what the backend web developer does, let’s look at what he/she needs to know to perform their tasks.

Programming language and web framework

Programming languages

To do this, a web developer needs to have an understanding of programming basics. Links to help with this would be found in the resources section.

When you understand programming basics, you can start picking up languages. Programming languages are tools web developers use for their tasks, and like every tool, they have their strengths and weaknesses.

The best bet when choosing a programming language is to pick the most popular amongst your friends. This way you can learn faster and have access to more learning resources. It is key to stick to a programming language for a while to have a full understanding of how it works. Jumping ship would have a negative effect on your learning process.

Frameworks on the other hand help web developers build projects quicker, most times you would find out that a web development job requires you to be skilled with a framework. Frameworks abstract a lot of the underlying work for web developers allowing them work on web applications faster and more efficiently.

There exists web frameworks in almost every language, therefore you could pick up the most popular framework and get to work with it.

Here are some popular languages and frameworks used for backend web development:

Python

Python is an object oriented programming language created by Van Rossum. Python is very popular today because of its strengths in data science, machine learning and web development. Platforms like YouTube are built with Python.

Python has an easy to use syntax and is applauded for being beginner friendly.

A print statement in Python is as simple as:

print(“Hello World”)

Django and Flask are two popular frameworks in Python, Django is a full fledged framework with all the tools available for you to use, while Flask is more like a library so you have to piece things together to suit your needs.

PHP

PHP is a server side programming language created by Rasmus Lerdorf. PHP is an acronym for Hypertext Preprocessor. PHP is used mainly for web development. Popular social media platform Facebook, was built with PHP.

PHP is also the main language used to power one of the world’s most powerful Content Management System (CMS) WordPress.

PHP has shown great stability over the years and while people are considering other options, the language remains a key web development tool. This language powers more than 75 percent of the websites you would find on the web.

A print statement in PHP goes like:

<?php
echo "Hello World!";
?>

Laravel is the most popular web framework you would find in PHP, it has a large user community and a lot of cool features. Another web framework that is quite popular is Symfony which makes it a lot easy to follow design practices.

JavaScript (Node JS)

JavaScript is a client side programming language created by Brendan Eich. Yes, a client side programming language.

So why is it on the list? Right?

Well, JavaScript has always been known to be a client side language until the introduction of Node JS. For simplicity, let’s just consider Node to be JavaScript extracted from the client side and made to work on the server side.

This in no way means that it is less capable.

Here’s what hello world in Node JS looks like:

const http = require('http'); 

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});

It looks a bit complicated, but isn’t. Most of the lines are serve as set up required to run Node JS on the server side. Companies such as Netflix and Uber are powered by Node JS.

Node JS serves the purpose of whatever server side tasks you would want to work on. You do not need any frameworks for this. People mistake Node JS to be a JavaScript framework, however it isn’t.

Java

Java has always been a very popular language created by James Gosling. It is a complete object oriented programming language and has gained much of its popularity through its “Write Once, Run Anywhere” paradigm.

While Java is known more for mobile application development for the Android OS, it is also powerful for building web applications. Java remains a key part of the Google, Twitter and even Facebook’s server side logic.

Here’s what hello world looks like in Java:

public class HelloWorld { 
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

Looking at frameworks, Spring is Java’s most popular framework, with JSF (Java Server Faces) coming closely behind. Spring is a lightweight web framework with great design that allows developers build web applications with cleaner design.

Ruby

Ruby is a object oriented, general purpose programming language created by Yukihiro “Matz” Matsumoto. Ruby is the youngest programming language on this list, however it is very powerful.

Ruby is loved amongst lots of developers as it is easy to use and as a result has a huge user community.

Hello world in Ruby is as simple as:

puts "Hello, World!"

Simple enough right? Hehe.

Ruby on Rails is most popular web framework Ruby. Since developed in 2005, it has been used by Yahoo, Twitter amongst a host of other big companies. It has great design and allows developers work on projects in quick time.

Databases

Databases

Data is the new oil. Therefore a lot of web applications are data driven and databases are key to their operations. A database is a collection of stored information such that it can be easily accessed, managed and updated.

While there are lots of databases out there, gaining experience in one or two databases is usually enough.

In today’s market, the most used types of databases are the relational and non-relational databases. Therefore when you decide to learn, you could learn one relational and one non-relational database.

You could pick up MySQL or PostgreSQL for relational databases and MongoDB for non-relational databases. The point is to understand how relational and non-relational databases work, how to make queries and optimize the databases.

You have to take databases quite seriously, probably not at the level of a database administrator but well enough to use them in web applications. It should be pointed out that web frameworks use Object Relational Mapping (ORM) these days, so you may not have to work directly with SQL syntax however it is still important to know SQL so as to understand things at a deeper level.

Test Driven Development

Test driven development involves developers writing tests for the application’s features before writing the features themselves. The main objective of this process is for the tests to fail initially and then write code for the tests to pass. This reduces the number of bugs present in the code.

Web applications are not just mere tools, sometimes lives depend on them. For this reason, different tests need to be carried out to ensure that nothing goes wrong when the application goes live on the web.

While there are different types of tests, the ones that are of major concern for a backend web developer are the unit test and integration tests.

For the unit tests, you are writing tests for for the different parts of the application when taken apart, unit tests break down the software into specific functions and testing them in isolation from the rest of the code.

On the other hand, integration tests involve testing the unit tests together as a combined unit. The objective of integration tests is to check the interfaces of the unit tested modules. Since modules have to work together, testing them in isolation is not usually enough. An extra test combining the modules is necessary.

Version Control (Git)

Version control is vital in software development today and even beyond it. Therefore it is important that you learn a version control system. Git is the most popular version control system today as you would find it implemented on a lot of open source platforms.

Using version control in projects has a lot of advantages such as allowing better collaboration between you and other developers.

With version control, multiple developers can work on a project at the same time, without any restrictions. So anybody on the team can make changes to the project at anytime. This ensures projects can be completed quickly.

Also with a version control system in place, versions of your application are stored properly. Let’s say for example you are working on a new feature for a web application, and you have made changes to the code. If for some reason the code doesn’t work anymore, you can restore the project back to the version that was working fine.

All that can be done without you having to create backups of files before making changes. The version control system has everything covered as it keeps a snapshot of different versions of your project allowing you restore them when needed.

Application Programming Interface (API)

Application Programming Interfaces are key in the world of software development. They are intermediaries between two software applications that allow them to communicate with each other. When one software application needs information from another application, it can make a request to it through the API and have the information sent back as a reply.

As a developer, you cannot render all services yourself. Imagine you need to tell the temperature at different places in the world. You would not go to those places and start taking measurements of temperatures in those places.

What you would do is to request that information from another web application through an API and use.

You would work with a lot of APIs from other web applications and you would also get to build them for other developers to use. While you do not have to worry about APIs early on in your web development career, you would find cause to understand how they work, how to build and use them over time.

Server administration skills

As a backend developer, you can’t avoid working with servers. This doesn’t mean you would have to toggle with wires, by servers here I’m referring to the software that controls the servers themselves.

While learning to write backend code, you would have to run web applications on your local machine. The ability to run your applications yourself on your machine requires some knowledge on server administration and it would prove useful. Well, except you decide to hire a system administration to help perform simple admin tasks.

Also, when you build your applications, you would also need to learn how to deploy (upload) them to the web so that other people can access them. This is also something you would need to know as a backend web developer.

Extras

Cybersecurity

It’s not enough to only write code and build software, you need to be wary of the security implications of every line of code you write. There are bad guys everywhere, black hat hackers are looking for software with vulnerabilities to exploit and carry out their evil ambitions.

While you do not have to become an hacker be wary of possible security vulnerabilities, you need to read up the popular ones and try to avoid them. This would go a long way.

It should be noted that your software cannot be 100% secure, so you can only try as much as possible to build secure web applications.

There would be more hacks and breaches into web applications in the future, so having a knowledge of cybersecurity would make you super valuable as a backend web developer.

In the resources section, there are links to great content that would help increase your awareness on the issue of security with web applications.

Frontend

A web application is made up of the frontend (client side) and the backend (server side), this means your application would not be usable by other users if it has no client side interface. Therefore, regardless you trying to become a backend web developer, you need to have some frontend developer skills.

While you don’t have to be as good as a frontend developer, it would be great if you had some knowledge of HTML, CSS and then JavaScript. Enough knowledge to build a simple to use interface for the users of the web application.

In some cases, you may work with web frameworks where the backend is interwoven with the frontend. With these kind of frameworks, you would need to have some knowledge of frontend development to do any useful work.

DevOps

DevOps is a buzzword these days. However this doesn’t take away its importance. If you decided to learn basic server administration skills as advised earlier in the article, then learning how DevOps works, its importance and its tools would be easy.

Basically, DevOps is an organizational methodology based on the need for software engineers i.e. the developers and operations engineers to collaborate better and ensure products are built and deployed (i.e. launched) faster so as to achieve business goals.

While DevOps is not about the tools, they remain a critical part of the whole idea. You would learn about tools and technologies such as Docker, Jenkins, Kubernetes, Chef etc which help make the whole software development lifecycle a smooth one.

Pathway

There are two popular routes to becoming a web developer. One is through a bootcamp and the other is by self teaching.

Bootcamps would give you a quick boost in web development, however you may find it difficult to stand on your own after the bootcamp. You would only do things because that is what the bootcamp taught and not because you feel they are the right things.

Self teaching is a slower method, however you stand a better chance at understanding some concepts better. This is because you are doing study yourself, you would know how to make use of the resources at your disposal and would have a better understanding of things if you truly crave the knowledge.

The things to be discussed in this section would apply regardless the route you choose.

Learning programming fundamentals is key. You should do that first, as this would give you an insight into the whole concept of programming. This should not take a lot of time, check out the resources section for links that provide a quick introduction.

After learning the fundamentals of programming, you can pick up a language. It is best to stay away from all of the internet buzz on what language is best and choose the language your friends use the most. This way, you could share ideas and learn quickly. Try as much as possible to stick to that language and get a deep understanding of how it works, then you can move on if you decide to learn other languages.

Build projects, these projects may not be web related, but build stuff with the language. This would get you acquainted with its syntax so you feel comfortable while using it.

Learn a framework. While some people would not agree with the idea of a beginner using a framework, the truth remains that frameworks would give you an insight into the whole web development process.

At this point, you would be able to do stuff. However your level of curiosity would go a long way in determining your level of understanding. You should check up the meaning of concepts you do not understand, the reasons why certain things are done the way they are during web development and most importantly you should have a deep understanding of how the web works.

All these would help make you a grounded backend web developer instead of one who just does things at the surface level.

Build stuff, lots of it. You should try to build a lot of projects. Build your own blogs, your own social media, think of problems in your environment and build software solutions for them regardless of you not making money off them.

They would be added to your portfolio and make your job hunting task easier. Software engineering is a field that is driven by what you can do, and then your understanding of why you do things. Therefore, people would judge you by what you have done and then by your understanding concepts.

When you finally get a job as a web developer and as you grow in this field, you need to take your understanding of computer science concepts seriously. An understanding of these concepts is vital in tackling problems that truly matter to the world.

Improving your craft

We are looking into this session after talking about the pathway on purpose. This is because you can become good enough to hold a junior or intermediate level web developer position without the things listed here. However, you can’t continue to do things without considering the best methods.

Writing software is a craft and to become a great craftsman, you need to go beyond doing things the generic way. You should look into doing things in the best possible way.

Data structures and Algorithms

Data structures are a means of collecting and organizing data in ways that enables operations on that data be done effectively.

Algorithms on the other hand are a set of steps taken to solve a particular problem.

The combination of the right data structures and algorithms is vital to solving problems efficiently. Without the knowledge of these things problems would be solved with terrible methods, that’s if they are solved at all.

When building a complex application, you would need to take data structures and algorithms quite seriously especially when speed is vital. For example, the Google search engine works very fast and has become popular because of the speed at which results of queries are returned.

As a metaphorical example, imagine wanting to move from one point on a triangle to another. You could either move directly from one point to the destination or go through the two other points. While the former and latter would work, it is evident that the former is more efficient.

Design Patterns

Design patterns are crucial to improving your craft. They are generally reusable solutions to commonly faced problems in software engineering. Therefore, when you face a certain problem a solution could be as simple as implementing a design pattern that best suites the problem.

This helps you save time, plus it is also used as a means of communication amongst software engineers when discussing such problems.

Basically it all revolves around you knowing what the patterns are, understanding them, their applications and then truly applying the patterns in your code.

Clean Code

As a backend web developer, you would not be working on code alone. Therefore you have to write code that can easily be understood by others.

It is important to write clean code always because in its beneficial to you first and then to others.

A popular excuse developers give for writing dirty code is the lack of time. In the end working with dirty code would cost you a lot of brain power and time, therefore writing dirty code to save time is simply a wrong illusion.

For example, giving variables vague names. You give a variable the name a and assign the value 30.5 to it, whereas the real intention of that value is the measure of rainfall in a month. A variable name such as rainfall_in_march would do a better job of describing the purpose of the variable than a variable name a.

As Robert C Martin says in his book Clean Code: A Handbook of Agile Software Craftsmanship:

“Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.”

Robert C Martin

Resources:

Understanding the web

Mozilla – How the web works

Stanford – How does the internet work?

YouTube – How the internet works for developers Part 1

YouTube – How the internet works for developers Part 2

Book – HTTP The Definitive Guide

Programming concepts

Absolute basics of programming – here

Computer programming tutorial – here

Basic programming concepts for beginners – here

Brief programming tutorial for beginners – here

Learning programming languages

Codecademy – here
Treehouse – here
Codeschool – here

FreeCodeCamp – here

Computer science fundamentals

Teach yourself computer science – here

Version Control (Git)

Learn Git through GitHub – here

Getting Git right – here

Databases

Learn SQL, the language of databases – here

An introduction to NoSQL databases – here

FreeCodeCamp – Full SQL course for beginners

Cybersecurity

OWASP – DevGuide

The Web Application Hacker’s Handbook – 2nd Edition

DevOps

36 DevOps Terms You Need to Know – here

DevOps Bootcamp – here

Clean Code

Clean Code: A Handbook of Agile Software Craftsmanship

Code Complete: 2nd edition