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. π
Oldest comments (34)
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. :)
Just to augment what's already been stated (from Front end and back end):
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.
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).
Interesting
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.
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
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.
I'll try an answer as simple as possible.
Backend: has the data, has the ability to transform or return that data when asked about it on one of its endpoints (urls). When the data is sent to the client, there is no possibilties for the backend to interact with it unless you reload the page.
Frontend: After the data is received, you might want to represent your data in the browser in a way that a user can interact with it. The frontend will be able to alter the presentation with the data it already has. If it requires more data, it will call the server (backend) without the need to reload the page.
Frontend developers
are responsible to design user interfaces (UIs) for the web. They're doing so using
Frontend devs work closely together with designers and implement simple to sophisticated UIs. They also collaborate with backend developers to show persistent data from the backend to users of the website.
Common technologies on the frontend are:
-> Javascript frameworks, such as React, Vue, Angular, are used to streamline the process of development
-> Browser APIs, such as Websockets, Fetch or WebGL
Backend developers
are responsible for the serverside. Since this is a broad term, I'll exclude system architect- and admin tasks to focus on the basic idea.
Backend devs are often specialized on one or few technologies. They're working closely together with architects and admins to design IT systems. At the same time, they're assisting frontend devs to bring data to the customer. Or collect and organize their data, respectively.
Common technologies are, only to name a few:
Modern technologies enable backend devs to outshore administrative tasks to third party services, such as Amazon Webservices (AWS) or Netlify. This again is a topic for its own.
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.
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.
In restaurant terms:
Frontend: the chef, waiting staff and front of house
Backend: the people who built the restaurant, plumbed in the gas and electric
Absolutely disagree.
Waiter is the http transport. They take a request (order) and return a result (food). They have no say in how the result is achieved
The chef is the web server. They take the request and pull together whatever resources are required to achieve the result. The chef is very definitely back end.
You can think of the maitre'd as a load balancer; they make sure that no one connection (waiter) is overloaded and limit the number of diners so that the chef is not burnt out by too many requests (DDoS)
What you described as back end is actually infrastructure and architecture. They are important but not necessarily relavent to this discussion
Well this is a new kind of disagreement π¨βπ³π©βπ³ - I have kids, didn't sleep well last night and I think I wrote this at 4am...
You think of it how you like thats alright by me. I can barely read your reply anyway π₯΄π
Im glad that atleast the idea served some inspiration and you whisked up another analogy
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.
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