Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal: Object-Oriented HTML #137

Open
ox-harris opened this issue Jan 26, 2024 · 1 comment
Open

Proposal: Object-Oriented HTML #137

ox-harris opened this issue Jan 26, 2024 · 1 comment

Comments

@ox-harris
Copy link

ox-harris commented Jan 26, 2024

Introduction

Hey all,

This is pursuant to making HTML more dynamic and object-oriented! On the agenda is:

  • Modular markup (style and script scoping, ID and IDREF namespacing)
  • HTML Imports (new effort)
  • Data-binding
  • Data plumbing

└ Full explainer is right on the project README: Object-Oriented HTML

└ And here's a long-form introductory article to the project: Revisiting the HTML Problem Space and Introducing OOHTML

Motivation

I'm a big fan of the HTML-first + Progressive Enhancement approach to UI development!

For a background:

  1. I like to be able to write HTML by default and progressively add JavaScript (and, in the same way, progressively involve tooling) instead of go ahead of the problem by going the other way around!

  2. Also turns out that UIs are more resilient when built on the same principles:

    • given how browsers process web pages: HTML initially, then JavaScript eventually; with the bulk of the page being best done at the initial phase

    • and given how, on a more general note, performance is a function of browsers doing the heavy lifting

But it turns out that as compelling as it is to move more to HTML, there isn't as much you can do in HTML as you'd like to! In my experience, four specific limitations have felt like a deal breaker:

1: How do you do reactivity?
2: How do you nake components?
3: How do you re-use components?
4: How do you pass data/"props"?

I've since committed to exploring the answers to those questions, and all of that effort is the proof of concept for this proposal!

I am hoping that this moves us forward on the HTML-first + Progressive Enhancement paradigm! But as with everything on the web, it's all about your thoughts!!!

Feedback

I welcome feedback in this thread, but encourage you to file bugs against the Explainer.

@ox-harris ox-harris changed the title PROPOSAL NAME Object-Oriented HTML Jan 26, 2024
@ox-harris ox-harris changed the title Object-Oriented HTML Proposal: Object-Oriented HTML Jan 26, 2024
@sashafirsov
Copy link

POC on the subject: https://unpkg.com/@epa-wg/custom-element@0.0.21/index.html
has all requested features from data binding to modular use

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants