diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 0000000..846371e --- /dev/null +++ b/docs/about.md @@ -0,0 +1,175 @@ +# About hotosm/ui + +HOT maintains many web based tools that require a UI. + +Typically these interfaces were developed using React, due to existing +experience and to avoid fragmentation. + +Going forward HOT requires a more flexible approach that can be used in +multiple different frameworks (including directly in HTML & also HTMX). + +The solution to this is Web Components, which are framework agnostic. + +## Web Components + +- We can probably all agree that as of 2024, the state of the JS framework + ecosystem is quite messy: it's just too fragmented to make an informed + "future proof" decision. +- Web Components are a web standard, so should be supported for the long term, + but adoption has been slow for + [various reasons](https://daverupert.com/2023/07/why-not-webcomponents/) + (web standards are complex and very slow to update) +- Web Components sound like the most sustainable solution, but they historicaly + also had some problems (shadow DOM styling, styling framework integration, + performance, component versioning). +- A few of these issues are addressed by frameworks such as Lit. + Although we should be aware, this is yet another framework. + +### What are they? + +Web Components are built upon four existing technologies: + +- Custom Elements: + - Allows developers to define their own HTML elements with custom + behavior and properties. +- Shadow DOM: + - Provides encapsulation by creating a scoped DOM subtree for a component, + isolating its styles and structure from the rest of the document. +- HTML Templates: + - Enables the creation of template elements that can be cloned + and inserted into the DOM. + - Represented by the `