Elm. If there is a back-end API with a spec (GraphQL or OpenAPIv3) you can generate an Elm client for that which makes API calls type-safe and thus very robust.
secound, espeicaly together with elm street for generating code from Haskell
Ask HN: What's is your go to toolset for simple front end development?
281–290 of 295 posts
Re: Ask HN: What's is your go to toolset for simple front end development?
#282Earlier quoted context omitted.
It's very cool. I'm actually working on a web framework called Bolts in the Rust ecosystem that will offer LiveView-like functionality, born from my hatred of modern js frameworks.
The irony is you will have to code a lot of javascript to make this ;)
Re: Ask HN: What's is your go to toolset for simple front end development?
#283Preact [0] + htm [1] Why? Preact is small, fast, and reasonably easy to use. But the main selling point for me was that, together with htm, I don't need any build system a la webpack. No node_modules folder. I just have to load one script (preact + htm bundled), define my components in plain javascript files and import them. Bliss for me. [0] https://preactjs.com/ [1] https://github.com/developit/htm Edit: Just read…
Ah no NPM! Vanilla JS with no build step. This is very interesting. Thanks.
Re: Ask HN: What's is your go to toolset for simple front end development?
#284Earlier quoted context omitted.
The drag and drop is more a rapid build tool than anything else. I'm, frankly, not likely to put all the love an effort in to the front end that I will the back end for small projects. No build pipeline is very helpful, actually.
if you really don't want a build pipeline, then in js land your options are limited to alpine and vue. there may be more, but these two are more popular ones
Re: Ask HN: What's is your go to toolset for simple front end development?
#285Earlier quoted context omitted.
Yes, use Fetch API to retrieve the resources, and pass the resulting data to a function that uses the DOM APIs to create the table element + children. If you're not attaching event handlers to the elements, and if the data is properly sanitized, you can also use a combination of `innerHTML` + HTML written in template strings to dynamically create the markup. Often people will see this and say "that doesn't scale!" We…
Why doesn't that scale? What would the optimizations be?
On the other hand, DOM APIs can get expensive quickly especially if you're calling `document.createElement` repeatedly to create maybe 1000s of table rows.
So then you have to find ways to minimize the amount of DOM operations that must happen. Or like the rest of us, just pick up a JS library that already solved this problem.
Re: Ask HN: What's is your go to toolset for simple front end development?
#286Earlier quoted context omitted.
IMO, the problem with vanilla JS on anything other than trivial pages is you end up having to implement a bunch of common patterns (such as interpolation and form binding) and before long you’ve got what is effectively a private framework that you’ve kludged together in an ad hoc way while simultaneously trying not to be distracted from solving your actual problem. But because it’s come about in this organic, unfocus…
I prefer my own mess over someone else’s mess :)
Re: Ask HN: What's is your go to toolset for simple front end development?
#287For those recommending Tailwind, it's huge if you're using it from the CDN (318K uncompressed). Other tools (except for Tachyons, these are maybe out of scope for a home lab): - Tachyons [0] is a small (16K-ish) utility class framework. - DaisyUI [1] is a free and open source component lib for Tailwind. - WindiCSS [2] is built on Tailwind with some additional features. - UnoCSS [3], an interesting on-demand atomic CS…
Regarding Tailwind, shouldn’t you always run postcss in production? I wondered if anyone’s working on the following: Tailwind.js running on a cloudflare worker (so it’s a “CDN”) and calculates the postcss on first request and then caches it. Wouldn’t that be the best of both worlds?
Re: Ask HN: What's is your go to toolset for simple front end development?
#288Earlier quoted context omitted.
Your site is broken for crosspromote - things are too wide for the viewport leading to things being clipped and so unreadable (at least on mobile).
Ugh, dammit. Thanks for catching that.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Text/Wr...
Re: Ask HN: What's is your go to toolset for simple front end development?
#289Earlier quoted context omitted.
Cosigned. And if the backend is yet to be written then put the whole thing on Lamdera.
I'm trying to understand Lamdera, but I dont really get it. How does it persist data? Does it use WebSockets (and thus push from server)?
Re: Ask HN: What's is your go to toolset for simple front end development?
#290Earlier quoted context omitted.
I'm trying to understand Lamdera, but I dont really get it. How does it persist data? Does it use WebSockets (and thus push from server)?
I think that's exactly how it works. The whole backend model persists for every user. Your backend model is what would be your DB state in another stack.
I'm a bit scared for what that does to state that's shared (instead of that's specific to a user).
Very cool project non the less..