{
    "version": "https://jsonfeed.org/version/1.1",
    "title": "Book Reviews  dade",
    "description": "  Book Reviews  dade",
    "home_page_url": "https://0xda.de/",
    "feed_url": "https://0xda.de/tags/book-reviews/index.json",
    "language": "en",
    "authors": [
        {
            "name": "0xdade",
            "url": "https://0xda.de",
            "avatar": "https://0xda.de/img/dade-transparent-logo.png"
        }
    ],
    "items": [
        {
            "title": "Book Review: Hypermedia Systems",
            "date_published": "2023-01-16T11:27:31-08:00",
            "date_modified": "2024-03-17T13:11:03-07:00",
            "id": "https://0xda.de/blog/2023/01/book-review-hypermedia-systems/",
            "url": "https://0xda.de/blog/2023/01/book-review-hypermedia-systems/",
            "content_html": "\u003cp\u003eIn 2023 I decided I wanted to spend more time reading and more time writing. What better way to kick that off than with a book review? We\u0026rsquo;re starting the year with \u003ca href=\"https://hypermedia.systems/\"\u003eHypermedia Systems\u003c/a\u003e, a work in progress book that focuses on extending hypermedia for a better web app experience, without having to resort to single page applications and JSON APIs as far as the eye can see. Unfortunately, since this book is still a draft, I had to mostly read the HTML version on my phone. But overall, this book inspired me and encouraged me to embrace hypermedia rather than fear it.\u003c/p\u003e\n\u003cp\u003eThis book will likely be an outlier from the rest of the books that I read, as well \u0026ndash; this book is \u003ca href=\"https://github.com/bigskysoftware/hypermedia-systems\"\u003eentirely open source\u003c/a\u003e.\u003c/p\u003e\n\u003ch2 id=\"key-takeaways\"\u003eKey Takeaways\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eBy embracing hypermedia, we can reduce complexity significantly by not needing to manage application state in both the server and the client.\u003c/li\u003e\n\u003cli\u003eHTML and HTTP were both built explicitly for hypermedia, but HTML falls short in a few critical ways that result in javascript frameworks gaining popularity.\u003c/li\u003e\n\u003cli\u003eBy addressing four core limitations of HTML, we can create applications that feel modern and snappy, without needing to resort to entire single page applications.\n\u003cul\u003e\n\u003cli\u003eBy making any element capable of issuing an HTTP request\u003c/li\u003e\n\u003cli\u003eBy making any event capable of triggering an HTTP event\u003c/li\u003e\n\u003cli\u003eBy making all the different types of HTTP methods available\u003c/li\u003e\n\u003cli\u003eBy making it possible to target any element in the DOM for replacement.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eREST does not mean \u0026ldquo;a bunch of JSON APIs\u0026rdquo; \u0026ndash; in fact, REST originally explicitly required the exchange of hypermedia, NOT the use of just JSON APIs.\u003c/li\u003e\n\u003cli\u003eSeparation of concerns can lead to more complicated systems that are harder to understand, whereas focusing on \u003ca href=\"https://htmx.org/essays/locality-of-behaviour/\"\u003elocality of behavior\u003c/a\u003e results in easier to understand and thereby easier to maintain code.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"what-i-liked\"\u003eWhat I Liked\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eThe book walks through the development of a simple contacts app, Contact.app, to explain concepts and show how to implement what is being talked about.\u003c/li\u003e\n\u003cli\u003eThe book is free and accessible, so I was able to freely share it with several developer friends.\u003c/li\u003e\n\u003cli\u003eI found the underlying subject matter inspiring in its simplicity.\u003c/li\u003e\n\u003cli\u003eThere were many references to useful resources that I haven\u0026rsquo;t previously read, which means I can follow up more on the things I was interested in.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"what-i-didnt-like\"\u003eWhat I Didn\u0026rsquo;t Like\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eBecaues the book is only available in HTML right now, I wasn\u0026rsquo;t able to easily make highlights on instapaper without adding every section to my instapaper first. It turns out that there is the \u003ca href=\"https://hypermedia.systems/book/hypermedia-systems/\"\u003ewhole book as one html file\u003c/a\u003e, I just didn\u0026rsquo;t see it until I was finished and writing this review. A pdf/epub version I could read and highlight on my kindle or remarkable.\u003c/li\u003e\n\u003cli\u003eThe reading experience on mobile was a little frustrating at times because certain links didn\u0026rsquo;t really work the way you\u0026rsquo;d expect them to. For instance, I don\u0026rsquo;t think I could load \u003ca href=\"https://hypermedia.systems/book/part/hyperview/\"\u003ethis page\u003c/a\u003e as anything other than the raw html while reading from my phone.\u003c/li\u003e\n\u003cli\u003eThere were a number of typos throughout that were a little distracting, but hey \u0026ndash; its open source, we can just open a PR to fix those.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"htmx-hyperscript-hyperview-have-me-feeling-hyper\"\u003eHTMX, Hyperscript, HyperView have me feeling Hyper\u003c/h2\u003e\n\u003cp\u003eAs I read through this book, I was also working on a small habit tracking application for myself and decided to use this as an opportunity to embrace hypermedia instead of falling into the react trap. I was skeptical that it would really feel as nice as a react app typically does, but much to my surprise, I was basically one attribute away from a revolutionized web experience.\u003c/p\u003e\n\u003cp\u003eEnter \u003ca href=\"https://htmx.org/attributes/hx-boost/\"\u003ehx-boost\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003ehx-boost is an attribute that can be applied to the body of your html, and it will automatically cause all of your links to be \u0026ldquo;boosted\u0026rdquo;, which basically means that the requests are made via javascript and then the \u003ccode\u003ebody\u003c/code\u003e of the page is replaced, but not the whole \u003ccode\u003ehead\u003c/code\u003e tag. This means no re-parsing javascript, no re-parsing css, etc. It removed that unwanted flash of white that is so common with server-side rendered pages.\u003c/p\u003e\n\u003cp\u003eThis caused me to really start to dig into it more, and I am happy to be putting Hyperscript, HTMX, and HyperView on my 2023 list of technologies to work with.\u003c/p\u003e\n\u003ch3 id=\"hyperview\"\u003eHyperview\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://hyperview.org/\"\u003eHyperview\u003c/a\u003e is a fascinating construct to allow us to build native mobile apps that still embrace hypermedia as the form of exchange. It uses react-native to interact with the device, and exchanges HXML, which is basically an XML format specifically for rendering applications on mobile devices. I haven\u0026rsquo;t used it much yet, but I am eagerly looking forward to turning my habit tracking app into a mobile app for my phone with it. I hope it lives up to the hype from the book.\u003c/p\u003e\n\u003ch3 id=\"hyperscript\"\u003eHyperscript\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://hyperscript.org/\"\u003eHyperscript\u003c/a\u003e is a fascinating approach to javascript workflows. It uses a near-english syntax that is designed to be embedded directly onto HTML elements, further facilitating the locality of behavior. I\u0026rsquo;ve only written a few lines of hyperscript so far, but it was just as easy as outlined in the book.\u003c/p\u003e\n\u003ch2 id=\"final-thoughts\"\u003eFinal Thoughts\u003c/h2\u003e\n\u003cp\u003eReading this book really encouraged me to try to embrace simplicity and avoid all of the shiny new things and complicated frameworks out there. I realize there is a certain irony in that, since each of these things are their own new things. But something about HTMX, Hyperview, and Hyperscript is just inspiring. I\u0026rsquo;ll be looking for any way to shoehorn these philosophies into my development at work.\u003c/p\u003e\n"
        }
        ]
}
