Using a single page application like React has become the defacto standard for most web applications.
I realize this makes sense for JavaScript-heavy, interactive components but it feels like a majority would work perfectly fine with server-side templates, maybe even better since it’s way less overhead (talk about translations, validation, sync of backend routes and frontend client, etc.).
[+] [-] factorialboy|6 years ago|reply
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.
[+] [-] certera|6 years ago|reply
[+] [-] tony|6 years ago|reply
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.
[+] [-] BWStearns|6 years ago|reply
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.
[+] [-] macando|6 years ago|reply
[+] [-] jf22|6 years ago|reply
Nobody said we should remove all UI from applications.
[+] [-] jolmg|6 years ago|reply
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.
[+] [-] aphextron|6 years ago|reply
[+] [-] dmlittle|6 years ago|reply
Disclaimer: I work for Lob.
[+] [-] jklein11|6 years ago|reply
[+] [-] tobltobs|6 years ago|reply
[+] [-] muzani|6 years ago|reply
But there's definitely overhead, so I wouldn't do it unless necessary.
[+] [-] jklein11|6 years ago|reply
[+] [-] unknown|6 years ago|reply
[deleted]
[+] [-] stephenr|6 years ago|reply
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.
[+] [-] throwaway58295|6 years ago|reply