Anyway my next venture will be as JS free as possible. I don't have JS, I love it. But that tribe is going thru an over-engineering cycle. Just like Java in the early 2000s.
It will all settle down, eventually.
I made some pretty scathing comments about React / SPA apps on HN before. I was insistent I could build an app with django templates + css + js. But in the end I ended up having to use webpack just to build SASS/JS, even if I spurned using a SPA app. So I never found a way to keep it with just jinja/django templates and css and ship a good experience.
If you're making a website that's differentiated enough to be noticed, most likely it'll end up needing the attention to detail a JS app brings. It's just hard to make UX scale without it: template includes are not composable - ES Modules + React components definitely are.
What changed my mind on SPA:
- TypeScript is really the thing that changed the game, because it shores up a very hard-to-scale, disorganized language ecosystem with an amazing type system.
- Webpack and babel getting somewhat stable in their APIs, as well as their extension/plugins
- React Functional Components / Hooks (cleans up a level of indentation and avoids that class cobwebs that can make maintenance a pain)
- Prettier: Excellent formatting tool
- JSX: Ends up making components very "HTML-like" and the formatting with prettier makes it feel like "blocks" where you can get a gist of the depth/hierarchy.
- GraphQL + Relay: The responses are code-generated into types and it automates retrieving data from the server. You can throw redux out. Which leads me to another thing - I consider redux an antipattern on most cases. Not fun at all to work with at scale.
I wish typescript / react / jsx / sass just worked from the browser itself, without all the webpack and babel, and these configuration files. I think maybe, after thousands of hours, I finally comprehend webpack. But in all likelihood I'm mistaken, and webpack 5.x will end up making me have to start over anyway.
If your team consists of mostly people who’re used to doing rails/Django style webapps then it’s perfectly reasonable to not build an SPA.
You do need an HTTP server if you want to offer an HTTP service.
> Heck, why don't we just let the users get what they want by giving them access to a SQL prompt.
I don't think any RDBMS has a sufficiently complex permissions system to accommodate the needs of a webapp.
> We could eliminate the UI completely.
Obviously, any user needs a UI to interact with any software, so I'm not sure what you're trying to say here. Your proposed SQL prompt is also a UI.
I feel you're trying to imply something here, but I'm at a loss as to what that is.
I don't think that comparison makes sense? ASP.NET and JSP are server side languages while React is client side.
Nobody said we should remove all UI from applications.
Disclaimer: I work for Lob.
But there's definitely overhead, so I wouldn't do it unless necessary.
If you’re a front end dev who wants to look important, making the entire application reliant on your fragile client side code can give a lot of hutzpah to your resume.
Personally I think SPAs have a time and a place - highly interactive web apps like google docs, facebook, slack etc. should definitely be SPAs. But using React to create a blog site is just ridiculous. Indiehackers.com is a perfect example of a site which would be so much better if it was a plain old statically rendered site. I remember a podcast where the founder of indiehackers said that he used React to build the site because he wasn't happy that the indiehackers business is not technical enough - so using react was a way making it more "techy" even though it actually makes the site worse (he didn't admit that part though). And thats fine for him as he is a solo-entrepreneur, but when developers working on teams take on that mentality it be extremely frustrating for the developers who would rather produce value than produce overly-complicated solutions in order to gain bragging rights.