diff --git a/book/CH01_HypermediaAReintroduction.adoc b/book/CH01_HypermediaAReintroduction.adoc index a2062c6..679e8d4 100644 --- a/book/CH01_HypermediaAReintroduction.adoc +++ b/book/CH01_HypermediaAReintroduction.adoc @@ -695,3 +695,20 @@ We hope that, in addition, you will also become as passionate about it as we are This book is, in part, a plea that we "`let the web be the web`", that we take the original architecture of the web seriously, and that we consider the entire _hypermedia system_ it makes available to us when we build applications with it. + + +[.design-note] +.HTML Note: Stay Close to the Output +**** +[quote, Manuel Matuzović, 'https://www.matuzo.at/blog/2023/single-page-applications-criticism[Why I\'m not the biggest fan of Single Page Applications]'] +The fact that the HTML document is something that you barely touch, because everything you need in there will be injected via JavaScript, puts the document and the page structure out of focus. + +In order to avoid `
` soup (or Markdown soup, or Component soup), you need to be aware of the markup you're producing and be able to change it. + +Some SPA frameworks, and some web components, make this more difficult by putting layers of abstraction between the code the developer writes and the generated markup. + +While these abstractions can allow developers to create richer UI or work faster, +their pervasiveness means that developers can lose sight of the actual HTML (and JavaScript) being sent to clients. +Without diligent testing, this leads to inaccessibility, poor SEO, and bloat. +**** + diff --git a/book/CH02_ComponentsOfAHypermediaSystem.adoc b/book/CH02_ComponentsOfAHypermediaSystem.adoc index 7b6feb5..a84cfa7 100644 --- a/book/CH02_ComponentsOfAHypermediaSystem.adoc +++ b/book/CH02_ComponentsOfAHypermediaSystem.adoc @@ -794,3 +794,43 @@ systems so flexible. If you were not aware of the full significance of REST and HATEOAS before now, don't feel bad: it took some of us over a decade of working in web development, and building a hypermedia-oriented library to boot, to understand the special nature of HTML, hypermedia and the web! + + +[.design-note] +.HTML Note:
Soup +**** +The best-known kind of messy HTML is `
` soup. + +When developers fall back on the generic `
` and `` elements instead of more meaningful tags, +we either degrade the quality of our websites or create more work for ourselves -- probably both. + +For example, instead of adding a button using the dedicated `