Live data from Hacker News

I Miss Rails

chanind.github.io

311–320 of 522 posts

Re: I Miss Rails

#311
post #102

> if the modern equivalent of Rails already exists, please let me know! You're in luck. Rails 5.2.3 was released 20 hours ago. More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? I find it a very productive framework. EDIT: If you're talking about missing a JS equivalent of rails, do you know about Loopback? https:/…

I think what the OP meant by 'modern,' was an equivalent of Rails that uses the technologies demanded by the tech industry today. On the one hand, the industry went to Python because a ton of data science libraries were written in that. On the other hand, React ended up real dominant on the front-end because of all the sh*t code people put between HTML JavaScript tags. Another route, is any promising asynchronous and…

> these divergent vectors make something like a Rails that can serve the needs of big data

So, Python has the ton of data science libraries, and it also happens to have Django...

Re: I Miss Rails

#312

> if the modern equivalent of Rails already exists, please let me know! You're in luck. Rails 5.2.3 was released 20 hours ago. More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? I find it a very productive framework. EDIT: If you're talking about missing a JS equivalent of rails, do you know about Loopback? https:/…

> If you're talking about missing a JS equivalent of rails, do you know about Loopback?

I would not go down that route, because at least Loopback 3 looks promising at first, but after a while it does not scale dx-wise. The biggest trap my team fell into, was that you could „include“ related models in a request, that you did not have permissions to. Media management was also very poor and did not integrate well into the whole eco system.

We are now using TypeORM[1] and routing-controllers[2] which has been very nice so far. I have been building my own framework at work on top of these and it safed us a good chunk of time. If you want to have a look, go to my profile, I have put a link there.

[1] https://typeorm.io [2] https://github.com/typestack/routing-controllers

Re: I Miss Rails

#313

Earlier quoted context omitted.

I'm not so sure about that... maybe I'm just old but React provides very little of anything compelling other than shadow DOM and databinding. It seems like every opinion it has outside of those two very narrow areas is INSANE

The funniest part about the enthusiasm for React masochism is that the best parts of the library are better accomplished with a combination of Turbolinks 5 and Stimulus. Not a coincidence that they're all Rails extractions. For me, the more interesting question in all of this is where did this fervour for JS-and-the-way-down actually come from? My hypothesis is that it's the natural result of a huge mess of new talen…

What purpose does it serve to take such an uncharitable view on other people?

This community is full of experienced professionals who use Javascript even in the face of alternative options, and we belabor this topic every day.

So what excuse do you have for assuming and hypothesizing that everyone must be an unenlightened boot camp amateur when you could've turned to anyone and simply asked?

For example, to me, modern JS is not substantially worse than other dynamically typed languages. Give me Python and Ruby code and the Javascript version probably looks the exact same. Meanwhile, those languages don't have a 1:1 version of `results = await Promise.map(urls, (url) => crawl(url), { concurrency: 8 })`. And that's not to start a language war but rather to demonstrate a concise example of a technical strength, aka a purely technical ground that a craftsperson could reach for that tool.

But now fold in its advantages like ubiquity, async-everything, runs natively in the browser, and has a static-typing system that's actually catching on, and it should be pretty obvious why someone could pick it when given an option beyond "they don't know any better."

Also, there's the obvious trade-off of treating your server as the API for all of your clients and treating the web as just another client that runs on the user's device instead of essentially coupling it with the server.

But surely these things are obvious or easy to find out, so it's hard to assume good faith in your post.

Re: I Miss Rails

#314

We need a framework that makes it easier to build server-rendered, multi-page web apps with Node. Preferably something "batteries included," with support for recent innovations in web tech.

Next.js is pretty good, but could still be better.

Re: I Miss Rails

#315

I actually have gone back to writing server-rendered apps like it's 2012 and it's been wonderful. Server-rendered used to mean slow and clunky but I've found that using Go my page loads are super fast. The inter-page transitions can sting a little on really really slow connections, it's true. But users are much more willing to deal with them if they haven't first been subjected to a minutes-long spinner while the SPA…

Libraries like IntercoolerJS really help with page transitions and other dynamic interactions, while still letting you do all the rendering on the server.

I like intercooler.js a lot!

Re: I Miss Rails

#316
> I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again

Why? What is wrong with that exactly?

Has the Internet fundamentally changed over the past seven years? I’d argue it hasn’t fundamentally changed in the past 20 years.

A single-page app isn’t a panacea, and in most cases is a bad choice for a business.

Re: I Miss Rails

#317

I actually have gone back to writing server-rendered apps like it's 2012 and it's been wonderful. Server-rendered used to mean slow and clunky but I've found that using Go my page loads are super fast. The inter-page transitions can sting a little on really really slow connections, it's true. But users are much more willing to deal with them if they haven't first been subjected to a minutes-long spinner while the SPA…

Are any of your apps public? I want to try using them.

Re: I Miss Rails

#318

Earlier quoted context omitted.

I'm referring to things like dynamic find_by_* messages since more people might be familiar with that. But I don't know why you'd say that. ActiveRecord models are one of the main places you'll see a bunch of `use SomeGem::Thing` that introduce a bunch of magic methods on model instances. And my point is that we aren't talking about method composition here that you can statically analyze with a bolted-on type system.…

I only say that because it seems like low-hanging fruit. If I have a class with a random @ivar that's added inside a random method, there's nothing up-front to check against. An ActiveRecord subclass at least has a database schema to validate against.

[deleted]

Re: I Miss Rails

#319

Earlier quoted context omitted.

The funniest part about the enthusiasm for React masochism is that the best parts of the library are better accomplished with a combination of Turbolinks 5 and Stimulus. Not a coincidence that they're all Rails extractions. For me, the more interesting question in all of this is where did this fervour for JS-and-the-way-down actually come from? My hypothesis is that it's the natural result of a huge mess of new talen…

What purpose does it serve to take such an uncharitable view on other people? This community is full of experienced professionals who use Javascript even in the face of alternative options, and we belabor this topic every day. So what excuse do you have for assuming and hypothesizing that everyone must be an unenlightened boot camp amateur when you could've turned to anyone and simply asked? For example, to me, moder…

All that's nice at the language level in favor of JS, but it doesn't speak to the framework level of what all Rails offers compared to everything additional you need to add to React to be comparable. Same deal for some of the frameworks in PHP like Laravel or Drupal.

Re: I Miss Rails

#320

Earlier quoted context omitted.

Long time rails developer turned "enterprise". Spring-cloud now requires much less boilerplate and is easy to develop with using kotlin's syntactic sugar shortening code and making it more concise. Orm is kind of a failure and requires us to write some queries by hand into string literals, but at least it has it's own sql syntax to avoid engine dependence.

Much less? I haven't use spring cloud for quite a while but last time I did it there's quite some grunt work to make config server / eureka / ribbon / hystrix and friends to work. Let alone the the deployment process. But I think the key difference is Rails is more opinionated so you don't have to worry about which circuit breaker to use. Or just don't use any.

You are typing about activating the service discovery modules of spring cloud (which rails doesn't have), I am typing about the autoconfiguration goodness. Sure, I could have said spring boot instead of cloud, but cloud is kind of a superset and comes with feign integration so I use that.
Post reply on HN