Live data from Hacker News

HTML First

html-first.com

21–30 of 551 posts

Re: HTML First

#21

React was designed to solve all these problems. Now these problems are used to solve react. Programming, like life, is a flat circle.

No, it was designed to address problems that were not solvable by the then-current state of simple technologies.

Re: HTML First

#23
This one confuses me:

> Where libraries are necessary, use libraries that leverage html attributes over libraries built around javascript or custom syntax

And then they demo using _hyperscript [0] as encouraged. However, that's a library built around a custom syntax. It's only using an HTML attribute to encode a script that's in a new language you need to learn. Is this serious?

[0] https://hyperscript.org

Re: HTML First

#24

React was designed to solve all these problems. Now these problems are used to solve react. Programming, like life, is a flat circle.

How was React designed to "avoid the build step" or "make View Source useful"?

Re: HTML First

#25

“Locality of behaviour” is such a poorly defined rule. It’s just an invented name for going against separation of concerns. Calling CSS “spooky action at a distance” is a massive stretch too. Good principles here but the arguments are quite weak and could be much simpler.

The primary stated goal is “substantially widen the pool of people who can work on web software codebases.” That’s very different from typical advice for programmers.

Customization isn’t required as long as defaults work. As such the efficiency gains from CSS etc take a back seat to simplicity.

Re: HTML First

#26
I love the ideas here, but honestly the examples are a bit weak here.

> Where possible, default to defining style and behaviour with inline HTML attributes

but their example wouldn't work.

  
should probably be

  
which I think makes it a little more clear how weird this could get if you wanted to add more styles. You just keep growing the params passed to the ClassList add method, in a string. I would personally find

  
  button:active { background: green; }
to be much more readable, but the author seems to imply this is complicated due to their approach of "Locality of Behaviour".

--

> Where libraries are necessary, use libraries that leverage html attributes over libraries built around javascript or custom syntax

I totally agree! But why is your example of a library not built around javascript or a custom syntax feature:

  
  
That "on input put me into #output" I think is more jarring that the library shown as the bad example. Even better, this could just be some JS, without a framework at all.

--

> Prefer "naked" HTML to obfuscation layers that compile down to HTML

Their example is to not use Rails ERB tag helpers, in your templates. I don't think this is that big of an issue, these helpers can actually handle a lot of things that will look messy if you use the minimal amount of templating to write them. The example leaves off unique dom ids, turbo tags (very HTML/no JS focused!) and iteration.

Re: HTML First

#27
post #3

I want to agree with this based on the title, but why would you do something like this: Click me if you're already using React? Yes the React code is a lot more verbose and has a bunch of "cruft" for lack of a better word. But you're already using it for the rest of your site, so you should (IMO) continue using it rather than mixing and matching approaches.

I thought the point of the article was more to avoid react if all you want to do is change background color. Thus more: don't use react in the first place, rather than: here is how to use less react.

Re: HTML First

#28

This is a blog spam post written by an author that has no credibility in the space rather than creating an agency that touts itself as "A software agency that doesn't suck.". How bizarre. Even more, the author uses every possible library under the sun, from Tailwind to Framer, only to evangelise about raw HTML and topics he provides no credibility on. To add to that, even the links to learn more about their agency al…

I like how he concludes "The practices and principles described on this site are still considered niche in the industry as a whole". Like he's the only one out there who knows about the details/summary tags, or who uses static HTML documents instead of React.

Re: HTML First

#29
Can the people that want this HTML-first world style it to look the ways they want themselves?

My experience has been that proponents of HTMX and the like skew heavily backend and never feel comfortable with CSS.

Why listen to UX thoughts from a population who are scared of UX?

Re: HTML First

#30
I love the idea!

In my current company we started with HTML and embedded JavaScript at the bottom and Styles at the top. Everything in one file, very easy to find and understand.

It was "a little bit" slower. Pagespeed Insights didn't like it.

Now we are "modern" with CSS and JS in a build process. And nobody knows which file to look at...

My new Projects will start with HTML first, again.

My credibility: 45 years, commercial web programming >25 years, 3 successful web companies founded as CTO

Post reply on HN