1- Companies understanding that a good user-interface is a must for their product. HN crowd are known for being anti-JavaScript, but modern web-apps are incredibly powerful and useful. This means you can't make your back-end developer glue together a JSP and call it a day anymore. So front-end overall is in high demand.
2- React helped standardize the way we do front-end. Yes Svelt, Vue and Solid are all great. But the ecosystem and the ability to hire from a large pool of talent without needing to train developers on your niche stack is a huge benefit.
3- React is easy to start, hard to master. When interviewing you'll likely be seeing a 10:1 ratio of boot-camp grads vs developers who have dealt with complex React apps at scale. This means an experienced React developer can ask for a higher salary.
Full agree. And further I think frontend complexity has grown quite a bit lately. People love to go on about framework churn etc. when it's just a difficult domain in general. As someone who used to have snobbish opinions on frontend work, I've completely come around since diving into it. For modern fullstack applications I believe the frontend often has more complexity to it than the backend.
Of course it does. The entire concept of 'state' doesn't even exist on the backend (okay, outside the concept of a user session, but then that barely adds any complexity; perhaps you use the user's ID and that's it). Frontend you've got to think about async calls, which automatically brings three states: loading, success, and error. You may have multiple of these calls and each combination of all of them leads to some crazy complex rendering. It's turtles all the way down if you're a junior (or to be honest, just a lazy dev), it's very easy to make a mess and abuse a library as flexible as React.
From my experience the better you can compose your components, the happier you'll be. And there's nearly always a dead simple way to design something even if from the outside the functionality seems very complex, like this for example: https://codesandbox.io/s/react-text-highlight-2h0kvu?file=/s...
I believe it's not really that frontend is more complex than backend. It's a matter of maturity.
My work involves more FE than BE nowadays and I do think FE is more challenging at the moment.
But it's mostly because all these problems are very new. FE never used to store a lot of state. Now that interactivity is expected, we do. Users expect polish so we add transitions. As we add more things, performance becomes something to keep in mind, and so on.
In a decade or so, I think these issues will be very trivial to solve. Standardized solutions will emerge. Browser support will get better and JS will improve (hopefully). We'll be solving entirely different class of problems.
It's what has happened to BE. Nowadays you can expect an ORM, a cache layer, and queue systems among others to be standard to any BE installation/framework. The traditional RDBMS in itself is a sight to behold. Imagine working on BE before these things became the default.
Many things are abstracted and a lot of people aren't even aware of them. For example, I don't know when's the last time I heard about SQL injection. They are all automatically handled.
> The entire concept of 'state' doesn't even exist on the backend
No. Are you saying e.g. TLS is not stateful? I don't even know where to start to give you more examples. Sorry but that came off really ignorant when you're trying to sell the idea that frontend is hard.
I'm speaking from an application level perspective (REST or GraphQL APIs and the like). Of course at deeper levels of networking there needs to be a concept of state. But the only reason I can think of somebody having to hand roll anything todo with TLS nowadays is that they are doing something very very specialized, or have gone down a very wrong path.
Though that did remind me, if you're doing websocket stuff I suppose there could be a considerable amount of 'state' to handle on the backend.
Funnily, I find one reason React gets adopted is that it looks the most like traditional desktop application UI programming, which is a benefit to large companies with workforces full of people who have written such apps in the past. It's only after you've already committed that you find out it doesn't get you out of needing to understand HTML and state persistence.
I would say that Frontend development in general (HTML+CSS) and the whole javascript ecosystem are a nightmare of patches on top of other patches, and endless exceptions and small components whose sole job is to plug some hole from a different technology under it. You need endless people and bruteforce to build on it and provide more value for the end user.
In comparison, Backend can turn bad sometimes, but a well designed, small Backend component can produce endless value and easy extensibility. I've never seen anything similar in Frontend.
As a frontend dev there are definitely well designed frontends. I've seen a lot of bad backends too. It just depends on how much engineers are able to plan ahead and also keep tech debt under control.
I dunno, I’d rather take a bad backend codebase than a bad front end codebase.
My job is moving completely to JS stack. The number of steps to build, number of packages to install, the cryptic errors… it is just depressing. Not to mention the resource hogging - we had to upgrade to 32GB RAM just to be able to do the basic stuff.
Maybe there are better ways to do JS that doesn’t suck this much. I dunno. I just wish I could write just backend code. Python, PHP etc have their shortcomings, but none of them are as annoying as JS
The differentiating factor to me is that backends can typically define the runtime they want to use, while frontends are beholden to run on what the user brings.
A backend from a decade or two ago can still run fine, because it defines what it runs on. It doesn't matter if CentOS 5 deprecated a feature the apps needs, we can run it on a CentOS 4 VM (not that anyone should).
Frontend feels like it has more churn because it can't define it's own runtime. If Chrome deprecates a feature, frontends have to adapt to that. Because frontends have to adapt to their runtime changing, it becomes important to use a framework that's currently supported. You can't keep running on Java applets, because browsers won't run them anymore. You can't keep running on RandomJSFramework if it stops getting updates, because features may get deprecated in the browser.
I think it has less to do with the average frontend vs backend dev, and more to do with the environment they operate in.
I see you point but I have to imagine the vast majority of frontend devs are targeting Chrome which is very stable. TBH in 11 years of FE dev I've never encountered anyone complaining about Chrome deprecating a feature that wasn't explicitly experimental. Now, some frameworks or libraries might do that, or may no longer be maintained; but I doesn't BE dev deal with this too?
I would say it's not so much about good or bad design, and more about which kinds of decisions, how many moving parts, and what consequences they have down the line. Like on backend you will have a choice of database, choice of language, and the design of the Schema/API, most of which are easy to detach and replace at some point.
While on Frontend from the beginning, specially i you are working with a team, you will have to make a lot of small decisions that can cause all kinds of trouble down the line:
- How you build the project, javascript transpilers and all that mess.
- Decide a CSS framework, or not use a framework and then decide on an internal style guide.
- Decide on a component library.
- Decide on how to handle state.
Or you can skip those above and use pure HTML+CSS+Javascript, but those usually end up as very spaguettified and idiosyncratic projects, I rarely see anyone even considering it unless it's a personal project. And for a good reason, the structure provided by component and state handling libraries reduces a lot of the inherent chaos that is structuring frontend web project. But each of those also comes with its own bag of new problems, and complexity that requires the developers to handle a lot of disparate information in their heads while working on a project.
I would argue that any HTML + CSS framework stack is inherently flawed once you move beyond the most basic of UI components.
I have yet to work on a React + Tailwind codebase in the wild where the margin/padding metrics aren't hardcoded and repeated across tens of different components. We've traded the elegance of well-written SCSS for improved developer ergonomics and faster build times because webpack is so slow at compiling stylesheet changes.
If you want to practise proper DRY for spacing, typography, etc. in a React app, you'll just end up nesting tons of components that ultimately result in needless complexity.
Then you haven’t seen my company’s codebase ;) this is where CSS in JS done well shines - you can use JS standard modules to handle all this code sharing. Choose the right abstractions - in my experience 90% of UIs can be expressed as sets of evenly spaced stacks of elements (horizontal or vertical) and if you export well thought out mixins that express that concept and your team understands why they should use them, you’re most of the way there.
> Like on backend you will have a choice of database, choice of language, and the design of the Schema/API, most of which are easy to detach and replace at some point.
This is absolutely not my experience. Every company I've worked at has had some long running back end tech debt, trying to swap out old tech.
Every problem you listed for the FE has a BE analog. Is it just that there are a lot of choices for FE tech? IMO that's a strength and not a weakness. There's also a clear leader in the tech for each part of the stack to choose to get something running quickly.
> Or you can skip those above and use pure HTML+CSS+Javascript, but those usually end up as very spaguettified and idiosyncratic projects, I rarely see anyone even considering it unless it's a personal project.
This is like saying you're seeing BE devs consider writing all their DB queries in raw SQL in a production system rather than use an ORM. Sure, it's done sometimes but most of the time it makes sense to use an abstraction layer.
Again, it's mostly whether or not engineers have the time to plan ahead and also update old code.
Imagine complexity and chaos are the same thing. But at least you got the bags of interesting new problems to play with. Job security etc it isn't all bad.
I think the vast majority of websites and apps are not "technically complex". The backend is generally close to a CRUD with a small amount of "special sauce". This makes UX the defining feature for most projects. This means that for the "average" company you will need more frontend than backend developers. React is by far the most popular frontend framework right now and provides a valuable lingua franca which provides a large talent pool.
More experienced devs are burning out and signing off from this crazy town. People after bootcamps trying to enter the market and making this carousel to spin even faster. Companies are looking specifically for Angular/React developers.
A lot of organizations bet the farm on React ~5 years ago because it was the cool new thing. It is very likely that many of the original developers have since moved on to the next cool new thing, and now companies need maintenance work done on their (now unwieldy) codebase.
Another reason: The trend today seems to be to offload most of the data processing to the client side, only using the server as a glorified database pipe. Naturally, this results in a higher demand for frontend development.
Except the cool new thing is still React, and we're all still here.
Folks are building products with great UX -> Clients use these products, want the same thing in their products -> Demand for frontend increases, repeat.
There's no question that it's still highly in demand, but as a user I despise React apps. Not that there's anything wrong with the technology - well-written React with minimal dependencies can provide a great and responsive UX.
In practise this rarely is the case. I have yet to use a React app that consistently respects Cmd+click as my intent to open something in a new tab, has sub-100ms draw times for any UI action, and doesn't need to load multiple megabytes of JS to bog down my CPU for basic CRUD stuff.
Of course I would prefer a native app, but I don't think it is unreasonable of me to expect a web app to:
- Respect the UI conventions of web browsers and not override standard behavior
- Respond immediately to user input
- Not take up hundreds of megabytes of RAM
I have yet to use a React app that doesn't immediately "feel" like it's using React. There's some weird added latency that I can't really describe, but I don't feel it on Angular apps.
Building UI is labor intensive. It involves a lot of functionality: the layout and display style of elements, binding those elements to data inputs and data display, and has to manage sending and receiving data from the server as well as possibly updating the “page” and it’s element’s outside of a page load cycle.
Unfortunately for the way we use the web, the frontend is not simply some two-way bound GUI, but is rather a remote folder browsing application that explicitly was initially designed with the page-load (or reload) as the only explicit mechanism for synchronization of state between the client and the server.
1- Companies understanding that a good user-interface is a must for their product. HN crowd are known for being anti-JavaScript, but modern web-apps are incredibly powerful and useful. This means you can't make your back-end developer glue together a JSP and call it a day anymore. So front-end overall is in high demand.
2- React helped standardize the way we do front-end. Yes Svelt, Vue and Solid are all great. But the ecosystem and the ability to hire from a large pool of talent without needing to train developers on your niche stack is a huge benefit.
3- React is easy to start, hard to master. When interviewing you'll likely be seeing a 10:1 ratio of boot-camp grads vs developers who have dealt with complex React apps at scale. This means an experienced React developer can ask for a higher salary.