Full Stack Development: Fussing over the FE
I’ve been building web apps for way too long and over that time, I have watched the division between Front end and Back end coding growing. The first good front end frameworks were a game changer as JS coding is a real pain, but as things have progressed, I started to see a push towards harder boundaries being put in place, and even situations where the front end is doing all the business layer processing. To me this is wrong.
I published an article on the use of HTMX, which many are happy with, but I still see a lot of push back because HTMX is not sticking to the idea of the back end framework sends data and the front end framework renders the pages. I mean what is wrong with rendering html snippets on the backend and sending them instead of serializing data into json and getting the FE framework to render the html and place it in the page.
In my opinion, the answer is, because we are breaking the rules over what the front end framework should be doing and what the back end framework should be doing.
Yet, I can’t help but think breaking this rule is a good idea, especially with how complex the front end frameworks have gotten. Web components are a great idea, but back end html rendering libraries could kinda do this before, soooo!! Then there is the whole compartmentalizing components, resulting in events flying all over the place and the need to have state managers added to allow the whole thing to work.
I think there needs to be a rethink on the whole front and backend thing. Do we really need a complex front end framework, storing data, rendering html, sending events between lots of different components, or do we need to simplify the front end. Take away the complexity. Make it easy to render a UI so we can get back to spending time ensuring we are dealing with the data and business requirements of an app. Instead, more and more of a projects budget is being spent on rendering the front end through frameworks, and thus data and business requirements are considered after thoughts when they should be front and center.
Yes, I understand the need for branding and a great looking layout. There will always be a need for that, but if your brand fails to deliver a workable product, your data is no good, or your apps fails to meet the business requirements, then what is the point.
I’m just going to put a call out there, to those starting new projects. Automatically adding a Front end framework to your tech stack is a bad idea. Does your App really need it? Would simpler solutions like native JS, Jquery, or HTMX do what you need WITHOUT the need for huge budget spends on a full Front end framework.
Stop going with the obvious and take a little time to think over what you really need and why.
