News for hackers. Stuff that matters.
Re:I'm Betting on HTML by nzoschke on Wednesday August 02, 2023 @12:32AM (#36966992)
Great read and interactive demo.

After a few years of dabbling with Flutter I just came back to the same conclusion: bet on HTML.

Astro / Tailwind / Daisy UI / Alpine.js makes it lovely to build an HTML site with a lot of simple SSR and a little bit of client side reactivity peppered about.

The result is simple sane HTML files that look and work great on desktop web browser and and mobile wrapped web view.

My app is basically static so it caches in a CDN, works offline, and view source makes it easy to debug.

Re:I'm Betting on HTML by nathansherburn on Wednesday August 02, 2023 @12:54AM (#36967098)
After trying a bunch of fancy frameworks and platforms I ended up doing exactly this - a static site with alpinejs and tailwind. It has been by far the best decision I've ever made. And the best thing is I'm confident any new dev will be able to pick up my 100 line build file and grok it in about 3min. No matter whether they're react, angular, PHP or python folks - it's dead simple and I love it.
Re:I'm Betting on HTML by resonious on Wednesday August 02, 2023 @01:03AM (#36967143)
Lately I've been doing raw html and css. No build. I just write the files. It's really easy. Yeah there's some duplicate code in the header but grep is not that hard to use.
Re:I'm Betting on HTML by andai on Wednesday August 02, 2023 @02:51AM (#36967822)
My build system is cat!
Re:I'm Betting on HTML by WeAddValue on Wednesday August 02, 2023 @11:22AM (#36972150)
Meow!
Re:I'm Betting on HTML by irrational on Wednesday August 02, 2023 @03:35AM (#36968070)
Now move to the next level and have no build system.
Re:I'm Betting on HTML by em-bee on Wednesday August 02, 2023 @10:05AM (#36971080)
i am building sites with aurelia without a build system. there used to be a quick-start tutorial where you could just download an archive with aurelia ready to run. no serverside tools or build tools necessary at all. it even used to work loading the whole app via file://... back when browsers still trusted that. it no longer works only because of browser restrictions on using file://

the tutorial is gone, but the download still exists referenced here: https://stackoverflow.com/a/39681911

the downside is that i don't know how to update this to newer versions or add extensions.

it might also be possible to create a new version of this using aurelia-cli, but i haven't yet figured out how.

Re:I'm Betting on HTML by bingemaker on Wednesday August 02, 2023 @01:37AM (#36967305)
Exporting to web using Flutter is a nightmare I believe. When I checked last time, rendering happens on a canvas. There is no markup at all
Re:I'm Betting on HTML by satvikpendem on Wednesday August 02, 2023 @01:45AM (#36967356)
I use Flutter for some web apps, it works fine. It's good for web apps, not web sites, and compared to other desktop or mobile apps, there is literally no difference between rendering on a canvas to rendering on Qt or SwiftUI. People, in my experience, just get up in arms about the web that does not happen with other technologies.
Re:I'm Betting on HTML by troupo on Wednesday August 02, 2023 @01:48AM (#36967384)
> compared to other desktop or mobile apps, there is literally no difference between rendering on a canvas to rendering on Qt or SwiftUI.

Except, you know, accessibility.

> just get up in arms about the web that does not happen with other technologies.

And for a good reason.

Re:I'm Betting on HTML by satvikpendem on Wednesday August 02, 2023 @02:27AM (#36967665)
Do you realize that Flutter has an accessibility system that is often more advanced than most desktop UI frameworks? [0] I notice this often from non-Flutter devs, Flutter has some pretty good a11y.

[0] https://docs.flutter.dev/accessibility-and-localization/acce...

Re:I'm Betting on HTML by troupo on Wednesday August 02, 2023 @03:54AM (#36968192)
Good to know! For the longest time ever their export to web was just canvas with no attempt at making it accessible.
Re:I'm Betting on HTML by mhoad on Wednesday August 02, 2023 @04:25AM (#36968404)
I don’t know if even that was actually true? As far as I know the moment they introduced canvas as a rendering target they also produced a DOM structure along side it to capture the accessibility tree as they were still waiting on a more native solution in the form of AOM (accessibility object model) to be finalised.
Re:I'm Betting on HTML by frabcus on Wednesday August 02, 2023 @02:00AM (#36967472)
Flutter has a wild accessibility system that also exports DOM elements just for the aria labels.

This all breaks the browser’s in page search function though! Long standing bug with no fix yet.

Re:I'm Betting on HTML by Alifatisk on Wednesday August 02, 2023 @07:38AM (#36969485)
> rendering happens on a canvas

flutter run --web-renderer=html

Re:I'm Betting on HTML by bingemaker on Thursday August 03, 2023 @03:52AM (#36982670)
Glad to know that this exists!
Re:I'm Betting on HTML by Alifatisk on Thursday August 03, 2023 @06:12PM (#36992746)
Yeah, there is even more fun arguments like "--enable-impeller" to massively improve the rendering performance!
Re:I'm Betting on HTML by cloked on Wednesday August 02, 2023 @01:46AM (#36967370)
yup, Astro and "islands architecture" is such a joy to work with.
Re:I'm Betting on HTML by juancampa on Wednesday August 02, 2023 @09:50AM (#36970894)
Can you help me understand the utility of Daisy UI? Seems like it's the good old classes+stylesheet with extra steps (tailwind)
Re:I'm Betting on HTML by gbalduzzi on Wednesday August 02, 2023 @10:24AM (#36971322)
Well, instead of writing this for every button in your web app:

<button class="bg-indigo-600 px-4 py-3 text-center text-sm font-semibold inline-block text-white cursor-pointer uppercase transition duration-200 ease-in-out rounded-md hover:bg-indigo-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-600 focus-visible:ring-offset-2 active:scale-95"> Button </button>

You can write this:

<button class="btn btn-primary"> Button </button>

The utility is pretty clear to me

Re:I'm Betting on HTML by 0JzW on Wednesday August 02, 2023 @10:32AM (#36971443)
so we've just circled back to good ol bootstrap?
Re:I'm Betting on HTML by Alifatisk on Wednesday August 02, 2023 @12:04PM (#36972768)
That's even valid bootstrap classes
Re:I'm Betting on HTML by juancampa on Wednesday August 02, 2023 @06:06PM (#36978378)
Exactly my point