Live data from Hacker News

I Miss Rails

chanind.github.io

351–360 of 522 posts

Re: I Miss Rails

#351
post #54

Earlier quoted context omitted.

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…

You get all of that for free with Java, plus you don't have to use javascript

>shared by both your client side and server code

How do you get that? Are you using GWT?

Re: I Miss Rails

#352
8 years in to my programming career, I still LOVE Rails. No other framework I've come across lets me do as much quality work in a short space of time as Rails does.

Re: I Miss Rails

#353

Earlier quoted context omitted.

This might come as a surprise, but async everything is not a feature for a lot of people. It’s a bug.

Yes, of course. Everything is a trade-off. Why the condescension? But there are almost zero async-everything options in the space. And being confined to a second-class async subworld inside a synchronous ecosystem is a classic error-prone challenge whether you're using Twisted, Event Machine, Tokio, or Netty. It's a pretty big downside of using Event Machine which even created its own networking primitives instead of…

Or just use gevent and monkey patch the synchronous world to make it asynchronous :)

Re: I Miss Rails

#354
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…

I can't speak for the others but Django doesn't do any code generation. Are you talking about the templating system?

Re: I Miss Rails

#355

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…

This is where Elixir and Phoenix really excels. It just renders pages so damn fast!

Re: I Miss Rails

#356
post #121

Earlier quoted context omitted.

> It seems like the JS ecosystem changes so fast Does it tho? React, Webpack, Babel and TypeScript have been around for a while now, and I can't think about anything else more recent that had a similar impact on the JS ecosystem.

Vue? Yarn? Angular 2?

Angular 2 has been around since 2015.

Re: I Miss Rails

#357

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.

Also https://instant.page/. It preloads a page when the user hovers over a link.

Re: I Miss Rails

#358

Earlier quoted context omitted.

Don’t forget interactivity and real-time feedback for user actions. SSR simply can’t provide that without lots of javascript thrown inside each template, and we all know what that leads to...

I urge/beg you to check out the Turbolinks 5 + StimulusJS libraries, which are by the same (Rails team) people, which is no coincidence. https://youtu.be/SWEts0rlezA?t=203

There's a great podcast interview about the what/why of Stimulus: https://changelog.com/podcast/286

Re: I Miss Rails

#359
I read your blog and I think that's why we still need Rails to keep other frameworks on their toe.

Feature/Improvements introduced in Rails are constantly being picked up by other frameworks but for some reason, people are ignorant about the progress made by Rails in the last couple of years.

I use Rails every day at work and trust me when I say this, It is so easy to get back to the code written last week or even last month(Of course Ruby plays a big role in that). It is a big advantage when you do not have to break your head every time you wanna review your code which is written some time back.

Re: I Miss Rails

#360
post #265

Earlier quoted context omitted.

I used Typescript from the get-go on a new project recently and it's slowed down both mine and my team's development velocity a lot. Time will tell if it's a smart decision but in terms of prototyping or spiking something, I'm picking Rails every time and I think based on my current experience I'd be apt to retrofit Typescript to an existing project rather than integrate it from the beginning. I don't suppose you cou…

I don't have a book recommendation for you (what helped me was the standard documentation and about a year of daily dev time), but an observation: Your team is likely using an overly restrictive tsconfig.json. No-implicit-any, for example. Make it less restrictive, and you then have typing and no penalty for punting on it until later. If using an IDE, the effort into defining types is immediately rewarded with autoco…

One more thing that IMO gets overlooked too often: TypeScript can typecheck your JSX markup. Compare that to any string-based templating engine, such as Knockout.js templates or jquery.tmpl, where you have to learn its snowflake DSL, you get no autocomplete, no checks for undefined variables or syntax errors…

If I never have to explain vs again, I'll be a happy man.

Post reply on HN