Live data from Hacker News

HTML First

html-first.com

171–180 of 551 posts

Re: HTML First

#172
Specifically on the “use libraries that leverage html attributes” point:

I find this “dishonest” to the overarching ideals of this manifest: If you want to follow standards, and allow view source, you can absolutely write vanilla JS, and end up with more idiomatic and approachable source than

    _="on input put me into #output"
And then as you grow out of the simple examples you’ll probably adopt a library like React which will restrict you less than these html attribute “abusing” alternatives.

Of other points, I especially like the “no built step”. A native support for JSX would really smooth out the path from vinalla to React.

Re: HTML First

#173
post #160

Earlier quoted context omitted.

Why? Why does it need to be good for big projects in order to be good practice? I’m genuinely asking. I never understood this argument that people bring. In my view, the web is 95% small to medium projects. Most technologies should be focused on that - simple solutions for simple projectS. Add complexity later.

Because in practice there is little value in making easier things easier. While 95% on the web are small projects, 95% of work is done on large projects. Many developers also dislike using many different frameworks, because that would require more learning. If you have to choose one technology it's better to use one where you can do everything. Not one where you can do 95% really fast, but 5% not at all. I personally…

Do you have any data to support that 95% claim? As big as FAANG and other huge development teams are, it seems to me it's still only the tip of the pyramid, with the overwhelming majority of people in the industry working full time on small or midsized projects. It'd be interesting to see some concrete info on it.

Re: HTML First

#174
post #144

Earlier quoted context omitted.

Have you used HTMX? I am yet to find a reason for using frameworks like React instead of HTMX.

I have used HTMX with Flask and Jinja. It makes the process much simpler to do the frontend development as a backend developer. But I can see its limitations. It's not suitable for anything bigger than a hobby project. Also, it doesn't help with keeping the frontend and the api totally separate. You have to return the html object from API which has its own set of problems.

I would like to know more about these limitations. I haven't used HTMX on more than a hobby project myself.

>You have to return the html object from API which has its own set of problems.

If you mean that HTMX can't consume JSON. Can't you just create a separate end point for JSON responses?

Re: HTML First

#175
post #160

Earlier quoted context omitted.

Because in practice there is little value in making easier things easier. While 95% on the web are small projects, 95% of work is done on large projects. Many developers also dislike using many different frameworks, because that would require more learning. If you have to choose one technology it's better to use one where you can do everything. Not one where you can do 95% really fast, but 5% not at all. I personally…

This. Even for basic websites you benefit from some form of templating/components for example to get the nav & footer on each page.

Even basic websites? It is developer vs user then.

I think otherwise. I.e.: blog shouldn't be web app just because it's content management is.

Re: HTML First

#176

OP Here. This got more engagement than expected, some of the bits I've picked up in discussion: "Recommends skipping build step then mentions Tailwind": We use static-tailwind, a version with no build step, in development. "Recommends hyperscript, a new non-js syntax" - Agree this isn't perfect & would prefer something which uses js. Was going to use Alpine but also have found that to be quite brittle in production.…

Congrats on the big post!

Though I do think some of your ideals are worth challenging either because I think you're making an incorrect assumption or holding too close to some particular dogma, it's always good to hear people pushing for simplicity in the space. Keep pushing :)

Re: HTML First

#177
I'm missing a bit "if you have to use javascript, use vanilla javascript where possible" here.

HTML attributes are no silver bullet. You can still have a bloated framework that puts some ill-fitting, homegrown data model over your code and drowns the codebase in "magic", even if all the interaction with that magic is through HTML elements and attributes.

Generally, I think there is lots of good advice here, but I don't really understand the "messianic" attitude of the HTMX crowd. Why all the effort to actively discourage any other approach?

Re: HTML First

#178

What's the opinion on re-introducing HTML attributes for style properties, eg. (possibly with additional enumerated attributes usable in short value-only syntax as in ) rather than ? I mean, introducing a secondary syntax for item-values, like CSS did, quite never made sense to me personally even though it was nevertheless thoroughly defended ([1]). I guess it doesn't make sense to me coming from an SGML background w…

For me, it does not matter if it is inline CSS, style attributes or Tailwind. I do not like them.

Re: HTML First

#180

This is fun in to theory and in simple examples, but show me a big project that applies this and how it made a difference. There are some bold objectives at the start that would be wonderful, but I’m a bit disappointed by the advice. I really don’t see how these would work in anything other than very basic scenarios, even less how they would achieve the objectives. I’m all for using the web platform to the max, and I…

Agree. I've created my first website in 1999 with plain HTML, CSS, vanilla JS, hosted on Geocities. Since then I've been using PHP/WordPress/Yii/Laravel, Ruby/Rails/Sinatra/Jekyll, React/Typescript, ClojureScript to create both sites and apps. With React / TSX components / CSS-in-TS / Effects / Context I'm home. Finally a fully fledged programming language for the web / front-end. A language made explicitly for the f…

Perhaps web publishing shouldn't be presupposed to be 'software development'?
Post reply on HN