Is Rails still relevant in 2018?
Apologies for the length here, but it seems like programming language and stack philosophy discussions simply require obscene amounts of length to produce fully-rational arguments. Trying to cut back invariably forces you to end the journey to philosophical truth with subjectively-felt emotion. Would appreciate feedback on what could be removed without compromising legibility.<p>Programmers generally overvalue the utility of a programming language to solve a particular <i>problem</i>, undervalue the utility of fine-grained knowledge of tools, and overvalue the utility of learning different paradigms.<p>We&#x27;re moving from Rails to NodeJS, while it&#x27;s not as drastic a change as, say, Rails to Python would have been, it&#x27;s a big enough change to where I can slowly, over time, come to understand the absolutely stark differences between the two ideals.<p>The first thing that hit me is there just isn&#x27;t the availability of third-party libraries in Javascript. We&#x27;ve had to re-implement functionality that we had gems for, first for pgsearch, second for CarrierWave, and I&#x27;m sure there&#x27;s others. We undertook a fairly significant search for JS libraries that could replicate the functionality, but failed, leaving us to spend 1-2 weeks to write a bare-bones JS implementation.<p>I wrote the PGSearch implementation, and it involved studying the Rails gem output and the Postgres docs and concatenating SQL fragments together in a composable way. Luckily it didn&#x27;t have to actually interoperate with Sequelize, that would have involved another week or two of work, the documentation on Sequelize is pretty far from Rails-caliber and I&#x27;d have needed to source dive from day one.<p>The second thing that hit me is the immaturity of the semantics of the language itself. When ES6 breaks, I simply don&#x27;t have bandwidth to figure out why, the project is just that new. Ruby never breaks, I didn&#x27;t even know that syntax and semantics of a production-quality general purpose programming language <i>even had failure modes</i>, that&#x27;s how solid Ruby semantics are. But I&#x27;m finding myself having to wrap my head around the concept of semantic breakage in ES6, with frightening frequency. One day I&#x27;ll isolate the root cause of what makes things like destructuring assignment fail to generate expected output, but right now workarounds are the order of the day.<p>I&#x27;m finding nothing really useful in those semantics that the team lead who made the nearly-unilateral decision to re-platform that are in any way interesting or even useful to spend time learning rather than just leveling up my standard library and framework understanding of Ruby and Rails. They just seem like hacky ways to do things that Rails already figured out clean approaches to solve.<p>NodeJS and React in particular seems to encourage weird separations from an OOP standpoint. Today I had the realization that routing is happening in both a centralized place, a dedicated, declarative routes file ala routes.rb, and more specialized routes in the controllers. This particular separation means that if I want to understand how a particular controller action is being routed, I must look in two locations rather than one, and if I&#x27;m starting outward trying to get in, I need to remember that the centralized declarations exist. When brought up, this was defended as &quot;it works.&quot;<p>Of course it <i>works</i>, what I want is flat, easy-to-traverse declarative trees of definition. Is there a way to get to that? Not without breaking the conventions of Restify. This is something I didn&#x27;t realize I&#x27;d come to lean on in Rails until it was gone. The semantics of modules in ES6 favor composition and discourage inheritance. A composed class in which the components live in a separate file than the parents needs special tooling so that you can understand the parent if all you have a reference to is the child. Otherwise you have to remember. JS fans seem to love to rely on memory.<p>Lack of clarity in the codebase forces me to use a debugging REPL to ascertain program behavior. This is another area in which no available JS-ecosystem tool even comes close to the power and utility of just dropping in a one line invocation into the codebase, cmd-tabbing over to the terminal or browser, then up-arrow and enter in case of the terminal, and cmd-r in the case of the browser to re-execute the code path, then immediately running commands in the context of the running application.<p>This fluidity appears to be impossible to find in Node, though browser debugging is mostly on par. I need it because I need to move the debugger around to ratchet closer to the source of the defect. Every extra keystroke matters. The three or so extra actions required in Node to get the debugger working is unconscionable, the sheer pain of it discourages a debugger workflow and relegates me to using logging statements, which, again, has a strictly worse standard framework implementation to Rails&#x27;. I could get into why, but this is way too long as it is.<p>It&#x27;s not that I want to work with Node the same way I work with Rails. I&#x27;d love to be able to appreciate the Node Way. It&#x27;s just that the Node way is cruftier and hackier.<p>This hell has me yearning to get back to the motherland. And I haven&#x27;t even touched the differences in the metaprogramming workflow, which could easily double the size of this comment.