Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

171–180 of 181 posts

Re: Ask HN: Help me pick a front-end framework

#171
I would cautiously recommend considering Elm.

Pros: - strict typing across the ecosystem with best in class DX around typechecking

- ease of refactoring and making large scale changes in your app. I can’t overemphasise this one. At work we have switched out out UI system several times across several apps, which would have been a Herculean task in most other front end tools. Here it was an entirely painless, even easy (if somewhat laborious) task.

- stability. Elm is very stable in its features, there is almost no churn.

- good testing library (sort of) built in with property based testing

- the elm-ui library abstracts CSS for you. This takes away some of the trickiest parts of “front-end”

Cons: - if you need to deal a lot with imperative DOM apis, this can have a bit more friction than in other solutions. Usually this involves writing webcomponents in plain js or ts and calling those from your Elm code with event driven communication between them. Our relatively complex web apps at work each use about half a dozen of these, so is usually manageable, but in some cases this can be a lot worse. Probably worth looking into.

- somewhat unusual OSS project leadership. If you don’t expect to have any influence on the direction or pace of Elm as such, you’ll be happy.

Re: Ask HN: Help me pick a front-end framework

#173
Check your local developer market and find what most people already know and use that. choosing a stack is not so much about -the right- library but the one that makes the most sense to the people that you will work with.

that said, you will be able to buy templates much more easily for the bigger frameworks.

Re: Ask HN: Help me pick a front-end framework

#174
post #96

Earlier quoted context omitted.

I'd add to try using sveltekit. Typescript is already supported when you set it up using the documented "npm create svelte@next". It has cool routing, backend etc but even if you don't care about any of it, you get free hot reloads. And with the new version, you can create it as if it was your average svelte app, just avoiding + in file names and using +page.svelte as your main entry point. For styles, if you care ab…

I love Svelte and SvelteKit but if you're just interested in building your app, please pick something else for now. It's still constantly changing and while it's good it's being developed rapidly, it's definitely not something you want to spend your limited time on migrating while you could just be productive with say React. Okay sure, they have had big breaking changes in-between major versions as well, but before S…

Lets keep Svelte and SvelteKit straight! Kit is still changing, but Svelte is extremely stable and usable in prod.

Re: Ask HN: Help me pick a front-end framework

#175

I built a text annotation tool recently, first in React before rewriting it in Svelte. I found React's virtual DOM annoying, esp. when dealing with text selections + wrapping those selections with elements, etc. Svelte was just simpler in this regard (and overall, IMO). But if you're not a frontend dev and want to use lots of off-the-shelf components, Svelte's ecosystem is much smaller than React's, so you won't have…

I think it’s worth nothing that pretty much any vanilla js library works out of the box with svelte with very little extra effort. Don’t discount the size of that ecosystem

Re: Ask HN: Help me pick a front-end framework

#176
out of curiosity, question from someone who has never ever done frontend.

to me, ember js seemed to be a good alternative a while back, and what i read about their approach seemed very reasonable. but no one ever talks about it, basically ever.

is it just that niche or simply no longer relevant? the community on the page seems to deliver quite happily ...

Re: Ask HN: Help me pick a front-end framework

#177

Here's the `modern` stack I would use. but before jumping to names directly, why modern and why not battle tested react-materialui or bootstrap? Because the stack I am explaining below 'actually' solves some major problems. - If you care about SSR then definitely either NextJS or remix.run - If SSR is not the priority then STAY AWAY FROM REACT. Creating the complicated UIs in react is easy, but refactoring is hard. R…

> it's too late to refactor now.

typescript effectively eliminates this issue, which is why it comes so highly recommended - regardless of framework.

vanilla javascript is not your friend on large, complex projects.

Re: Ask HN: Help me pick a front-end framework

#178
post #37

Try Flutter (Dart). Picked it up for a gig this summer. Strong typing, great performance, diagnostic tools are capable, instant hot reload, and it can be compiled for any platform. The main factor that might make or break it for your usecase is whether it supports the kind of advanced text layout you might need.

Second the recommendation for Flutter, very robust dev environment.

Re: Ask HN: Help me pick a front-end framework

#179

Earlier quoted context omitted.

Prisma is pretty good, but the migrations system doesn't really compare. If your answer to many (any?) migrations is "blow away the existing database", that's not gonna work for me. Another thing that's not gonna work for me is generating each migration by hand with SQL specific to the dialect that youre using in development, now that I'm spoiled with Django's auto-migrations. I've had good success with Prisma by usi…

Extend the User model in Prisma: https://github.com/t3-oss/create-t3-app/blob/main/cli/templa... Here's the file you add auth "providers": https://github.com/t3-oss/create-t3-app/blob/main/cli/templa... Custom providers: https://next-auth.js.org/configuration/providers/oauth#using...

How does your random link to a Prisma schema relate to next-auth? Did that come from next-auth documentation?

Cool, how do I make a provider? That's pretty anemic documentation. I feel literally 0% more informed about the process. Obviously I could go through the fucking source code to find out how custom oauth providers were implemented!

But I don't care about oauth 99% of the time! What I actually want is username/password login with session cookies. How do I do that?

> The Credentials provider allows you to handle signing in with arbitrary credentials, such as a username and password, domain, or two factor authentication or hardware device (e.g. YubiKey U2F / FIDO).

> It is intended to support use cases where you have an existing system you need to authenticate users against.

What if I want session cookies instead of JWT? And there's no default schema (which is because it has no baked in ORM or database management, to be fair), so I have to go through the boilerplate of defining it in in every new project. And I'll have to figure out how to do permission based access and groups. This is all table stakes, for me. Next Auth isn't actually taking care of any of the hard parts of my use case.

It just doesn't have the bare minimum that I need it to have to be a suitable replacement.

Re: Ask HN: Help me pick a front-end framework

#180
post #149

Earlier quoted context omitted.

> Vue2 is the only of these three that can be added to a webpage with a script tag. In that sense, it is a lot more simple than the other options. Is that really that big of a differentiator? I definitely see the appeal especially in getting stuff out the door quickly, but I wouldn’t consider it in a comparison.

It's also not true, React can be used with a single script tag

Is there documentation / examples around this concept? I remember getting something basic working in 2015 but nothing where you just drop in a script tag anywhere
Post reply on HN