Live data from Hacker News

I Miss Rails

chanind.github.io

411–420 of 522 posts

Re: I Miss Rails

#411
post #11

Earlier quoted context omitted.

Oddly I never considered starting a new project with it, but now I'm questioning why that is. I guess I just don't see many new projects started in Rails, and nowhere I've worked the past few years uses it. I stopped using it after Rails 3, but I'll give it a try again in the next side-project I work on and see how it goes.

Server side rendered is still fantastic for the vast bulk of web apps. Turbolinks and a bit of care around performance and all you users know is you have a fast site. Not many apps really need the super rich SPA type experience.

And you can take this approach to the next level with Phoenix LiveView that’s in its testing phase right now. Server rendering is so fast in Phoenix that it had a lot of people clamoring for a turbolinks-like solution to the problem.

It’s not perfect yet, but as a first version is remarkably capable already.

Re: I Miss Rails

#412

Earlier quoted context omitted.

I'm interested in hearing about applications successfully using ActionCable for what and how. It's unclear to me how much use it's getting, or how well it meets actual use cases.

ActionCable is super easy to use out of the box to get WebSockets running, but it's incredibly non-performant. Anything more than 100 concurrent users took the time taken to a send a message to the socket from milliseconds to seconds. Replacing it with the AnyCable gem in conjunction with AnyCable-Go got us to over 1000 concurrent users without a hitch.

Is Redis the bottleneck?

Re: I Miss Rails

#413

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

Let's say the last time I really worked on anything Rails related was 2011-ish, and while I got stuff done OK, I never really particularly fell in love with it (and in fact was often annoyed that most projects I worked on seemed to start with a week of hacking through environment and gem snarls). Where would people recommend I read about (a) getting up and running with rails 5 and (b) appreciating what's new and impr…

A lot of things improved but a lot of things stayed the same. Rails is like oysters - not for everone...

Re: I Miss Rails

#414
post #179

Earlier quoted context omitted.

I don't understand. One is server application development, one is client development. They are two vastly different things. From this hot take on JS, I'd think people are suggesting that the development experience of all the other available clients are a lot better, but then I became an Android and iOS developer and that's not true either. Swift isn't bad, but the language isn't the only thing that dictates how hard…

I think we're diverging. The mental model of a Rails developers is well formed and if you're a beginner then you can rely on a very strong community for opinions, best practices and conventions to follow. This greatly decreases cognitive load and immensely improves productivity. When you make a jump to a JS stack (whether client side or server side) you have a lot of options but no best practices or conventions to fo…

Agreed, though I use Django. Two Scoops in a great book for going from someone who knows how to use Django, to knowing how to use Djnago well.

Re: I Miss Rails

#415
post #176

Earlier quoted context omitted.

Agnostic of stack, SPAs provide a clear separation of concerns. The api layer is responsible for transforming data between the client and controlling access. The client is responsible for presenting the data structures provided by the api to the user, and turning user inputs into data structures that the api can consume.

I feel like this line of thinking is very analogous to the whole microservice craze -- you shouldn't need to introduce a network boundary to write well architected software. There's no reason you can't have a clear separation of concerns in a server side rendered application.

This is true for all MVC frameworks as well. You shouldn't need a framework to introduce the boundary between views and models.

Re: I Miss Rails

#416

Earlier quoted context omitted.

Heard of Laravel, it's a Rails fork right?

Laravel is definitely Rails inspired, but also takes inspiration from a lot of other frameworks (CodeIgniter, Symfony, .NET, etc).

I was just teasing, Laravel looks solid. It's also comforting to know that if you move from Laravel world to Rails, a lot is familiar out of the box. It's good for us developers and good for the industry. Which I can't say about js stack/elixir/Golang/Spring etc etc.

Re: I Miss Rails

#417
Not sure why everybody nowadays rule out Rails (or Django) like frameworks. Not every web app need to be an SPA only! There are multiple kind of web apps which I would still start with Django today!

Re: I Miss Rails

#418
post #54

Earlier quoted context omitted.

> joys of static type checks combined with a unified front/back data model Would you mind elaborating on the specific benefits?

With TypeScript you can define a single set of interfaces shared by both your client side and server code. If you change an interface to return a different value or rename a member, you immediately know where it’s used and can update it in tandem. Static type checking let’s you know everywhere that something is used without a battery of tests running through your app. This takes 99% of the fear out of refactoring and…

>With TypeScript you can define a single set of interfaces shared by both your client side and server code.

If you don't have page-specific (or any, if you can) code on the client side, this stops being a problem in the first place.

It's funny how SPA fans here claim both good separation of concerns via web services and code/type sharing as features while in practice those things are mutually exclusive.

Re: I Miss Rails

#419
post #372

I love Rails vision about how to do full stack web development. It is a really good abstraction, that hides unnecessary technical complexity and lets you focus on solving business problems. A lot of people here complains about Rails performance, and that is one of the reasons why I use the Grails - Java framework. It is not as polished as Rails, and has a few sharp edges, and it has a much smaller community which is…

You may gave gotten into Grails at a better time. I more recently attempted a project in Grails and it was a disaster. In fact it was my worst framework experience ever. Mainly because completely inadequate sources of information. Grails 3 had been released but the documentation was terribly incomplete so we had to spend a lot of time searching and about every bit of info we tried to look up returned results strictly for version 2. So some really basic things we just never figured out how to do. I’ll never touch it again.

Re: I Miss Rails

#420

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…

Interesting. I always found Django so much more productive than rails due to the auto admin panel being out of the box. If I’m starting something new than its nice to have a place for non devs to enter data immediately. Both do quite a bit better for cleanliness and setup time than any of the other platforms I’ve used for web development.

You can easily generate scaffolds with rails that take the place of Django's admin.
Post reply on HN