DEV Community

Sloan the DEV Moderator
Sloan the DEV Moderator

Posted on

What's the difference between Front-end and Back-end development?

This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment or if you want to ask your own anonymous question.


I'm brand new to development and am trying to understand the difference between front-end and back-end development.

I think I kinda understand that front-end is what the user sees and back-end is how the information is retrieved, but I imagine there's a bit more to it than that. I would really appreciate hearing others' thoughts and explanations on this.

Analogies and examples would be very welcomed! Thank you all very much. 🙏

Top comments (34)

Collapse
 
aarone4 profile image
Aaron Reese

What about the maitre de (load balancer/router) and the bus-boys that take the food from the kitchen to the table (middleware) or the comics chef preparing food for cooking (API layer) or they team that mend the cooker ( DevOps/architect) or the team that design the menu (UI/UX) or the team that sets the menu (Business Analyst/Product owner)

Collapse
 
peerreynders profile image
peerreynders • Edited

Just to augment what's already been stated (from Front end and back end):

  1. Back-enders work with only one environment, their server. They have the option of changing their environment; for instance by installing new software or upgrading the hardware.

  2. Front-enders work with an unknown number of radically different environments, ranging from state-of-the-art desktop computer to three-year-old, crappy phones with limited memory and processor time. They cannot change these environments because they have no power over their users’ browsers. Still, their code should work in all of them.

Either area has it's own unique challenges and have gotten more complex over the years. The front end is known for "JavaScript fatigue" and there are always the obligatory "How it feels to learn JavaScript in 20xx" articles but the back end added over the years containerization, container-orchestration, cloud-native computing and dev ops into the mix.

This typically isn't an issue in larger organizations where individuals can focus and master a particular area (e.g. database administration) but can be challenging in smaller teams where everybody has to fill multiple roles - lest they use some SaaS to take care of the some of the details (trade off: that vendor now controls their view of the world and dictates the required skill set).

And even when you can specialize you have to communicate with other people. Members of a product team will tend to have varying technical expertise, so while it isn't necessary to become a "fullstack developer", full stack awareness makes team communication a lot more effective. Ultimately all these bits and pieces have to work together to create a working whole.

The reason why front end is often seen as "easier" is because it seems easier to get started - learn HTML/CSS/JS and your off to the races, right? This overlooks the variety and combinations of rendering options on the web, each of which is suitable for different use cases.

"Just learn React!" somebody says;

"Indeed, we've started to notice that many newer developers aren't even aware of an alternative approach, as they've spent their entire career in a framework like React."
SPA by default (Hold)

Also the industry doesn't even apply the term front end developer consistently. At the very least a front end developer has to communicate effectively with visual design and UX experts. Visual design is often acknowledged to require a very different mindset from development. Yet there is a growing demand for designer-developers - a designer-developer is more versatile and one person is cheaper than two or three but it also cuts communication overhead which can speed things up (unless there is too much to do for one person at any one time).

It's not that one has to know everything to get started—far from it. But it should be clear that either way working in the back end or front end area is a continuous journey (and not necessarily strictly separated) of learning (often resolving fewer "known unknowns" than it adds).

Collapse
 
sayamkeerthi34 profile image
sayamkeerthi34

Interesting

Collapse
 
webbureaucrat profile image
webbureaucrat

I mean... yeah that's pretty much it. These aren't technical terms so much as they're generalizations or shorthand.

For example, server-side rendered HTML is a template that represents what the user would see but includes some logic that runs on the server before it's sent over. (E. g., if I wanted to write one HTML file which could display the username for whichever user is logged in, I might say <h1>Hello, @{firstname}</h1> and then when requested for a certain username, the server replaces the placeholder and sends down <h1>Hello, Sloan</h1>.) Depending on the context, I might call this "front-end" or "back-end". It is front-end in the sense that it is mostly HTML and would be written by a front-end specialist (or full-stack dev), but on the other hand, if I'm debugging, it's important to know that it's running on the back-end--the server.

So where I'm going with this is that while there is a grey area between, I think your definitions are about as good as anything. Give yourself credit for understanding more than you think. :)

Collapse
 
patriciacosma profile image
Patricia Cosma • Edited

Hi there! I made an analogy for myself around the full stack.

In frontend, there are 3 main languages you'll work with HTML, CSS & JavaScript. I see HTML as the structure of the house (you want 2 bedrooms, one living room, a kitchen etc.). CSS is how your house is designed (the color of your walls, which room is the biggest one, where to place your plants around your furniture), while JavaScript provides the functionality of the house (how your doors should open, how your lights should work etc.).

In your house, you also need electricity, water, TV cable etc so your house will have better functionality (although it can be a good place for you to sleep in just as it is). I see this as the backend.

Hope this helped a bit. Good luck!

Collapse
 
michaeltharrington profile image
Michael Tharrington

This is an awesome explanation! Really appreciate ya sharing.

Collapse
 
patriciacosma profile image
Patricia Cosma

Thank you, Michael!

Collapse
 
theaccordance profile image
Joe Mainwaring

If you were to think of building a web application like building a car, front-end engineers would add the paint, rims, window tint, interior, and accessories. Backend engineers would be the ones who deliver the engine, transmission, suspension, and chasis.

Front end will focus on what the end user sees and interacts with. Backend will focus on making it actually work.

Collapse
 
aarone4 profile image
Aaron Reese

This is where the confusion comes in though. Front-end USED to mean the HTML, CSS and text copy and back-end was anything on the http request.
TODAY front end (imho) also requires form validation, dynamic update of DOM based in user actions, management of the data store, local storage strategy to work offline, async fetch and post data without a page refresh, manipulation of data from an API endpoint that is not in quite the right format
All if this requires extensive knowledge of JS and/or frameworks, computer algorithms, and entity modelling. If you include the new WASM technology then you will also need to know A LOT of .net/python/rust/go

Collapse
 
theaccordance profile image
Joe Mainwaring

All of that was either in play a decade ago or was just coming out, and I can speak from experience that you don’t need to learn all of that.

Frameworks exist to help accelerate implementation of most of the features you listed.

Collapse
 
scottshipp profile image
scottshipp

There are many good answers here.

But I want to chime in with something that I think is getting overlooked.

It's important to point out that frontend and backend are terms that grew up around the web and programming for the web. They aren't great terms for someone starting out, unless that someone intends to only program web applications like Google Docs or Spotify-in-the-browser.

(Which is what many of us do, and that's totally fine. It's just a distinction that should be mentioned.)

There is a lot of other programming. Code is running inside your microwave, your car, your smartphone, your television, etc. And also inside your computer: such as the browser itself.

Usually, none of these things fall under the "frontend" or "backend" programming labels. Instead, you will hear labels like "mobile," "OS," "desktop," "embedded," etc. "Frontend" and "backend" relate only to stuff that happens after you type a URL in a browser and press enter (at least, the way most people use these terms.)

If you are starting out and want to think about any programming outside of things that you can point a web browser at and interact with, then forget about "frontend" and "backend" programming for now. Just focus on learning a good language and the rest will follow.

On the other hand, if what you do want to do is create something like Facebook or the site you're looking at right now, then they're good terms to know and you can focus on one or the other. In that case, think of frontend as the programming related to anything that happens within the browser. And think of backend as everything else. It could be data access, a long-running process like generating a file to download, some kind of communication with the outside world like sending someone an email or text, placing an order, or many other things. These are usually performed by "web services" which are also accessible via the web, but just not in the browser-renderable formats.

HIH

Collapse
 
etampro profile image
Edward Tam

front-end and back-end development are still very broad terms, even within each category there are multiple domains that can be very different from each other.

But let's say in terms of feeling, I think the biggest difference is that front-end in general produces a lot more code and you get instant gratification (like a artist painting a picture) vs backend is more logical and computational oriented (like a mathematician). Obviously, front-end logics can be complicated, but I think in general you spend more time trying to visualize things comparing to backend.

Collapse
 
hunghvu profile image
Hung Vu

Here is my personal definition.

Front end: Whatever runs on your browser engine, which means, locally. Be it a user interface, or internal computing. It's not necessary for users to see a component on screen to be considered as front end.

Back end: Whatever runs on the server, located elsewhere on the globe that can be connected via a specific network protocol.

Collapse
 
coderamrin profile image
Amrin

to demonstrate i'll say, Imagine a Mobile Phone.
What you see is the Frontend, and what is inside the cover that runs the phone is the Backend.

In a javaScript stack:
Frontend is built with: Html and Css and
Backend is built with: Node.js

Collapse
 
perssondennis profile image
Dennis Persson

I've explained the difference with the help of the human body here. Lots of memes but quite accurate actually :) It explains microservices and testing as well.