This is really great, and I'm really happy people are finally waking up to this. I've stuck with Django through all of this and never looked back. Nowadays with stuff like HTMX, things have never been better!
Could we do this for CSS-in-JS next please? With React 18 making a strong push for compiled CSS, we have libraries now that let you write CSS (compiled) using Typescript. This is also absolutely crazy to me because we COULD BE JUST WRITING CSS instead (especially with variable support).
CSS has been mangled so many different ways, including the loathsome Tailwind, that I can't imagine what a newb web dev has to plough through these days. Some of us with longer memories were overjoyed to see browsers finally adopting standards after the erosion of Microsoft's reign but now it appears we're intent on destroying the value of what we waited 15 years for. Fer Kreissakes just write raw, unadulterated CSS and enjoy your freedom from the CSS hacks that were unavoidable back in the late 90s/early 2000s.
Wow, I truly hope you are wrong. Non-scoped CSS where you have to come up with names for everything and that doesn't live right next to the markup in the same file as the component is the worst. The whole cascading part is also something I hope I never have to deal with again with conflicting styles being inherited and overridden all over the place. Just let me isolate everything and let me freely copy a component file with all styling included without relying on any global CSS.
Rails is probably the best framework still. But it still feels too low-level. I don’t want to care about the mountains of Web gunk there are: JSON serialization, HTTP methods, cookies, etc. Lack of static typing really hurts the maintenance story, too.
I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on.
Most web frameworks seem to be obsessed with the web platform to the point they feel more like glorified macros, leaking its web gunk everywhere.
Yes, but - if you don't understand how the web works and that it's made of HTTP and JSON and databases, you're probably going to find yourself trying to solve a problem you don't understand very quickly. I've always wanted to build a nice chair or cabinet, but I don't have the tools or the experience. It's not the tool's fault.
There is quite a lot of inherent complexity of web as a platform. If frameworks were any more abstracted they would be too brittle for a lot of use cases.
Btw, use Sorbet for Ruby static typing. It's very ergonomic.
Just write a function, use type hints to say what arguments it takes, and throw a decorator onto it. Very similar to fastApi but with the django framework behind it.
You should check out Wundergraph coupled with a backend framework to at least manage the database schema. Check out this video [1] it's so fast and nice.
This article is great, and it reminds me of a rant I've been wanting to make for a long time: why the hell does everyone these days insist on building every web app as an SPA?
I started my career in Rails. I'm sick of Rails these days as I've worked with it for long enough to become intimately familiar with its flaws; these days I'd pick Phoenix over Rails any day of the week. But still, I'd rather spend a million years with Rails than five minutes with most of the React SPA monstrosities I've had to work with recently.
I get it: if you want to build a super-complicated, dynamic front-end, there's only so much you can do with the classic Rails-style approach (server-side rendering of HTML templates with some vanilla Javascript, or perhaps jQuery, sprinkled on top). Once you get past a certain level of complexity I can understand the argument for having totally separate "frontend" and "backend" applications where the frontend is built with something like React and the latter renders nothing more than a JSON API.
But why, why, why has the entire industry seemingly decided that the latter, complex approach is the default, perhaps even the only, way to build a web application? The last four companies I've worked for all used the "separate FE/BE" approach for every app, and at all four companies it was a terrible, unnecessary choice that added exponential amounts of complexity and slowed development to a crawl for no discernible benefit. Time and time again I'd get frustrated because the most simple, basic features would take ridiculously long to finish, be a nightmare to test, and be full of infuriating little subtleties and footguns that made the implementation fragile as an eggshell. Even something as simple as adding a <form> would take ten times longer than I knew it would have taken me in Phoenix or Rails.
And yet when I try to explain that I don't think we need the "separate FE/BE" approach for the task at hand, people look at me like I've suggested we don't need electricity. It's all they've ever known and they can't imagine there might be a better way, or at least one that isn't so agonisingly, pointlessly complex. What's happened to the industry? Why has web development become like this?
Companies are already used to hiring frontend and backend separately, it is much easier to find an expert in either than an expert in both. It is also one of the few opportunities where you can meaningfully split up work. How much of an upside that really brings, is secondary. It already happened.
I do not buy into the YAGNI or in-most-cases arguments. Most cases are interactive applications, not the overengineered listicle websites that would be crap, even if they were not SPAs. If you write an interactive application, SSR will soon make your life miserable. The scrolling document approach to application UI sucks, especially on mobile.
Modelling your frontend as a bunch of reusable components is a big benefit of frameworks. I think it's hard to go half and half with frontend component and backend templating though.
Managing any (Literally any) client-side state is also easier with a framework. I'd rather use Preact than write vanilla JS for basic state management.
As someone that's new in the industry: nobody taught any other way. All during college it was Node/React/Mongo, or Node/Angular/Mongo. If I didn't spent some time on HN and learning about the rest of the tech I wouldn't know any better too.
I'll add to that that it's a bit intimidating to jump into Rails/Django/Spring/whatever today, they seem to have been getting more complex with time, and now when learning material is scattered between different versions. Also, having no occasion to do any of them professionally, it's a bit hard to know which one to pick, and take the time to learn them when I'm paid to know TypeScript and its last features.
How do you implement editable list of items where requirements are that:
- editing/creating new has to be in a popup
- people don't want full page reload because they lose context (and have "feel" it beeing slow even if it is not)
- edit-table is not a solution because amount of settings will fit popup
- some things like item name in a list has to be updated in the list after saving in popip which requires two way data binding, because cannot do page reload
- pagination and filtering is required and for same reason as above cannot be full page reload
I don't see how you implement that in a way that is maintainable with "sprinkling jQuery" on it.
I would like to build it with full page reloads which would be fast and would take away complexity but every business analyst or product owner I saw was saying that "users feel" it is slow and they lose context even if list has stable sort and filtering was kept between reloads.
There's a lot of programming propaganda that floats around and gets amplified that talk up the advantages of some approach. Often the advantages being discussed aren't even the outcome of the technology, they're just the goals of the technology. Said propaganda will also completely fail to include the disadvantages of the approach. The result is a whole bunch of people who will flock to the new tech, and only 2 or 3 years later will the real story start to come out. The tech usually does have legitimate uses, it's just those uses were niche rather than "everyone should do it this way".
A big recent non-web example of this is NoSQL databases. Endless hype about their advantages. Virtually no discussion about their disadvatages. (In relative terms. It was actually there in absolute terms, I know because I picked up on it. But it was buried for a couple of years in the hype.) Endless hordes of developers switching to them, and confirmation-biasing their way past the first few red flags. Do they have a niche? Yes. Were they massively, massively overused? Absolutely. I've seen projects killed by the choice to use them, and many others switch away from them in a tearing hurry because their systems were coming down around their ears. Would a lot more discussion of their disadvantages been helpful? Who knows. In the midst of a hype cycle sober engineering discussions become a form of betrayal or personal attack for a whole bunch of engineers who too-quickly incorporate the new tech into their personal engineering identity.
SPAs are the same way, and more generally, heavily REST-based backends. Is there a time and a place for them? Absolutely! Are they always the best default organization? Heck no. Do they come with a lot of costs that need to be accounted for with the benefits? Yes.
Stepping up to a stratospheric level of abstraction, outright philosophical astronautics here, I think one of the biggest mistake programmers make is to sit down at some technology decision in which one must weight the costs or the benefits, and implicitly without thinking about it, assign a flat ZERO to some tech's costs or benefits. Most often costs, though the latter can happen. Especially in their earlier years, though even older programmers can get caught up in a hype cycle if they're not careful. Costs are never zero. Benefits are effectively never zero because nobody talks about techs with no benefits at all.
I believe this is best explained with the saying “if all you have is a hammer, everything looks like a nail”. Say you came into tech after jQuery and the like. You know your SPA frameworks/libraries. Maybe you are somewhat lazy at sniffing around for new trends/tech.
You are presented with a new challenge. What will you chose? The stuff you know you can do it with or something else entirely?
I'm working on a web framework in Ruby that works kinda like React/Preact but it's 100% server side, so you can write components declaratively as in React, but you don't need to have separate apps for your frontend and backend. I think it's can be a good approach for many types of apps.
follow the money to understand the decision making; it’s almost always locally rational for some situation that is non-local to you and typically is a higher dimensional problem than you assume.
a good place to start is to ask how the boss became the boss, given that the boss quality inevitably degrades to Dilbert
I've written frameworks, libraries, SDKs, APIs, and drivers.
Most are not frameworks. Frameworks are a lot of work to write and maintain.
The most painful part of writing a framework, is the "rubber meets the road" part, where I suddenly realize that all that TLC I put into developing Guiding Principles, Mental Models, Basic Philosophies, etc. ad nauseam, were for shit, because no one is using my marvelous tool, the way I expect[0], and no one is oohing and ahhing over my masterful implementation. That ends up as a huge smorgasbord, serving a lot of Crow, Egg On Face, and Humble Pie.
> Amal sits down for a one-on-one with Alex Russell, Microsoft Partner on the Edge team, and former Web Standards Tech Lead for Chrome, whose recent post, The Market for Lemons, stirred up a BIG conversation in the web development community.
> Have we really lost a decade in potential progress? What happened? Where do we go from here?
I like using `rails middleware` as an example because it's true, tons of things in that list are important.
A good example of this is: Rack::MethodOverride
Try making your non-JS server rendered view functions and HTML form submissions handle PUT, PATCH and DELETE. Depending on which lightweight alternative to Rails you're using this can become very tricky and you end up spending an entire day of Googling and maybe finding a questionable solution instead of having that available without thinking about it.
Say it isn’t so! :-D Just as an example: When was the last time you read about Angular on the HN frontpage? Basically last decade. Does that mean nobody uses Angular? Hell no. It is extremly widely used by big-ass corps. It’s just that their devs generally aren’t in the HN crowd.
What companies do, what their support cycles are and how conservative their tech leaders are is an extremely heavy influence on the programming languages, frameworks and libraries they will use. You can research in advance and adapt your expectations.
Or they have invested so much into some JS "framework" (most likely React) that they are heavily biased to get this to work properly. Same thing happened at the previous place I worked at.
This made me lol and maybe I misunderstood but, what?
Only once in my career I've come in on a fairly mature project that was, for the most part, done The Rails Way (TM). The code did its boring job quite well and every new place I looked I was able to understand and find things very quickly.
On the flipside, people can definitely lean too much into a framework in cases where it doesn't work and leave a mess, so it it's definitely a fine balance of knowing when to break from convention.
But I have a hard time sympathizing with people who use a framework and break a bunch of its conventions for no other reason because they think they know better (ie, without even trying to make it work). Even if they are among the rare breed who write good documentation, a lot of frameworks out there have really good documentation I've already read. We're just making web apps here, people.
I dislike frameworks for the same reason most of their proponents like frameworks, you can not expect to out-compete all the smart people working together on a common goal. Frameworks are bad at cultivating off-colour ideas, they tend to have a well curated API but are often stuck with a singular architecture. Sometimes the solution is to be found in some lateral dimension. One such example is PostREST, it does away with 80% of API boilerplate by inferring the API from the database schema using functional programming magic. You sort of have to become a Postgresql wizard to get everything out of it, but I feel that this knowledge is somehow more valuable than yet another backend framework.
That would rule out almost all server side templating systems, and most non-JSX client side ones (svelte, vue and angular all involve it to some extent) so I don't think that's quite right.
I think maybe you've misread the author talking about the fact that most server side templating systems are fundamentally fancy ways to concatenate text as meaning writing the literal text concatenation yourself without having a library do it for you?
> So half of this blog post has actually been sitting on my drive for a couple of months because I’ve had a good long sad about the distressingly low bar we’ve set for something to bill itself as a Framework. I suppose this is partly because we’ve never really agreed about what constitutes one, and spoiler alert I don’t have a proper working definition either. But let’s get this out of the way first: React is not a framework.
I never got why people care about the difference between a library and framework and try to categorize these offerings, especially when we don't even have meaningful definitions. The way I've seen it, you're usually going to have one front end "base thing" and build everything around it - be it Vue, or React, or Angular, or Svelte, or jQuery, or Next.js, or Nuxt, or JSF, or Vaadin, or Laravel's Blade templates, or the Rails equivalent etc.
In some cases, it will try to provide everything out of the box, in other cases you're going to integrate a bunch of other stuff to do what you want, but you're rarely (at least in my experience) going to have something like React combined with Vue, or Vue with Svelte in the same site, which is sometimes touted as one of the advantages of libraries. I think I can recall one micro frontend project in my past like that. Furthermore, I've seen very few cases where integrated libraries are ever swapped out for something else once there's lots of code written against them, so they get coupled with the rest of the codebase regardless (unless you're really good at establishing boundaries/abstractions), so that's another supposed advantage that doesn't always pan out. And even when you use most of the frameworks out there, you still need to think about UI components and such, of which there are many libraries to integrate with your framework, so you still need additional bits introduced.
It's almost like saying "Next.js acts 75% like a framework, whereas React only provides 25% of what you'd need for a full batteries included experience and therefore will mostly be treated as a library on its own." Silly way of framing it, I'll admit, but the end result will most likely be the same - one big repo of front end code (possibly a sub-folder), regardless of how many packages it's made up of. Just pick a group of solutions that fit your architecture of choice: Laravel, Rails and Django front end offerings are all good for SSR, whereas for SPAs just pick things depending on how much of an integrated experience you want, anything from Nuxt to barebones Vue, with libraries imported based on needs.
Personally, I like the benefits of SSR (how integrated development can feel, easy to reason about), but I dislike the coupling and how you eventually will need to upgrade "the entire thing", which might be a big rewrite (e.g. moving from Spring to Spring Boot, or upgrading Rails/Laravel projects across major versions). I like the ability to throw away and replace SPAs if the need presents itself (AngularJS, anyone?) and the clear decoupling thanks to the API (running the old and new thing side by side is nice for dev). Oh, also SPAs lend themselves nicely for build parallelization, but have the downside of two deployment units (e.g. separate front end and back end containers/packages). Solutions that give you most of what you'll need are great, but only for as long as you don't have to fight against them due to needing to do something different.
The usual heuristic I've encountered is that a library is something where your app code uses it and asks it to do things, and a framework is something where your app code hands off top level control and the framework asks your app code to do things.
Whatever you think of that terminology, I think the majority of available things you can use do fall substantialy into one or other of those categories and the difference in working style while using them is a distinction worth being aware of.
[+] [-] darkhorse13|3 years ago|reply
Could we do this for CSS-in-JS next please? With React 18 making a strong push for compiled CSS, we have libraries now that let you write CSS (compiled) using Typescript. This is also absolutely crazy to me because we COULD BE JUST WRITING CSS instead (especially with variable support).
[+] [-] cutler|3 years ago|reply
[+] [-] Kiro|3 years ago|reply
[+] [-] di4na|3 years ago|reply
I think a huge reason the js crowd got away with the "better DX" spiel is because CSS got left on the side.
So doing it CSS-in-JS allowed to paper over the CSS painpoint for componentisation and composition.
If you look at it this way, Tailwind make sense. Because what it gives you is mixins and variable. Just... Mixins in html `class`
[+] [-] mattgreenrocks|3 years ago|reply
I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on.
Most web frameworks seem to be obsessed with the web platform to the point they feel more like glorified macros, leaking its web gunk everywhere.
[+] [-] Jgrubb|3 years ago|reply
[+] [-] ZephyrBlu|3 years ago|reply
Btw, use Sorbet for Ruby static typing. It's very ergonomic.
[+] [-] traverseda|3 years ago|reply
>I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on.
Not really sure what you mean, but django ninja? https://django-ninja.rest-framework.com/
Just write a function, use type hints to say what arguments it takes, and throw a decorator onto it. Very similar to fastApi but with the django framework behind it.
[+] [-] arrowsmith|3 years ago|reply
[+] [-] nazka|3 years ago|reply
[1] https://www.youtube.com/watch?v=m3YrZav5-CU
[+] [-] arrowsmith|3 years ago|reply
I started my career in Rails. I'm sick of Rails these days as I've worked with it for long enough to become intimately familiar with its flaws; these days I'd pick Phoenix over Rails any day of the week. But still, I'd rather spend a million years with Rails than five minutes with most of the React SPA monstrosities I've had to work with recently.
I get it: if you want to build a super-complicated, dynamic front-end, there's only so much you can do with the classic Rails-style approach (server-side rendering of HTML templates with some vanilla Javascript, or perhaps jQuery, sprinkled on top). Once you get past a certain level of complexity I can understand the argument for having totally separate "frontend" and "backend" applications where the frontend is built with something like React and the latter renders nothing more than a JSON API.
But why, why, why has the entire industry seemingly decided that the latter, complex approach is the default, perhaps even the only, way to build a web application? The last four companies I've worked for all used the "separate FE/BE" approach for every app, and at all four companies it was a terrible, unnecessary choice that added exponential amounts of complexity and slowed development to a crawl for no discernible benefit. Time and time again I'd get frustrated because the most simple, basic features would take ridiculously long to finish, be a nightmare to test, and be full of infuriating little subtleties and footguns that made the implementation fragile as an eggshell. Even something as simple as adding a <form> would take ten times longer than I knew it would have taken me in Phoenix or Rails.
And yet when I try to explain that I don't think we need the "separate FE/BE" approach for the task at hand, people look at me like I've suggested we don't need electricity. It's all they've ever known and they can't imagine there might be a better way, or at least one that isn't so agonisingly, pointlessly complex. What's happened to the industry? Why has web development become like this?
[+] [-] incrudible|3 years ago|reply
I do not buy into the YAGNI or in-most-cases arguments. Most cases are interactive applications, not the overengineered listicle websites that would be crap, even if they were not SPAs. If you write an interactive application, SSR will soon make your life miserable. The scrolling document approach to application UI sucks, especially on mobile.
[+] [-] cutler|3 years ago|reply
[+] [-] ZephyrBlu|3 years ago|reply
Managing any (Literally any) client-side state is also easier with a framework. I'd rather use Preact than write vanilla JS for basic state management.
[+] [-] Zababa|3 years ago|reply
I'll add to that that it's a bit intimidating to jump into Rails/Django/Spring/whatever today, they seem to have been getting more complex with time, and now when learning material is scattered between different versions. Also, having no occasion to do any of them professionally, it's a bit hard to know which one to pick, and take the time to learn them when I'm paid to know TypeScript and its last features.
[+] [-] ozim|3 years ago|reply
- editing/creating new has to be in a popup - people don't want full page reload because they lose context (and have "feel" it beeing slow even if it is not) - edit-table is not a solution because amount of settings will fit popup - some things like item name in a list has to be updated in the list after saving in popip which requires two way data binding, because cannot do page reload - pagination and filtering is required and for same reason as above cannot be full page reload
I don't see how you implement that in a way that is maintainable with "sprinkling jQuery" on it. I would like to build it with full page reloads which would be fast and would take away complexity but every business analyst or product owner I saw was saying that "users feel" it is slow and they lose context even if list has stable sort and filtering was kept between reloads.
[+] [-] epiphonium|3 years ago|reply
[+] [-] jerf|3 years ago|reply
A big recent non-web example of this is NoSQL databases. Endless hype about their advantages. Virtually no discussion about their disadvatages. (In relative terms. It was actually there in absolute terms, I know because I picked up on it. But it was buried for a couple of years in the hype.) Endless hordes of developers switching to them, and confirmation-biasing their way past the first few red flags. Do they have a niche? Yes. Were they massively, massively overused? Absolutely. I've seen projects killed by the choice to use them, and many others switch away from them in a tearing hurry because their systems were coming down around their ears. Would a lot more discussion of their disadvantages been helpful? Who knows. In the midst of a hype cycle sober engineering discussions become a form of betrayal or personal attack for a whole bunch of engineers who too-quickly incorporate the new tech into their personal engineering identity.
SPAs are the same way, and more generally, heavily REST-based backends. Is there a time and a place for them? Absolutely! Are they always the best default organization? Heck no. Do they come with a lot of costs that need to be accounted for with the benefits? Yes.
Stepping up to a stratospheric level of abstraction, outright philosophical astronautics here, I think one of the biggest mistake programmers make is to sit down at some technology decision in which one must weight the costs or the benefits, and implicitly without thinking about it, assign a flat ZERO to some tech's costs or benefits. Most often costs, though the latter can happen. Especially in their earlier years, though even older programmers can get caught up in a hype cycle if they're not careful. Costs are never zero. Benefits are effectively never zero because nobody talks about techs with no benefits at all.
[+] [-] fuzzy2|3 years ago|reply
You are presented with a new challenge. What will you chose? The stuff you know you can do it with or something else entirely?
[+] [-] quechimba|3 years ago|reply
[+] [-] dustingetz|3 years ago|reply
a good place to start is to ask how the boss became the boss, given that the boss quality inevitably degrades to Dilbert
[+] [-] ChrisMarshallNY|3 years ago|reply
I've written frameworks, libraries, SDKs, APIs, and drivers.
Most are not frameworks. Frameworks are a lot of work to write and maintain.
The most painful part of writing a framework, is the "rubber meets the road" part, where I suddenly realize that all that TLC I put into developing Guiding Principles, Mental Models, Basic Philosophies, etc. ad nauseam, were for shit, because no one is using my marvelous tool, the way I expect[0], and no one is oohing and ahhing over my masterful implementation. That ends up as a huge smorgasbord, serving a lot of Crow, Egg On Face, and Humble Pie.
[0] https://www.theonion.com/bantu-tribesman-uses-ibm-global-upl...
[+] [-] howaboutnope|3 years ago|reply
https://changelog.com/news/web-developments-lost-decade-LWao
> Amal sits down for a one-on-one with Alex Russell, Microsoft Partner on the Edge team, and former Web Standards Tech Lead for Chrome, whose recent post, The Market for Lemons, stirred up a BIG conversation in the web development community.
> Have we really lost a decade in potential progress? What happened? Where do we go from here?
[+] [-] nickjj|3 years ago|reply
A good example of this is: Rack::MethodOverride
Try making your non-JS server rendered view functions and HTML form submissions handle PUT, PATCH and DELETE. Depending on which lightweight alternative to Rails you're using this can become very tricky and you end up spending an entire day of Googling and maybe finding a questionable solution instead of having that available without thinking about it.
[+] [-] christophilus|3 years ago|reply
[+] [-] johnteller|3 years ago|reply
Either my country is just behind or what you read on hackernews is not reflective of the real world.
[+] [-] fuzzy2|3 years ago|reply
Say it isn’t so! :-D Just as an example: When was the last time you read about Angular on the HN frontpage? Basically last decade. Does that mean nobody uses Angular? Hell no. It is extremly widely used by big-ass corps. It’s just that their devs generally aren’t in the HN crowd.
What companies do, what their support cycles are and how conservative their tech leaders are is an extremely heavy influence on the programming languages, frameworks and libraries they will use. You can research in advance and adapt your expectations.
[+] [-] fredrikholm|3 years ago|reply
[+] [-] darkhorse13|3 years ago|reply
[+] [-] imetatroll|3 years ago|reply
[+] [-] sodapopcan|3 years ago|reply
Only once in my career I've come in on a fairly mature project that was, for the most part, done The Rails Way (TM). The code did its boring job quite well and every new place I looked I was able to understand and find things very quickly.
On the flipside, people can definitely lean too much into a framework in cases where it doesn't work and leave a mess, so it it's definitely a fine balance of knowing when to break from convention.
But I have a hard time sympathizing with people who use a framework and break a bunch of its conventions for no other reason because they think they know better (ie, without even trying to make it work). Even if they are among the rare breed who write good documentation, a lot of frameworks out there have really good documentation I've already read. We're just making web apps here, people.
[+] [-] frupert52|3 years ago|reply
[+] [-] KrugerDunnings|3 years ago|reply
[+] [-] mattgreenrocks|3 years ago|reply
And then you get yelled at if you try to improve on it, because it is a best practice. :)
[+] [-] revskill|3 years ago|reply
What ? It's in 2023, you don't want to concanate text ?
[+] [-] mst|3 years ago|reply
I think maybe you've misread the author talking about the fact that most server side templating systems are fundamentally fancy ways to concatenate text as meaning writing the literal text concatenation yourself without having a library do it for you?
[+] [-] ziftface|3 years ago|reply
[+] [-] eximius|3 years ago|reply
(But not Web Components, those... Those are not good.)
[+] [-] hokumguru|3 years ago|reply
[+] [-] KronisLV|3 years ago|reply
I never got why people care about the difference between a library and framework and try to categorize these offerings, especially when we don't even have meaningful definitions. The way I've seen it, you're usually going to have one front end "base thing" and build everything around it - be it Vue, or React, or Angular, or Svelte, or jQuery, or Next.js, or Nuxt, or JSF, or Vaadin, or Laravel's Blade templates, or the Rails equivalent etc.
In some cases, it will try to provide everything out of the box, in other cases you're going to integrate a bunch of other stuff to do what you want, but you're rarely (at least in my experience) going to have something like React combined with Vue, or Vue with Svelte in the same site, which is sometimes touted as one of the advantages of libraries. I think I can recall one micro frontend project in my past like that. Furthermore, I've seen very few cases where integrated libraries are ever swapped out for something else once there's lots of code written against them, so they get coupled with the rest of the codebase regardless (unless you're really good at establishing boundaries/abstractions), so that's another supposed advantage that doesn't always pan out. And even when you use most of the frameworks out there, you still need to think about UI components and such, of which there are many libraries to integrate with your framework, so you still need additional bits introduced.
It's almost like saying "Next.js acts 75% like a framework, whereas React only provides 25% of what you'd need for a full batteries included experience and therefore will mostly be treated as a library on its own." Silly way of framing it, I'll admit, but the end result will most likely be the same - one big repo of front end code (possibly a sub-folder), regardless of how many packages it's made up of. Just pick a group of solutions that fit your architecture of choice: Laravel, Rails and Django front end offerings are all good for SSR, whereas for SPAs just pick things depending on how much of an integrated experience you want, anything from Nuxt to barebones Vue, with libraries imported based on needs.
Personally, I like the benefits of SSR (how integrated development can feel, easy to reason about), but I dislike the coupling and how you eventually will need to upgrade "the entire thing", which might be a big rewrite (e.g. moving from Spring to Spring Boot, or upgrading Rails/Laravel projects across major versions). I like the ability to throw away and replace SPAs if the need presents itself (AngularJS, anyone?) and the clear decoupling thanks to the API (running the old and new thing side by side is nice for dev). Oh, also SPAs lend themselves nicely for build parallelization, but have the downside of two deployment units (e.g. separate front end and back end containers/packages). Solutions that give you most of what you'll need are great, but only for as long as you don't have to fight against them due to needing to do something different.
[+] [-] mst|3 years ago|reply
Whatever you think of that terminology, I think the majority of available things you can use do fall substantialy into one or other of those categories and the difference in working style while using them is a distinction worth being aware of.
[+] [-] butz|3 years ago|reply