Live data from Hacker News

What to expect from your framework

johan.hal.se

61–70 of 87 posts

Re: What to expect from your framework

#61
post #23

Earlier quoted context omitted.

CSS has been mangled so many different ways, including the loathsome Tailwind, that I can't imagine what a newb web dev has to plough through these days. Some of us with longer memories were overjoyed to see browsers finally adopting standards after the erosion of Microsoft's reign but now it appears we're intent on destroying the value of what we waited 15 years for. Fer Kreissakes just write raw, unadulterated CSS…

Refreshing to see someone else who hates Tailwind. It's a nightmare.

What do you prefer & why?

As a somewhat outsider to CSS I look at tailwind and don't feel excited but I do wonder if thats as good as it gets.

Re: What to expect from your framework

#62
post #5

I like using `rails middleware` as an example because it's true, tons of things in that list are important. A good example of this is: Rack::MethodOverride Try making your non-JS server rendered view functions and HTML form submissions handle PUT, PATCH and DELETE. Depending on which lightweight alternative to Rails you're using this can become very tricky and you end up spending an entire day of Googling and maybe f…

Unless I’m misunderstanding you, this is trivial in every stack I’ve used (.NET, Node, Rails, and Go). I can’t imagine why this would be difficult.

Re: What to expect from your framework

#63

Rails is probably the best framework still. But it still feels too low-level. I don’t want to care about the mountains of Web gunk there are: JSON serialization, HTTP methods, cookies, etc. Lack of static typing really hurts the maintenance story, too. I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on. Most web frameworks seem to be obsessed with the web platform to the…

You should check out Wundergraph coupled with a backend framework to at least manage the database schema. Check out this video [1] it's so fast and nice.

[1] https://www.youtube.com/watch?v=m3YrZav5-CU

Re: What to expect from your framework

#64
post #5

I like using `rails middleware` as an example because it's true, tons of things in that list are important. A good example of this is: Rack::MethodOverride Try making your non-JS server rendered view functions and HTML form submissions handle PUT, PATCH and DELETE. Depending on which lightweight alternative to Rails you're using this can become very tricky and you end up spending an entire day of Googling and maybe f…

Unless I’m misunderstanding you, this is trivial in every stack I’ve used (.NET, Node, Rails, and Go). I can’t imagine why this would be difficult.

> Unless I’m misunderstanding you, this is trivial in every stack I’ve used (.NET, Node, Rails, and Go). I can’t imagine why this would be difficult.

It's trivial in Rails because the middleware mentioned handles it.

Forms only allow GET and POST if you submit it from a browser without JavaScript. That means you need to do things like introduce a hidden form field such as _method with the real method you want to use such as PATCH and then your framework's middleware level needs to understand how to translate that to call the correct function to handle the request. There's all sorts of edge cases around dealing with files and detecting if the request needs to be translated, etc..

With Flask this is a huge clusterfuck, https://blog.carsonevans.ca/2020/07/06/request-method-spoofi... has a breakdown on how it's anything but trivial. Sure there's https://flask.palletsprojects.com/en/2.2.x/patterns/methodov... but this involves setting a header which implies it's submit through JavaScript or another service over an API but in our case we want to submit it through a browser without using JavaScript.

Re: What to expect from your framework

#65
post #36

This is really great, and I'm really happy people are finally waking up to this. I've stuck with Django through all of this and never looked back. Nowadays with stuff like HTMX, things have never been better! Could we do this for CSS-in-JS next please? With React 18 making a strong push for compiled CSS, we have libraries now that let you write CSS (compiled) using Typescript. This is also absolutely crazy to me beca…

Wow, I truly hope you are wrong. Non-scoped CSS where you have to come up with names for everything and that doesn't live right next to the markup in the same file as the component is the worst. The whole cascading part is also something I hope I never have to deal with again with conflicting styles being inherited and overridden all over the place. Just let me isolate everything and let me freely copy a component fi…

What do you do to keep your inter component styling in sync?

Re: What to expect from your framework

#67
post #25

This article is great, and it reminds me of a rant I've been wanting to make for a long time: why the hell does everyone these days insist on building every web app as an SPA? I started my career in Rails. I'm sick of Rails these days as I've worked with it for long enough to become intimately familiar with its flaws; these days I'd pick Phoenix over Rails any day of the week. But still, I'd rather spend a million ye…

Aren't you selling Rails a bit short on its front-end capabilities considering Rails 7's embrace of Hotwire and its reworking of the asset pipeline.

I've noticed this trend with folks who move from Rails to Phoenix. At some point they switch and then never look at Rails again even if it's been years since they stopped using it. It's not like Rails was frozen in time at 2017 when they stopped using it. There's been 5+ years of progress since then.

Hotwire is one of the best things I've encountered. DHH and gang did a great job coming up with this abstraction and using HTTP for most of its communication. I'm using it today in a fairly big app and it was a breeze implementing it.

Complexity wise I'd put Phoenix Live View at like an 8.5/10 where as Hotwire feels more like a 3/10 since it builds on everything you already know. For creating just about any app I'd choose Hotwire all the time and it's also especially interesting in that you can use something other than Rails as a back-end with it if you want. I used it with Flask in a few small apps. The only server side component is for when you want to broadcast changes to more than the person who made the request but that's optional.

Re: What to expect from your framework

#68
post #42

Earlier quoted context omitted.

> hackernews is not reflective of the real world. Say it isn’t so! :-D Just as an example: When was the last time you read about Angular on the HN frontpage? Basically last decade. Does that mean nobody uses Angular? Hell no. It is extremly widely used by big-ass corps. It’s just that their devs generally aren’t in the HN crowd. What companies do, what their support cycles are and how conservative their tech leaders…

Can you name some companies that are actively investing in Angular right now besides Google? It feels like React has taken over for many large businesses (non-tech focused) because it's "easier" to hire React devs. I used to work for a company where our manager (a few steps below CTO) was pushing for us to migrate to React from Vue so they could hire more people to come in and help with feature development. We pushed…

Sorry, I cannot, due to a confidentiality clause. Most of my employer’s clients use Angular though, some exclusively. They’re mostly machine tool builders from Germany.

Also, as someone else already guessed, they also all use .NET. This is not a coincidence of course, even though there is no rational argument to be found (“they both use classes!”).

Re: What to expect from your framework

#69
post #23

Earlier quoted context omitted.

CSS has been mangled so many different ways, including the loathsome Tailwind, that I can't imagine what a newb web dev has to plough through these days. Some of us with longer memories were overjoyed to see browsers finally adopting standards after the erosion of Microsoft's reign but now it appears we're intent on destroying the value of what we waited 15 years for. Fer Kreissakes just write raw, unadulterated CSS…

Refreshing to see someone else who hates Tailwind. It's a nightmare.

From what I can tell, this is a very common take. Especially on this site.

Re: What to expect from your framework

#70
post #23

Earlier quoted context omitted.

CSS has been mangled so many different ways, including the loathsome Tailwind, that I can't imagine what a newb web dev has to plough through these days. Some of us with longer memories were overjoyed to see browsers finally adopting standards after the erosion of Microsoft's reign but now it appears we're intent on destroying the value of what we waited 15 years for. Fer Kreissakes just write raw, unadulterated CSS…

Refreshing to see someone else who hates Tailwind. It's a nightmare.

The worst Tailwind I've seen is HTML littered with a, a:hover etc. declarations on every hyperlink. OK, you can create a global Tailwind stylesheet in your config but doesn't that defeat Tailwind's purpose?
Post reply on HN