frontend development is over-complicated.

twitter logo github logo ・1 min read

I'm never convinced that React, Redux, Vue, etc made frontend any better.

I find they have a niche use case and they aren't The Silver Bullet of frontend development.

Other than that they aren't as productive as rails, Django based monoliths.

thoughts?

twitter logo DISCUSS (18)
markdown guide
 

I've never understood our industry's obsession with focusing on tools instead of problems. React, Redux, Vue, Rails, Django, etc. are solutions to problems, but I don't think the majority of the people using them even know the problems they solve - much less alternative methods of solving the same problem.

 

Absolutely agree. I miss the old days when I could simply write some HTML, include a .js and .css file, include a couple third-party scripts like Bootstrap and jQuery, and BAM! That's all you need to get started.

Nowadays, first you need to install yarn or npm. Then pick a frontend framework to work with. Once you have that, make all the components and layouts you need. Then once you have webpack and all its loaders setup, you can write some HTML. But wait! All the cool kids are using preprocessors. Let me modify my webpack build to use pug-loader. Oh, and sass-loader, too. Ugh, wait... shouldn't I be using TypeScript...?

 

I miss the old days when I could simply write some HTML, include a .js and .css file, include a couple third-party scripts like Bootstrap and jQuery, and BAM! That's all you need to get started.

Not old days if you ask me. You can still do that today.

And something many forget is, those extra extra files generated by frameworks on setup is, you guessed, for the framework, not the developer.

So the framework I use, after generating my project, from a single command line, I go into where I wanna create my .ts and .css and .html, and start writing code. That's it.

It's easy to think the old ways were better. In some cases, yes, for hello world projects. But for big scale applications, frameworks ensured a consistent way of doing things.

 

and then comes the hooks update 🤯 and all you're code is not that shiny and modern

 

One overlooked benefit of these frameworks is that they encourage people code in a certain way, which makes other people's life easier when maintaining it.
If the framework rules and conventions have been followed, everybody knows what to expect and where to find stuff.
Of course, some of these frameworks are short lived or change too fast, but the effect is still there.

They're far from coding standards, but can help in the same way.

 

Good point, and a big driver for other non-frontend frameworks such as Spring, Spark or Docker - everyone knows where to look and understands the shape of the source.

I also think that these 'opinionated' approaches encourage good practice (apart from EJBs - there has to be one black sheep in the family), embodying well thought-out design patterns and providing examples of problems they address.

 

In some ways front-end dev is complicated. I think a lot of the reasons is because javascript is much much faster than it used to be and it has enabled us to make fantastic software that was simply impossible before modern JIT js compilers.

As a response we have made websites much more reactive and complicated. When we complicate things we try to find ways to organize them and make it easier to manage. Thus the frameworks were born to solve the problem of creating very dynamic sites. Additionally things like webpack were born to bundle your code, to write code in modern ways for old browsers, etc.

Do you need anything but handwritten css and vanilla JS to make a front end work? Definitely no, you dont need it. Once your site become less of a medium to display things and more of an application to do things then the frameworks and such become much more useful.

So is front-end really over complicated or are we, as developers, using more complicated tools than the job requires?

 

In my opinion we are using more complicated tools than the job requires.

 

Yes. And that wouldn't be the fault of the tools. The one wielding the tools is to blame.

Me using a chainsaw to cut a piece of leaf doesn't make the chainsaw "overcomplicated"

I'm wrongly using the right tool for the wrong job. Just like I wouldn't wanna cut a tree log with a hand blade, I wouldn't try to cut a single leaf with a chainsaw.

I think as developers, we've abused our toolsets, thus making our tools appear the bad guy

 

And what if we write in pure HTML, CSS & JavaScript?

 

Let's not forget that's exactly where we came from. We used to write in pure Javascript. Today, it's Typescript. But HTML and CSS are still in their pure state, for the most part

 
 

It's exactly as you say. There is no such thing as as a tool suited to everyone and every use case. Each is good at certain things and sacrifice certain other things.

One of the more irritating things, I think, that so-called "modern" front end developers are missing about the "traditional" separation of concerns between JavaScript, HTML, and CSS is that each language is, in fact, designed for and suited to certain concerns that DO change independently of each other in a UI. And some of those concerns (particularly the semantics and presentation) need to be contributed to by designers, copywriters, accessibility experts, etc. It is neither scalable nor egalitarian to make everything go through traditional programmers as gatekeepers.

Somewhere along the way, people got so fed up with HTML in particular not keeping up with providing for what was being repeatedly built that they decided the big problem was that separation of concerns existing instead of components that combined all three. The former is understandable and the latter isn't wrong, but it's not the complete picture, either. Just look at what's happening in those frameworks over the course of only a few years: that scoffed-at separation of concerns is being reinvented in various non-standard ways.

But in the meantime, several generations of developers have been taught nothing but frameworks and scorn for the web platform. Who would, in this climate, be willing to take the risk of leading evolution in the platform?

The JavaScript framework community in particular likes to play the victim about this. Oh, the web gatekeepers made fun of React as spaghetti code and said it would never work. All the while apparently oblivious to their own hypocrisy given their own disdainful attitudes toward the work-in-progress of the web. In full view of and often aimed at living people who were still working to solve the very problems the framework devs were anxious about.

The one no-go thing for the platform is doing away with HTML and CSS and doing everything with JavaScript. For dozens of reasons published about endlessly over the last 30 years and easily learned unless you're the type of person who thinks they know everything already. But, no, surely the platform developers were out of touch fat cats and the framework developers were the wunderkind. Framework developers were not making any trade-offs inappropriate for the platform level at all, no sir! People eat this crap up and I'm sick to death of it, as you can surely tell.

But these frameworks could make web development better. They already have for many people. That's just a fact. But they're short term solutions that need to make their way into the platform in a way that works in the platform. That's good for everyone, especially users.

I actually blame technology marketing for this problem the most! Developer evangelism is a worthy cause, but it's also led to everyone talking like every tool is the next Coming of Jesus. That's good for no one.

 

instead of advocating for framework people should focus in making the platform better and more suitable for making apps.

Payments Api, Service Worker, Push Notification, Add to homescreen are good features that aim to make the platform better.

 

I think open source frameworks and libraries are a place to experiment with and mature ideas that will improve the platform. I also think they'll always exist, because there will always be new things we need after addressing the last batch. On top of that, I don't think everything can be provided for by the platform. There are all kinds of niches and domains that need attention and tools that wouldn't make sense for the platform. Not to mention people just have different preferences in developer experiences.

An issue as I see it is that it seems the majority of developers aren't great at figuring out which side of that line something is on. Or if not that, at approximating something that could translate more straightforwardly into one. It seems common to get caught up in the abstraction layer on top of the platform.

This is something browser vendors and web standards organizations should really focus on. It should be easier to learn what kinds of things could work, to pitch those ideas, to get actionable feedback, and so on.

As of now the very people that are most needed are alienated from making those contributions. I agree it's what's needed, but how does the industry get there from here?

 

I'm never convinced that React, Redux, Vue, etc made frontend any better.

It made frontend better, depending on how it was used.

It's all about the use cases.

None is better than the other. Just best for what they were designed for.

 
 

Yeah true people just love SPA for no reason :v

Classic DEV Post from Sep 29 '18

I've re-built my portfolio based on a Dribbble shot I found. What do you think?

I built a portfolio based on a dribbble shot I found, would love your feedback

Saurabh Sharma profile image
Web development | #javaScript #css #reactjs