I used to write Rails professionally for many years This comparison isn't a good one. Rails is an all-encompasing framework. If you compare Rails to something like Nest.js, there's not much you're missing. Nest is one of the best application frameworks I've used in any language, and it comes with all this stuff you say JS doesn't have. --- EDIT: To clarify (because it is confusingly named), NestJS is a framework mode…
Don't make me think, or why I switched to Rails from JavaScript SPAs
341–350 of 490 posts
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#342If you can easily switch to a framework like Rails from a SPA, it's probably a sign your app shouldn't have been a SPA. There's too much "defaultism" in our industry.
This and my sibling nailed it. Defaulting to a SPA is a terrible way to start web projects you would like to complete on time. But wait! Now your company has "front end devs" who you can't trust to touch your back end - better use React again to give these people something to do since JS is all they know.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#343Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#344Earlier quoted context omitted.
PHP hasn't been madness for a long time. One could argue Laravel (a RoR inspired framework) has become better than RoR.
I came here to say that, as someone who's used both Rails and Laravel. Basically it comes down to magical behavior, and the fact that Rails has way too much of it. Syntactic sugar and DSLs are maybe fine for rolling out new projects, but become burdensome on large codebases. I was on a large project and found myself in goto hell where I literally couldn't trace through the code. It was relying on every magic trick in…
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#345Earlier quoted context omitted.
As someone who came from other MVC frameworks outside of Ruby, learning Rails has been a cluster-f of searching through documentation circa 2013. The whole rails “convention over configuration makes it easier” is a load of bologna, because the only way to know the “convention” is to either have gone to a rails boot camp, reading the docs top to bottom, or maybe watching rails casts. The best way to work on rails is t…
"Reading docs top to bottom" is the answer to this frustration. It's strange that people don't think this is something they should do.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#346This is exactly the problem I am facing now! I thought picking up and building things with Vue should be a breeze but boy what a nightmare its turning out to be. There is so much room for improvement in the JS ecosystem.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#347Earlier quoted context omitted.
If you want to make an app from scratch, you must first understand the universe. This is a ludicrous approach for most. Sure, if you learn from reading and love to read technical manuals, go for it. But to imply this is the best way for most to learn is completely ridiculous.
"Best way to learn" seems too vague to have a productive conversation about. If your goal is to become proficient with a framework, then reading the docs top to bottom is probably a great thing to do, but if you merely want to hack together a one-off project over a weekend then it's probably not worth investing the time to exhaustively learn about all the features and paradigms of that framework.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#348What I've gathered, over the years, is that the people who dislike Rails because it makes a lot of decisions for them think they're just too cool for that. It insults their programming ability. OK, I can see that. So, go ahead; have it your way. But while you're still writing thousands of lines of boilerplate in both the front and back ends, and getting your types sorted out, I'm done with my app, and moving on to th…
My experience with big web frameworks - though I can't speak to rails in particular - is that everything is sunshine and rainbows until I veer a little bit off the standard path (or rail) and then it all becomes a nightmare. Where as if I'd done a little bit more myself up front, the thing is more resilient and can easily go where I want it.
Really happy to be wrong here, would love it if rails became my secret weapon. I'm a big ruby fan. But I'm sceptical.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#349The `create-react-app` project has existed for years, and gives you a standardized stack the bundles and boots with a single command. Rails 7 has abandoned JS bundling in favor of using somebody else's CDN. Have fun with that.
This isn't true. You can vendor your JS libraries and Rails will bundle them for you. It uses jsbundling-rails[1] to handle that.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#350Earlier quoted context omitted.
There are a lot of solutions out there where you can share your datatypes between the client and server now though, and it's great!
This comment would be more helpful with some examples. I’m personally very curious what the leading solutions are. I’ve worked with one involving GraphQL but that’s about it.
[0]: https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blaz...
[1]: https://fable.io/