5 ms·
HMPL – template language for displaying UI from server to client
- breck 2y ago[flagged]
- benatkin 2y agoTo save someone a click, this is an off the cuff review of it, followed by a suggestion to add it to a directory site run by the author that has an unusual interface that repurposes the back button (if you follow one or more internal links, the back button loops).
- breck 2y ago> if you follow one or more internal links, the back button loops This should not happen. Any chance you could record a Loom (or other screencast tool), showing me what you mean? That way I can add a fix to our open source, public domain database of languages (https://github.com/breck7/pldb https://github.com/breck7/pldb), which I thought could really help the OP, who is building a new language.
- benatkin 2y agoAh, I see. It's not exactly the back button, but it's the command-left keyboard combination that I most often use to go back. I'm using a fully updated Chrome on a mac, and don't have any extensions installed FWIW. Your keybinding appears to be for the left arrow, so you would just have to check for modifier keys to allow my use of back to work.
- breck 2y agoSuper helpful! Thank you! Fix pushed: https://github.com/breck7/scroll/commit/dc10ea246c54f1ae1d4ccef7eced0c63d63aa0f5 https://github.com/breck7/scroll/commit/dc10ea246c54f1ae1d4c...
- antonmak1 2y agoThank you very much for creating a video about the template language review! I have just started making it and it is not yet included in any databases.
- echoangle 2y agoMaybe I’m misunderstanding this but I find it crazy that people now act like generating HTML server side is a genius new idea that is going to replace JS Frameworks. Isn’t that kind of the default and the SPA Frameworks were the new idea? Imagine telling a PHP dev that you’re now rendering your HTML server side! I’m happy to be corrected if I’m wrong here but it’s very weird from my view.
- synergy20 2y agoYou are correct. It's just that, Javascript wants to re-do backend and Rust wants to rewrite everything these days.
- benatkin 2y agoRust is rapidly making strides on the front-end, through WebAssembly and Tauri.
- slater 2y agoThe horse-shoe theory of web development: In the end, it bends back to HTML5, CSS, JS with Jquery, and PHP + MySQL :D
- sourcecodeplz 2y agoTrue and tested, get running in under 1 minute and you already have a working prototype at the end of the day.
- kopirgan 2y agoHopefully not back to punched cards for input
- sam_bristow 2y agoI prefer the skateboarding half-pipe theory. We keep going back and forth, and people do some crazy tricks at each end.
- robertoandred 2y ago
- Dansvidania 2y agocan someone smarter than me please point out what the differences are between HMPL and HTMX?
- Normal_gaussian 2y agoIts a few kb smaller, though I wouldnt trust it to stay that way.
- deleted 2y ago[deleted]
- antonmak1 2y agoThank you very much for your feedback! This is a template language oriented primarily to work via JavaScript. It does not functionally interact with the real DOM in any way. You create separate objects with nodes. Also, the syntax is based on passing objects "to HTML", while HTMX works via attributes. I have long wanted to make a full-fledged article on this topic, but I never got around to it. I am already tired of just writing the same thing over and over again.
- antonmak1 2y agoIt's entirely my fault that I haven't written an article on this topic yet.
- antonmak1 2y agohttps://hmpl-lang.github.io/blog/blog/2024/08/10/differences-between-hmpl-and-htmx.html https://hmpl-lang.github.io/blog/blog/2024/08/10/differences...
- Dansvidania 2y agothank you for expanding, although I am still not entirely sure I understand why I would use one or the other. I might just be dense :D
- gessha 2y agoI’m currently learning frontend (vanilla JS and bootstrap) and client-side render the UI for some of my ideas. 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?
- _heimdall 2y agoMy rule of thumb is to render HTML where the state lives. When state lives on the server, usually in a database, leave your templating engine there and ship HTML. When state only lives in the client, think temporary UI state or animations, that rendering needs to happen in the client. At least for the kinda of sites and apps I build, that almost always means most of the rendering is done on the server and client rendering is so small in scope that I don't need more than plain old JS or a web component.
- antonmak1 2y agoThank you very much for your feedback! In short, it's about theories like SPA, SSR and others. There are different approaches to creating web applications with their pros and cons. This template language is simply an implementation of one of these ideas. You can make websites using PHP (working with WP and other similar things), and through frameworks that use SSR as a basis and others.
- zelcon 2y agoAh sweet finally I don't have to use JavaScript to make websites *looks inside, it's JavaScript*
- antonmak1 2y agoThank you very much for your feedback! No, it's just great to work through javascript. Moving away from javascript is not intended. It's the opposite: a connection with the server, passing the RequestInit object, and other similar things!
- randomgiy3142 2y agoIsn’t this what rpc/pbs/code-gen theoretically does? Markup/down sent? Then you don’t have to worry about the client or server language but settle on a subset of features somewhere. 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.
- allanren 2y agoSo it's sort like Jinja?
- evbogue 2y agoPrevious discussion: https://news.ycombinator.com/item?id=41043410 https://news.ycombinator.com/item?id=41043410
- antonmak1 2y agoBig thanks to thunderbong for making this thread. I just noticed it, sorry.
- antonmak1 2y agoThank you very much to everyone for your feedback on the template language!
- antonmak1 2y agoRegarding the standards that should be applied to template languages - all this will be adjusted as it develops. This module comes as a new idea that I would like to implement into a really good product. Even when working on Cample, I thought about something similar.