Carson from Big Sky Software joins Jerod & Feross to discuss htmx and _hyperscript. They explore reducing JavaScript reliance, implementing active search feature with htmx, and comparing React ecosystem with htmx. They also delve into distinguishing web APIs vs app APIs and HyperScript revolutionizing front-end programming.
Reducing JavaScript complexity enhances code reliability and minimizes bugs.
HTML over the wire promotes server-side rendering and simplifies web development with attributes like HX post.
HyperScript enables seamless integration with HTML, simplifying event handling and dynamic web elements.
Deep dives
Reducing JavaScript Code Complexity
Developers are exploring ways to reduce the complexity of JavaScript by minimizing the amount of code written. By writing less JavaScript, there is a focus on reducing potential bugs and system fragility due to code volume. This approach aims to streamline development and enhance code reliability.
HTML Over the Wire Philosophy
HTML over the wire is presented as a future-oriented approach towards web development, focusing on server-side rendering and reducing the reliance on extensive JavaScript usage. The philosophy emphasizes using HTML attributes like HX post, HX trigger, and HX target for interactions, enabling simpler yet effective web app development.
Local Behavior via HTMLX Attributes
HTMLX promotes the concept of locality of behavior, advocating for self-contained code units where the behavior is explicit within the code block itself. Attributes in HTMLX, like inheritance and extensions, facilitate reusable and understandable implementations within the HTML structure. Through this approach, developers can achieve sophisticated web applications with minimal JavaScript and CSS involvement.
Understanding the Evolution of RESTful APIs
The podcast delves into the evolution of RESTful APIs, highlighting how the term 'REST' has shifted in meaning within the web development sphere. Initially describing the original web model in Web 1.0, focusing on hypertext interactions, REST has now evolved to encompass any JSON API. The discussion emphasizes the distinction between REST and newer technologies like Facebook's GraphQL, which diverge from RESTful principles, aligning more with data APIs. Shifting from XML to JSON for APIs has altered the API landscape, sparking debates around the relevance and effectiveness of RESTful architecture.
Exploring HyperScript for Front-End Development
The episode introduces HyperScript, an experimental front-end programming language designed for seamless integration with HTML. HyperScript's asynchronous transparency stands out, allowing a mix of synchronous and asynchronous code without explicit annotations or callbacks. This unique feature simplifies event handling and offers a clean, readable syntax for dynamically updating web elements. By enabling event-driven control flow and asynchronous execution, HyperScript streamlines front-end development, providing developers with a powerful tool for creating interactive and responsive user interfaces.
Jerod & Feross learn all about htmx (a pragmatic approach to web frontends) and _hyperscript (an experimental scripting language inspired by HyperTalk) with special guest Carson from Big Sky Software. Thanks to Rajasegar Chandran for requesting this episode!
Changelog++ members save 3 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
O'Reilly Media – Learn by doing — Python, data, AI, machine learning, Kubernetes, Docker, and more. Just open your browser and dive in. Learn more and keep your teams’ skills sharp at oreilly.com/changelog
Square – Develop on the platform that sellers trust! Use API Explorer to interact with, test, or play with your applications in Square. You can build, view, and send HTTP requests that call Square APIs with API Explorer. Get started with Square, check out the API Explorer, or the API Explorer docs.
Sentry – Build better software, faster with Sentry’s application monitoring platform. Diagnose, fix, and optimize the performance of your code. Cut your time on error resolution from hours to minutes. Use the code PARTYTIME and get team plan free for three months.
Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com.