HMPL – template language for displaying UI from server to client
hmpl is a lightweight server-side template language that generates HTML, reducing JavaScript size and improving loading speeds for SPAs. It supports loading indicators, error handling, and offers various installation options.
Read original articlehmpl is a lightweight template language designed for generating HTML on the server side, which is then sent to the client. This method reduces the size of JavaScript files and enhances loading speeds for single-page applications (SPAs). Key features of hmpl include the use of the Fetch API for server requests, minimized client-side JavaScript by generating markup on the server, and built-in support for loading indicators and error handling within templates. Installation can be done via npm, manual download, or through a CDN. A basic usage example demonstrates how to compile a template and append the generated HTML to a specified DOM element. Additional resources such as the official website, documentation, demo sandbox, and examples repository are available for users. The hmpl language is licensed under the MIT License.
- hmpl is a server-side template language that generates HTML for client use.
- It reduces client-side JavaScript requirements, improving SPA loading speeds.
- Installation options include npm, manual download, and CDN usage.
- The language supports loading indicators and error handling in templates.
- Comprehensive resources and documentation are provided for users.
Related
Htmx does not play well with content security policy
HTMX, a JavaScript framework, presents security challenges due to its handling of HTML tags and external script loading. Despite some security features, HTMX usage raises HTML injection risks, complicating full security implementation.
Templating in JavaScript, from Zero Dependencies on Up (2021)
The article explores dependency-free templating in JavaScript, favoring template literals and functions over traditional methods like JSX. It demonstrates creating components with functions and suggests a small dependency for enhanced syntax. Benefits include simplicity and flexibility for rendering in diverse environments.
Show HN: Gothem stack – An Htmx and templ template
The "gothem-stack" GitHub project is a flexible template using Go, Templ, HTMX, Echo, and Mage. It supports TailwindCSS, DaisyUI, and Alpine.js, aiding quick setup and various functionalities. Persistence relies on Postgres and sqlc.
FastHTML – Modern web applications in pure Python
FastHTML is a Python library for building web applications efficiently, supporting dynamic content, reusable components, and various databases. It simplifies development, focusing on performance and scalability for Python developers.
From React to Htmx on a real-world SaaS product (2022) [video]
David Guillo shares his experience replacing React with htmx in a SAS product, highlighting htmx's advantages for creating rich user interfaces without JavaScript frameworks, emphasizing accessibility and ease of use.
*looks inside, it's JavaScript*
My flow is that focusing on the data structure and methods allows the UI to be completely abstract. Not in a magic way but in a “maybe we should use cross compile this into C++ and use OpenGL if the UI becomes too complex. This is how you get AutoCad or film editing software running essentially as a Proton/video game runs.
When your app gets beyond a certain level of complexity (window composition, etc) yeah there’s ways to make it happen.
From my understanding, modern frameworks(React) use both. Why would you limit yourself to just server-side? Isn’t there a trade off between server-side and client-side rendering?
Related
Htmx does not play well with content security policy
HTMX, a JavaScript framework, presents security challenges due to its handling of HTML tags and external script loading. Despite some security features, HTMX usage raises HTML injection risks, complicating full security implementation.
Templating in JavaScript, from Zero Dependencies on Up (2021)
The article explores dependency-free templating in JavaScript, favoring template literals and functions over traditional methods like JSX. It demonstrates creating components with functions and suggests a small dependency for enhanced syntax. Benefits include simplicity and flexibility for rendering in diverse environments.
Show HN: Gothem stack – An Htmx and templ template
The "gothem-stack" GitHub project is a flexible template using Go, Templ, HTMX, Echo, and Mage. It supports TailwindCSS, DaisyUI, and Alpine.js, aiding quick setup and various functionalities. Persistence relies on Postgres and sqlc.
FastHTML – Modern web applications in pure Python
FastHTML is a Python library for building web applications efficiently, supporting dynamic content, reusable components, and various databases. It simplifies development, focusing on performance and scalability for Python developers.
From React to Htmx on a real-world SaaS product (2022) [video]
David Guillo shares his experience replacing React with htmx in a SAS product, highlighting htmx's advantages for creating rich user interfaces without JavaScript frameworks, emphasizing accessibility and ease of use.