I think the author went too deep into details here, as this crowd is full of people who are going to be able to rip pieces of this article to shreds. But doing so both misses the larger point and in the process proves it - Rails gave them a set of answers that are good enough so they don't need to delve deeper and can just focus on their app. Rails is not the only choice that does so. And people with broader skill se…
Sure. And I think what makes Rails and Django shine is they have sound default answers. I’ve yet to see anything in Node that feels like a stable 1:1 replacement. Next.js is excellent, but you still need to sort out a lot of pieces on your own.
Don't make me think, or why I switched to Rails from JavaScript SPAs
171–180 of 490 posts
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#172Earlier quoted context omitted.
Agree, and to go further (from the point-of-view of an outsider who is forced to do JS occasionally): * should I use npm or yarn? Why do I see most package authors recommending yarn when npm is the default as far as I know? * should I introduce Typescript to be able to handle complexity better? * which module system? I see lots of "require" VS "import", if it needs to work on browser/node.js/deno, which one?!?! * whi…
> * which test framework? Mocha? Karma? Jest? Cypress? Most of the dependencies you will install will have no tests at all anyways. This is another issue of its own, you are building on very weak foundations.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#173Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#174Earlier quoted context omitted.
Agree, and to go further (from the point-of-view of an outsider who is forced to do JS occasionally): * should I use npm or yarn? Why do I see most package authors recommending yarn when npm is the default as far as I know? * should I introduce Typescript to be able to handle complexity better? * which module system? I see lots of "require" VS "import", if it needs to work on browser/node.js/deno, which one?!?! * whi…
The answers to this in 2022: 1. Doesn't matter so much as long as you're using newest versions of either one. Newest yarn has plugin support which is neat. Npm has more stable backing and an open roadmap. Could be some considerations regarding monorepo support, but otherwise either is fine. 2. Yes 3. Use ES6 modules 4. Jest + Cypress 5. Vite
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#175Can't switch to Rails if you never bought the SPA hype in the first place
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#176Along with our artist platform, Dot Press: https://www.level.press/ (same developer, me :)
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#177Earlier quoted context omitted.
The issue I have with the JS world is that the most used libraries and frameworks are just "good enough for a small project" and no more than that. * Javascript has such a minimal standard library, you will need to get one or three third-party libraries to augment its core. * React is an excellent view library and nothing more. You will need to get one or three third-party system to turn it into a fully fledged web f…
Agree, and to go further (from the point-of-view of an outsider who is forced to do JS occasionally): * should I use npm or yarn? Why do I see most package authors recommending yarn when npm is the default as far as I know? * should I introduce Typescript to be able to handle complexity better? * which module system? I see lots of "require" VS "import", if it needs to work on browser/node.js/deno, which one?!?! * whi…
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#178SPAs are the "Google-scale" of frontend tech. YAGNI unless you are Big (or trying to fleece VCs). SPAs are useful where the latency and overall UX of a button press can be translated to some tiny % increase in a KPI through A/B testing, etc. Where you want to track user behavior down to a pixel & microsecond, and wrapping every element in JS is the only way to get there. This is frankly irrelevant to 99% of projects…
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#179Earlier quoted context omitted.
Have you tried to implement interaction-rich applications such as calendars or text editors with server-side rendering? You won't be able to recreate the UX an SPA can afford, regardless of revenue.
Yes, I have. With a proper backend language like Go it is trivial to manage concurrent WebSockets and arbitrary data across them.
Your original post says that this style of interaction only exists to "fleece VCs". But it seems you're doing that, with an additional added layer of complexity on top (namely the server-rendered pages).
I'm guessing you implement the interactivity with tags or something in your html/template templates, skipping the pain of npm and bundlers. I'm not sure that's the hard part of SPAs, though. Just an annoying one. The hard part is synchronizing the state of the frontend and backend over a communications channel.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#180Earlier quoted context omitted.
> * which test framework? Mocha? Karma? Jest? Cypress? Most of the dependencies you will install will have no tests at all anyways. This is another issue of its own, you are building on very weak foundations.
This is a pretty huge assumption.