David Hockley

Frontend vs Backend

Frontend or backend : If you want a career in web development, at some point you will find yourself at a crossroads. Two very different paths lead away from it. Both paths are difficult, and yet even the difficulties are radically different.

One path, the front end, seems flat, bright and shiny, open and sunny.

And yet, it is winding, it twists and turns. And above all, there are angry crowds on every side, ready to pounce on those who stumble on the road.

The other path, heading towards the back-end, is steep, and cold, and isolated. There are steep cliffs on each side ready to swallow up those who fall in.

And yet, the path itself is straight and solid. Neither path is easy. Which one will you choose? The answer may well depend on who you are. Let's see why. Back-end and front-end development have two very different goals.

In simple terms, the goal of back-end development is to produce a logical system. A system where the inputs can be cleaned and the outputs are known. A system where rules are paramount.

The back-end consists of chewing the data, of finding the right way to format it, store it, retrieve it, and send it.

And above all applying a cold mathematical logic to it.

The back-end is all about making computers talk to computers in the most efficient way possible. It deals with objective truth. And so we never trust the user, neither what he says nor what he does.

Front-end development, on the other hand, is all about dealing with humans. And unlike computers, humans are messy and unpredictable, and wonderfully variable.

A computer will do exactly what you tell it to do, no more and no less.

Humans can do more or less what you expect them to do, or... precisely the opposite of what you expect them to do, just... because.

Or they can guess what to do without you asking them to do anything.

Front-end development is about pleasing the user. It's about providing the most aesthetic, fun, and entertaining experience.

It includes elements of creativity and art.

In this sense, the goal of front-end development's is one that can't be measured or defined. Because it is inherently subjective.

In a sense, there is a left-brain/right-brain opposition between back-end and front-end development.

But the difference does not stop there.

It also includes the concepts, skills, and technologies that must be mastered along the way. Let's take a look together

What is the common foundation of backend and frontend development?

Let's be clear though that both paths share a common foundation. This includes Git, of course. And even if you're a back-end developer you need to understand the basics of HTML and CSS.

JavaScript or TypeScript will be useful in both cases (since NodeJS Javascript has become a server language).

There is also a need in both cases to understand how APIs work. They are the "glue" (or: the interface, which is the I of API) between the front-end and the back-end. Now that we have seen what the back and front end have in common, let's see how they differ.

What is specific about backend development?

The back-end developer is in charge of storing and manipulating data in the cleanest, most efficient, and safest way possible. With a minimum of repetition, without frills or excess data.

The questions that need to be answered are therefore the following:

  1. How is the data structured? (And that answer depends on whether we are using a relational database, which can be queried with SQL, or in a key/value store, or indeed another type of NoSQL database).
  2. How is the user authenticated?
  3. How, based on the user, his actions, and the data we have, do we apply logic rules, and rewrite the data?

And to answer these questions, we need to have a solid understanding of how databases work.

We need to understand how a stateless server works, and we need to know the ACID rules of databases, and why they exist. And maybe even when to bend them.

We need to understand how to cache data and invalidate the cache. We must have a solid understanding of how encryption works: how to use it and what its limitations are.

And of course, we need to master at least one of the server-side languages (PHP, NodeJS, Python, Java...).

To summarise: on the back-end we standardise, and secure, and make sure that everything is in the right place.

What is frontend development all about?

Developing for the front-end is about managing the fact that people access the Web with a very large variety of devices.From slow android 360 pixels wide devices in portrait mode to blazing-fast desktop computers with 5K pixels wide landscape mode screens.

And on top of that, these devices have very different network connections. Some have high speed fibre, others have an 3G connection.

So the questions that need to be answered are the following:

  1. How can we degrade the experience gracefully? How can we offer a pleasant and functional experience on radically different devices?
  2. How can we make images both look sharp on a 5K screen and display immediately on a slow connection?
  3. How can we give the impression that something is happening, that the user's input has been taken into account, even if we are still waiting for the server to respond?

And to answer these questions, we need to understand how browsers work, how to optimise the data sent, and how to make the page as fast as possible.

We need to understand mobile-first responsive design, lazy-loading, and image formats.

And we also need to understand the subtleties of CSS, as well as its different modes (block, flexbox, grid,..), semantic HTML, technical SEO, and of course JavaScript.

I know some of you saying "I want to be a full-stack developer", that is to say to master both front-end and back-end.

And it's a noble ideal (and it pays better too :D ) So what about full-stack development?

What is fullstack development?

Fullstack development means you can do both frontend and backend development. However I’ll let you in to a little secret… you can never start with full-stack development. You can't master both the back-end and the front-end at the same time.

If you want to master two subjects, you have to start by mastering one.

And which ever one you choose to start with (front or back) you'll need to understand some of what happens on the other side of the great divide between browsers and servers anyway.

And what's more, the lines between the front-end and back-end are progressively becoming less and less defined.

First, by the rise of client-side frameworks such as React or Vue or Angular that move as much of the business logic as possible to the client side.

And secondly by full-stack frameworks such as NextJS or NuxtJS where you write code that will be executed both server-side and client-side.

But the fundamental differences between the mindsets and skills required for front-end and back-end development means that the vast majority of us will have… a confort zone.

A side of the server/browser division that we prefer to work on.

And this could be simply due to the makeup of our personality.

Social
Made by kodaps · All rights reserved.
© 2023