Live data from Hacker News

I Miss Rails

chanind.github.io

331–340 of 522 posts

Re: I Miss Rails

#331
I think that Buffalo is actually the most credible replacement for Rails that I've seen:

https://gobuffalo.io/

The lead developer is a ex-Rails developer with a very keen sense of what made Rails successful. One of the reasons that it's still pre-1.0 is that it won't ship until the plugin architecture is good, which speaks to the point of the article.

You don't need advanced syntax in the server code to write Rails applications, so Go may be a good fit for a Rails replacement.

Re: I Miss Rails

#332

> 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:/…

Speaking of JS, do you guys have a suggestion for good SQL querybuilder and maybe a migration tool for Node? I prefer to do everything else by hand or use smaller libraries. Not that i don't know how to write SQL queries by hand, it's just raw SQL queries with conditions is just ugly.

I really like TypeORM (for Typescript projects) & Knex (for non-TS projects)

Re: I Miss Rails

#333
post #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.

Yeah, sure thing!

https://takehome.io

https://clubman.app

Re: I Miss Rails

#334

Earlier quoted context omitted.

coming from the django-world, i had the same complain with rails. It was a little too fast for a me.

Would you mind expanding on this? I went from Django to Rails and loved it so I'm always genuinely curious about the experiences of people who didn't have the same fun as me.

It was 4 years ago. I could never work rbenv and bundler to play nicely when cloning the project on the second machine. But I am willing to give it another go.

Re: I Miss Rails

#335
post #50

I'll take a mildly unpopular opinion and say that I really despise code-gen-style web frameworks, like Rails or ASP.NET MVC or Django, and would rather reinvent the wheel than use them. I definitely see the appeal of these frameworks, but I feel that a side effect of having them is that there's a metric ton of code generated and you really have no idea how it works. I remember spending almost 30 minutes digging throu…

Its only an issue when it doesn't work, and for rails it basically always works. In 4 years using rails the only time I have ever had to read the source was to find an undocumented feature in Active Storage which had only just came out.

Re: I Miss Rails

#336
post #201
post #45

I personally don't missed Rails mostly because boilerplate doesn't really bother me. I'm more afraid of using the wrong abstraction. Rails (v4 was my last experience) was hard for me and I think my reasoning is as follow: - I like to dig deep into the framework I work with but Rails have so much meta programming (a.k.a magic) that I struggle real hard figuring out stuff. You often have to go into runtime, hit method…

> - Lastly, I firmly believe MVC is a leaky abstraction Then what is the abstraction that you think it should replace it?

maybe there is no fitting abstraction

Re: I Miss Rails

#337
post #46

Earlier quoted context omitted.

I know this is the opposite of what you asked but I find Rails to be keeping pace with modernity much better than its conemporaries! Django seem to have given up on integrating websockets (ActionCable has been in Rails for literally years now), nor is there trivial integration for JS assets/asset pipeline functionality. I don't write much of either anymore, but I'd still reach for Rails the instant I need to get some…

Django has multiple good asset handling libraries. I like https://django-pipeline.readthedocs.io/ . And with django-channels ( https://channels.readthedocs.io/ ) Django goes way beyond just WebSockets. You can now do fully asynchronous data processing pipelines. I'm still happy working with Django (which is not something I can say about the JS ecosystem). Especially when doing APIs with Django REST Framework.

Django channels sounds like a great idea and I really like the conceptual step it made with ASGI, but in practice I found it to be riddled with problems.

For instance, the posix IPC implementation of ASGI is very buggy and "not officially supported". The other implementation uses Redis (so, yet another component to take care of) and is quite brittle as well. We've noticed severe slowdowns of downloading images when using the Daphne web server in development mode, many issues running out of memory, clogged queues and so on. This is also very difficult to debug, due to the many moving parts, and of course it only happens on production, so good luck trying to reproduce it locally.

For this project (which is still in production), we ended up falling back to a standard Gunicorn web server setup using traditional WSGI to handle regular HTTP traffic, and relying on channels only for websockets. For new projects, we've moved to a tiny standalone gevent-based websockets server (https://pypi.org/project/high-templar/) which we deploy next to a standard gunicorn stack. It is much simpler and much more stable. Unfortunately, it's something we've developed in-house, so if there are issues we have to fix them ourselves. There've been some problems with gevent which apparently have been fixed in the latest git repo, but there hasn't been a release since last year. So many issues....

Re: I Miss Rails

#338
post #55
post #50

I'll take a mildly unpopular opinion and say that I really despise code-gen-style web frameworks, like Rails or ASP.NET MVC or Django, and would rather reinvent the wheel than use them. I definitely see the appeal of these frameworks, but I feel that a side effect of having them is that there's a metric ton of code generated and you really have no idea how it works. I remember spending almost 30 minutes digging throu…

Rails auto generates very little these days unless you ask for it.

I very much appreciate the code generation. I hate having to make repetitive changes in 4 places to add a new file because nothing is wired up automatically.

Re: I Miss Rails

#339

Earlier quoted context omitted.

Serious question: Django doesn't even have lazy loading. Why do people use it? Am I missing something? No way I'd wait a few seconds to get something big from the db

What are you referring to? Lazy loading in Rails tends to refer to how Active Record waits until access time to send the query: https://rubyinrails.com/2014/01/08/what-is-lazy-loading-in-r... It's still synchronous.

Django has this type of lazy loading as well: https://docs.djangoproject.com/en/2.1/ref/models/querysets/#...

Re: I Miss Rails

#340

Earlier quoted context omitted.

Why is it hard to dismiss Node? Do you mean business environment-wise?

I am just concerned about the Ruby/RoR talent pool shrinking year by year.

Python is going strong, so if Ruby talent is an issue Django can be an alternative.
Post reply on HN