A Response to You don't need a frontend framework

  Рет қаралды 4,207

wat the doodle!

wat the doodle!

Ай бұрын

In this session we respond to a KZfaq video titled "You don't need a frontend Framework" By Andrew Schmelyun.
Andrew is defending the position that server side rendering (SSR) is the best option for most web applications, we take a detailed look to see if the arguments presented by Andrew hold up to real scrutiny and if indeed SSR is still the best option.

Пікірлер: 60
@chopsueey
@chopsueey 14 күн бұрын
I think the whole discussion comes from the feeling that webdevelopment moves really fast and that there is always new stuff out there being worked on. Andrews view sounds a bit nostalgic, like: "back in the days, just HTML, CSS and JS ... don't need all this fancy new stuff, just plain and simple...". I suppose many people vibe with that, but that's not the whole picture. Sure, for a simple static site, just go with that, but if you want something bigger, you will need a more sophisticated approach, which may be more complicated (which is only natural), but less complicated compared to a big project that doesn't have a system and an idea behind it, so: big project (with a framework) vs. big project (without a framework) I mean a framework is basically the result of optimizing your project for something bigger, that's why they exist.
@MachineYearning
@MachineYearning 29 күн бұрын
It's crazy because we've been here before. We had anti-JS zealots years ago when JS was invented. Guess what, JS won because it made web applications much easier to develop and better for users. Now they're coming back and saying "well, just use a little javascript to sprinkle interactivity here and there." No, we tried that too. Anybody who tried writing complex applications with jQuery on server rendered pages knows it sucked. And it wasn't because developers sucked then. We tried the pattern, and it evolved into modern UI libraries like React and Vue
@someman7
@someman7 28 күн бұрын
Might you be speaking too broadly? For my part, I lament that we are still locked into JS.
@MachineYearning
@MachineYearning 28 күн бұрын
If I'm speaking broadly it's because it's broadly the truth. Sure there are exceptions. And we all know there are drawbacks with JS, I'll be the first to admit it. But the solution to that isn't going back to the same old design patterns we had 10-15 years ago and solved with JS component models. It would be like if we said "there are problems with cars" and the solution was to bring back horses. The reason it looks like such a convenient solution is because it's just regression.
@naughtiousmaximus7853
@naughtiousmaximus7853 11 күн бұрын
I think current solutions like Sveltekit are basically perfect.
@justafreak15able
@justafreak15able 29 күн бұрын
Why do people need a one solution for all? Can't people have a discussion and pick out best tools for their requirements? Isn't that why we are engineers ffs?
@watthedoodle
@watthedoodle 28 күн бұрын
This video response wasn't to say we need a single solution, you're absolutely correct we *should* use the right tool fort he job, and what I'm arguing is that SSR for web applications is *not* the right tool (for all the points covered). If however you don't have a web application and your site is static, then I wouldn't even SSR or SPA is the right tool in that case SSG would be the right tool.
@pinatacolada7986
@pinatacolada7986 29 күн бұрын
I've built the same complex app both in Vanilla js and Solid js. It took about 2 months to build in Vanilla js, but I used the jQuery and DataTables library to solve a lot of my problems. Without jQuery it would have taken me even longer. The app was functional but not great. Then I built the same app again using Solid js and it took just 2 weeks and had a lot of unexpected benefits like being able to build dynamic data tables without importing the library - and having pages retain large amounts of data without having to reload it every time the user navigates away and comes back. To achieve the same using jQuery you would have to hide/show entire pages and the code would get very messy and counter-intuitive very quickly.
@WoogleMovie
@WoogleMovie 7 күн бұрын
Using HTMX and some template engine can fix a lot of backend issues including spaghetti code. Then there is rendring part of the code and core api part that feches data. Also if the request header request Json then the api can return Json instead of Html. That way it works like rest service for mobile etc. Only reason where in client heavy application like games etc. This approach does not work well. But many applications are CRUD applications that can benefit from simplicity of operations. Specially when it come to user permission and roles implementation which backend is more close to in an application.
@jasonrooney1368
@jasonrooney1368 28 күн бұрын
I think you gloss over one of the biggest reasons: locality of data. SPA’s have the benefit of being able to leverage a client side cache which can feel far more responsive than needing to wait for a server response for every interaction.
@WolfieVenturi
@WolfieVenturi 28 күн бұрын
I really like your style of breaking down the trade offs in a relatively neutral way. Would watch more.
@watthedoodle
@watthedoodle 28 күн бұрын
Thank you for you kind words, I really appreciate it and it motivates me to create more stuff!
@codedbyshoe
@codedbyshoe 26 күн бұрын
A few points 1. Html over the wire scales just fine 2. You're missing the point that you are adding the complexity or reimplementing all of the server side logic on the client via redux, or vuex, etc.. this creates just as much spaghetti code ( i haven't seen an enterprise production app prevent this). 3. Building an app based on your needs now and adding api end point later is just fine. 4. (Opinion) i haven't seen something like Nextjs used at a large scale. I have seen Angular and React, and it was just as much as a mess.
@watchernode6138
@watchernode6138 29 күн бұрын
One more thing to say here is that. once you add the html blocks to PHP or Blade/Laravel view engine. It get very difficult to make changes to layout and design. your html markup and css classes gets scattered into different strings in those templates. You can easily further tweak the frontend in case of SPA or SSR with Nextjs. --- Practically SPAs - are only suitable for certain use cases like admin Section, or sites where content changes frequently. Because, SPA make it difficult for search engine crawlers, which results in bad SEO. SSR - Server Side Rendered sites are more suited for things like blogs, landing pages, ecommerce sites etc
@watthedoodle
@watthedoodle 28 күн бұрын
Very good point here regarding SEO, that is indeed on key legitimate criticism of SPA, there has been some solutions in this area, as you may already be aware there are solutions such as Nuxt and Next which can do isomorphic builds, but that's another rabbit hole!
@chad_giga6934
@chad_giga6934 Ай бұрын
If a philosopher becomes a programmer 😂 Great video man
@watthedoodle
@watthedoodle Ай бұрын
Thank you I'm glad you liked it! 👍
@ivan.jeremic
@ivan.jeremic 29 күн бұрын
yeah I don't get those html over the wire people, it is not flexible and there are reasons why we send data and over the wire.
@tbethenerd
@tbethenerd 28 күн бұрын
If i do computation on the server side, i can use more efficient languages then JS. Rendering a page in Go, Rust, hell even in JS can be much faster, then on the client side, as the server knows it templates for example. Besides that, you don't have to push the whole page. Look at HTMX. And if you "mash together" HTML and Data on the server side, you are doing it wrong.
@watthedoodle
@watthedoodle 28 күн бұрын
even with more efficient languages it still doesn't solve the problem (it may buy you a little more headroom but that's it). Inverting the entire things does, because now you're essentially doing distributed computing by offsetting the computation over to *each* client, that means it doesn't matter how many extra clients requests you have your computation becomes (Computation * Zero) which is always zero!
@tbethenerd
@tbethenerd 26 күн бұрын
@@watthedoodle I am not a designer or webdev by trait, I run that stuff. On a huge scale. And i do so since 20 years. I had customers, that moved to SPAs, and client side rendering. And guess what: The load difference on the servers where not measurable. But why is this so? Because rendering a HTML Template or crafting JSON from the same data does not have a large computational difference.
@watthedoodle
@watthedoodle 24 күн бұрын
@@tbethenerd they're are *not* the same, one is transformation of data representation that is only minor structural changes (see XML -> JSON etc), while rendering full templates, include full on conditional elements based upon expressions all of which is infinitely nested along with loops etc, these are not the same. For simple templates and at small scale the difference will not matter, but the principle can not be avoided, whatever that computational load is *will* be multiplied with every client you add, and by scale I mean the total concurrent RPS.
@steveoc64
@steveoc64 22 күн бұрын
​@@watthedoodlethis is where you start to go horribly wrong in your thinking Running data through a template to generate HTML is orders of magnitude less work than converting data to json The HTML template expansion can be done using no additional memory allocations. Transforming any data to json requires allocating strings for every element, converting numbers into strings, deallocation after use, etc You could roll out 100 HTML templates in the same number of clock cycles as doing 1 json payload
@bopon4090
@bopon4090 Күн бұрын
Nothing can match the component ecosystem of js framework. That thing alone is enough to not wanting to switch to server side rendering.
@yannick5099
@yannick5099 29 күн бұрын
Great video. I think many people are just frustrated with the current state of JS tooling, which is constantly evolving/breaking, fragmented, often slow and not simple to use. Meanwhile most of my backends from a decade ago probably still build and run (or require minimal migrations). If JS frontend dev would require a simple "js build --release" all the time and the same at every project much less people would complain. It's getting better with things like Vite or Bun, but still quite a bit to go.
@watthedoodle
@watthedoodle 28 күн бұрын
Thank you! Absolutely agree the JS fatigue is real and I have found Vite to be a breath of real fresh air, and that's the positive direction the ecosystem needs to move towards, I think I may do the next video into vite!
@1989DP3
@1989DP3 28 күн бұрын
5 min into video you do not provide any reasoning for why he is wrong, you just keep arguing that he does not know why, but if you know then explain it. Then it also seems you are ok with someone else abstracting the parts which renders json and stiches that on the front end, and that is perfectly fine. And sure if your product gets too big that you don't want to have large teams writing custom components for each and every item you serve to users that are running your webpage on various clients then it makes perfect sense to migrate to a framework that would help you do that more quickly and efficiently, but most websites out there are not that. They are not serving millions of users every hour, and what ends up happening when you visit these websites is you get an over engineerd bloatware that ends up using your entire memory just to animate the scoll into view. But that's just me
@watthedoodle
@watthedoodle 17 күн бұрын
I literally provided the reasons as to why he is wrong, please re-watch carefully. I re-iterated the points throughout the video as well. Almost everyone else has understood the points I raised against Andrew.
@SonAyoD
@SonAyoD Ай бұрын
Fanatic video! Great points!
@watthedoodle
@watthedoodle Ай бұрын
Thank you sir for the kind words, I'm happy you liked it!
@byrongibby
@byrongibby 28 күн бұрын
Freudian slip? Is it "Fanatic" or "Fantastic"? Lol
@byrongibby
@byrongibby 28 күн бұрын
Are you not missing the point that, in the paradigm you are critiquing, you only have to consider one copy of the application state - whereas with front-end frameworks you have to synchronise the front-end and back-end state? Also, I don't see why you can't separate the concerns (the data and view) on the back-end if that's what you want?
@watthedoodle
@watthedoodle 28 күн бұрын
you don't need to "synchronise" state, http is idempotent. You simply "fetch" the client specific state that you need as and when you need it. All state is localised client side and is specific to each client instance. For you second point, yes while you *could* potentially have that strict segregation and use internal data "APIs", you still haven't the computation tax issue.
@byrongibby
@byrongibby 28 күн бұрын
@@watthedoodle I will agree to disagree. Firstly, http is not necessarily idempotent, but even in the case that it is, state is not localised on the client side since you still have a database on the server side... when you update the server side database with an idempotent http method (let's say you DELETE a product listing), that change will in many cases, also need to be reflected on the client side, hence the need for synchronisation
@watthedoodle
@watthedoodle 28 күн бұрын
@@byrongibby that DELETE request can either succeed or fail. If it fails then no need to update the current client state, if it succeeds then you can safely remove that data point from the client side. In either case navigating between "pages" will automatically load the latest database state anyway. Unless you want 100% seamless realtime state view across all clients in which case you would need to either use WebSockets and push out an the latest data point upon edit/delete/new OR use something like long polling OR server push etc. But this reload will be EXACTLY the same for SSR, the difference being with SSR you would have to refresh the entire page, whereas with SPA you would only re-fetch the changed data set. So actually it still wins out in terms of overhead.
@byrongibby
@byrongibby 26 күн бұрын
@@watthedoodle I buy the argument that front end frameworks distribute the compute making it a more easily scaled solution, but to the point you just made - if you're using something like HTMX you aren't doing full page reloads. On the question of state, it has been my experience that you have your server side database, but you also have an in-memory database on the client. The DOM/view is updated as the client database changes - that seems to be a solved problem, the issue as I see it is comes from making sure the client side database and the server side database are kept consistent with each other. If you're saying that this is easy for you to do correctly that's fine, but I think a lot of people find it quite challenging.
@watthedoodle
@watthedoodle 24 күн бұрын
@@byrongibby why would it be challenging? as long as the database is the SSOT (Single Source Of Truth), then the Client is simply the presentation of that state. The client also makes request's *to* the database in order to request mutations. The data flow is well established here, there is nothing to "synchronise", at least that's how I approach the design and data flow.
@zlayatapka12
@zlayatapka12 Ай бұрын
Hey. Was interesting to listen, but I think you missed the point of the original video. Andrew shows that "some" projects actually can be done without frontend frameworks. People were creating websites using plain php since the beginning of the web to serve millions of users, and nowadays it's also can be maintainable in the long-term when using modern frameworks. The computation scalability theory does not hold strong here. What your video does not mention is the added complexity when you're using frontend framework. Build tooling, wiring this up, and maintaining, deployment etc in the long-term is very complex nowadays. More and more prior front-end frameworks reinventing the wheel and adding SSR again. Unless you have an investment or free human resources to deal with it, there is no "lie" to shift the added complexity to a later stage. 98% of the projects would never go past this stage and you're not Google to juggle dozens of moving pieces by your own.
@watthedoodle
@watthedoodle Ай бұрын
Sure I hear what you're saying, however I don't fully accept the "added complexity" part as that was one of the points raised by Andrew and what I'm suggesting is that in actual fact one doesn't even technically need a front end framework and yet still be able to fully do a SPA with ajax that doesn't rely on mashing the data and UI code on the server side. In fact you can watch my earlier video where I pretty much do that using Hono + Deno that has ZERO JavaScript build tooling, dependencies (client side) and zero frameworks, just raw JavaScript etc. Having built many modern production sites, I don't agree with this assessment that it's complex to maintain, are *some* frameworks overly complex? Yes that part I will absolutely agree with (I'm looking at you React!). But we shouldn't tar all frameworks with the same brush as that is unfair and incorrect. I would suggest that using Vite + Vue will be dramatically more productive than doing SSR, I know because I've done *both* commercially multiple times, and I know which one I pick every time and it's *NOT* SSR.
@tomitomion1179
@tomitomion1179 10 күн бұрын
90% of sites you use on daily basis are built with heavy frontends. What ppl was creating decades ago is not relevant anymore
@TheSysmat
@TheSysmat 25 күн бұрын
Yes good points, let he try to crate table as excel sheet on server
@hereallyfast
@hereallyfast 27 күн бұрын
You're wrong but, i respect your opinion
@Valiant600
@Valiant600 15 күн бұрын
I need a FE framework that brings food to the table!!!
@adrianspikes6454
@adrianspikes6454 17 күн бұрын
That is the old way of doing it but he is also not relying on anyone else...npm, etc and not many can deal with that BS! Never had an application that wasn't complex so i prefer frameworks like angular or blazor.
@thewiirocks
@thewiirocks 29 күн бұрын
"Single page applications are still the best option" - I'm afraid I have to disagree. I also disagree with Andrew, mind you. What you are describing is modern horizontal architecture. This separates the delivery of data from the delivery of the UI. In this case, HTML. Literally nothing prevents a multipage application from being effective. SPAs are only required if you need all interface to stay within a single view. e.g. If you are attempting to provide a desktop application type of experience. If you are providing a multipage experience, please STOP using SPA frameworks. It's too much complexity for too little return. I have found in practice that multipage implementations using jquery are faster to develop and provide a better experience over React or Angular in 80-90% of the cases. Which is easy to understand when you realize that 80-90% of the use cases in the wild are designed as multipage and then jammed into SPA.
@ivan.jeremic
@ivan.jeremic 29 күн бұрын
Single page applications are peak web dev.
@ghostinplainsight4803
@ghostinplainsight4803 29 күн бұрын
JQuery or more specifically shitty jQuery has cost the business I work for about $2,000,000 in developer pay fixing bugs over 10 years and it's only 12 unique pages with the home page, product listing, search and product page being the most complex. Some members on my team were tasked with "updating" the existing product page built in 6000 lines of jQuery spaghetti. They had 3 months. It took 9 months until the defect list grew larger than the actual tasks, then 16 months until the project was scrapped and they were both fired. They handballed it to me, I rebuilt the page in 4 months using Angular. It's been live for 9 months without any critical issues after release. Sure you could make a nice enough webpage/site with HTML and jQuery, but I've never actually seen it in the wild. There are no standards for it's use so different developers do whatever they feel like at the time, some use the revealing module pattern if you're lucky, some global objects, most just free functions in a massive file, generally just hacking exponentially to make things work. SetTimeout's everywhere to deal with race conditions, functionality that overwrites other functionality. Events that are never unbound except occasionally you will see `$el.off().on() It's hard to debug so average developers just hack on whatever they need to get a story complete. Modular componentised code that follows single responsibility as much as possible is always going to be the best solution, but more importantly having standardised practices for average developers to follow and documentation they can read is the biggest benefit to modern js frameworks.
@thewiirocks
@thewiirocks 29 күн бұрын
@@ivan.jeremic which is why everyone is so unhappy with them and the quality of most apps is terrible / rapidly declining? SPAs are "Peak" in the same way that server-side MVC frameworks were "Peak" 3-Tier. Both are bad ideas that caught on before the industry could actually evaluate the efficacy. By the time anyone realized they were bad ideas, everyone was doing them.
@scarlatum
@scarlatum Күн бұрын
To be honest, whenever I see all of that recommendations to use HTMX, they always demonstrated it through "A Simple Table Application", or sort of a 90's static developer blogs. And this is a main point of usage of it and I not gonna discourage that, but as a say, if you need to do some more complex UI behavior like seamless transitions between html templates, animations, or just simple UI changes that not account server state - HTMX can't handle that as simple as it does those "complex and gross" web frameworks... For me, HTMX niche always in that place, where Alpine.js and Petite-Vue exist right now, but it never gonna be alternative for something more heavy and complex. To summarize it, I just want to say, that all of that "Fanclub of a new shiny thing" guys, they see HTMX as a hammer for anything right now no matter what...
@Akronymus_
@Akronymus_ Күн бұрын
With HTMX, you can relatively easily embed a SPA for a single sub-route. (In my case, elmish). It's actually quite nice for a hybrid website.
@scdingundaroo
@scdingundaroo 27 күн бұрын
The claim that server side rendering of HTML doesn't scale is one of the dumbest most pig ignorant claims i have ever heard.
@watthedoodle
@watthedoodle 27 күн бұрын
At scale and at high RPS it does not scale sorry that's a simple fact. Given that SSR can mean having to re-render the entire page, this includes all the conditional logic and looping structures etc. Perhaps on the smaller scale it's negligible, but it really really isn't when you work at scale. And it turns out if you invert and delegate the computation to the client side that template computation goes to ZERO for the server side, and it's hard to beat zero.
@zulfiqrysaadputra
@zulfiqrysaadputra 19 күн бұрын
​@@watthedoodleHow many are we talking about here? I need some valid numbers argument. Depending on the interaction it does not need to be fully server-side, it could just be when doing action that is only changing data (yes small js libs can be use for interactivity) and at that point i would argue the lifting is done more on the database side, which is another topic on itself. On the other side, most large application relies on microservices to run their API, this is scalable. But most SSR application mentioned do their scaling the same way using pods, replicas, load-balancing, etc. Why can't we make the same argument? Either way people seem to forgot the DevOps side of things, there no ZERO computation, you are always doing it somewhere, does not REDUCE the amount of computation in any way. The example shown is of course on a small scale where they are in one place, which should not be done on a large scale application (still, how large are we talking). Either way both are complicated, and i agree it should not be simplified.
@watthedoodle
@watthedoodle 17 күн бұрын
@@zulfiqrysaadputra Because using client side rendering you wouldn't even **need** to scale the server side, that's entirely the point of CPU delegation.
@mikejohneviota9293
@mikejohneviota9293 Ай бұрын
just pick a framework and stick with it. raw html css js is a meh
@lzszl
@lzszl 29 күн бұрын
Right, I choose htmx 😂
@AlexGarcia-ir7fl
@AlexGarcia-ir7fl 7 күн бұрын
Spaghetti code?😂 Have you ever used a full stack framework template engine like Jinja2. Every component can now be it’s own html that can extend, include or append to a base base html template (with iterations and conditionals). Spaghetti code is any front end framework boilerplate.
@watthedoodle
@watthedoodle 6 күн бұрын
Yes I have used Jinja2 as well as many other template engines, front end frameworks also use templates in the form of composable render functions. So with respect your premise here simply doesn't hold.
Every Framework Sucks Now
24:11
Theo - t3․gg
Рет қаралды 122 М.
You don't need a frontend framework
15:45
Andrew Schmelyun
Рет қаралды 116 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 7 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 13 МЛН
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 9 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 134 МЛН
I DONT USE NEXT JS
54:01
ThePrimeTime
Рет қаралды 339 М.
Tech Employee Shares Video of Her Being Fired
1:54
Inside Edition
Рет қаралды 1,4 МЛН
A Review of the Anti Rust article by a Rust Engineer
23:43
wat the doodle!
Рет қаралды 2,4 М.
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 427 М.
Web Frameworks (And why you don't need one)
9:16
Destiny Hailstorm
Рет қаралды 8 М.
Be Careful Using Figma's New Features...
13:38
Theo Rants
Рет қаралды 21 М.
The Simplest Tech Stack
9:38
Awesome
Рет қаралды 52 М.
There's A New Browser (That ISN'T Chrome Based)
47:59
Theo - t3․gg
Рет қаралды 136 М.
Why I Don't Use JS Frameworks
11:09
Cukmekerb's Coding Class
Рет қаралды 3,8 М.
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 1,4 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 63 МЛН
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 138 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 12 МЛН