Live data from Hacker News

Modern Front-end in Rails

evilmartians.com

1–10 of 150 posts

Re: Modern Front-end in Rails

#3
> As developers, however, we usually care about

> 1. isolated, reusable, testable code that is easy to reason

> about;

> 2. short “code change → visible result” cycle;

> 3. straightforward dependency management; and

> well-maintained tools.

> Sure, “classic” Rails gives our code some structure: there

> are separate folders for view templates, javascripts,

> stylesheets and images. But as the front-end complexity

> grows, navigating them quickly becomes a cognitive drain.

WAT?

1. I don't see how the directory renaming / npm config changes this at all.

2. I guess this is an argument for speed of asset pipeline? As mentioned in the article itself, Rails 5.1 webpack with hot reloading built in. How much faster can you get?

3. I don't think I've ever heard of npm referred to as a well-maintained tool.

Beyond that, the idea that Javascript-heavy web apps are "Modern" is kind of silly. They're certainly trendy. In the vast majority of the cases I've seen, there's no coherent reason for the added complexity.

Re: Modern Front-end in Rails

#4
post #2

Wow, I like how readable the text is. The typography in the post is beautiful.

Whenever I see a front-page link about Rails, I always think, "I bet the top comment threads will be about the font or layout rather than the content". Click, and... yep!

It's been about ten years, and you don't see as many Rails posts as you used to, but it still holds true!

Re: Modern Front-end in Rails

#5
post #2

Wow, I like how readable the text is. The typography in the post is beautiful.

I know this is off topic, but I noticed the typography too and was just seeing if I could tell what it was before looking. But oddly enough, I can't seem to find out what typeface is used using the developer tools for the life of me. Does anyone know how that could be hidden from the styles pane?

Re: Modern Front-end in Rails

#7
post #2

Wow, I like how readable the text is. The typography in the post is beautiful.

I know this is off topic, but I noticed the typography too and was just seeing if I could tell what it was before looking. But oddly enough, I can't seem to find out what typeface is used using the developer tools for the life of me. Does anyone know how that could be hidden from the styles pane?

The rendered typeface is Stem Text. If you click on an element with the typeface and go to the computed tab that will show you what font-family style is applied.

Re: Modern Front-end in Rails

#8
post #2

Wow, I like how readable the text is. The typography in the post is beautiful.

I know this is off topic, but I noticed the typography too and was just seeing if I could tell what it was before looking. But oddly enough, I can't seem to find out what typeface is used using the developer tools for the life of me. Does anyone know how that could be hidden from the styles pane?

[deleted]

Re: Modern Front-end in Rails

#9
post #2

Wow, I like how readable the text is. The typography in the post is beautiful.

I know this is off topic, but I noticed the typography too and was just seeing if I could tell what it was before looking. But oddly enough, I can't seem to find out what typeface is used using the developer tools for the life of me. Does anyone know how that could be hidden from the styles pane?

I think it is this font: https://www.myfonts.com/fonts/paratype/stem-text/

(look in the 'computed' tab of dev tools)

Re: Modern Front-end in Rails

#10
Honestly, as a Rails dev, this just seems more complicated than creating a Rails app in API mode and using #{React||Vue||Ember}} for the front-end.

It's extremely easy to get started with a front-end app using vue-cli. This article spends a lot of time changing Rails' default functionality to achieve behavior similar to what vue-cli gives you by typing `vue init webpack` and answering a few questions.

I understand that getting up to speed with a front-end framework takes time, but in my case, it was time well-spent (I used Maximilian Schwarzmüller's Vue.js course on Udemy). There's no shame in just using Rails for the API.

Post reply on HN