[HN Gopher] HMPL - template language for displaying UI from serv...
       ___________________________________________________________________
        
       HMPL - template language for displaying UI from server to client
        
       Author : thunderbong
       Score  : 10 points
       Date   : 2024-08-09 19:13 UTC (3 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | breck wrote:
       | https://www.loom.com/share/3b46958e6407419d910abfece9583783
        
         | benatkin wrote:
         | To 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).
        
       | echoangle wrote:
       | Maybe 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 wrote:
         | You are correct. It's just that, Javascript wants to re-do
         | backend and Rust wants to rewrite everything these days.
        
           | benatkin wrote:
           | Rust is rapidly making strides on the front-end, through
           | WebAssembly and Tauri.
        
         | slater wrote:
         | The horse-shoe theory of web development:
         | 
         | In the end, it bends back to HTML5, CSS, JS with Jquery, and
         | PHP + MySQL :D
        
           | sourcecodeplz wrote:
           | True and tested, get running in under 1 minute and you
           | already have a working prototype at the end of the day.
        
         | robertoandred wrote:
         | The benefit of rendering JS/React on both the client and the
         | server is shared languages, code, and logic in both
         | environments. That's the "new idea".
        
         | Normal_gaussian wrote:
         | I don't disagree with your point, but you don't seem to be
         | actually reacting to anything really present in the submission.
         | 
         | Afaict nowhere is it being presented as a new or genius idea,
         | or is it suggesting it will replace SPA frameworks. These all
         | seem to be things you've projected on to the submission.
        
           | echoangle wrote:
           | I was mainly responding to this paragraph in the submission:
           | 
           | > The HMPL template language extends the capabilities of
           | regular HTML by adding query objects to the markup to reduce
           | the code on the client. When writing SPA, a large amount of
           | javascript code is generated, which is loaded when the user
           | visits the site, so the loading speed can be quite slow. All
           | this can be avoided by generating the markup on the server
           | and then loading it on the client:
           | 
           | < some code >
           | 
           | Let's say that the same code on popular frameworks such as
           | Vue and others takes up much more code, which, in fact, can
           | be moved to the server.
           | 
           | Maybe I'm misinterpreting but this seems to say that this
           | approach is an improvement over SPAs. My point is that this
           | is basically what everyone else has done all the time before
           | SPAs were even a thing.
        
       | Dansvidania wrote:
       | can someone smarter than me please point out what the differences
       | are between HMPL and HTMX?
        
         | Normal_gaussian wrote:
         | Its a few kb smaller, though I wouldnt trust it to stay that
         | way.
        
       ___________________________________________________________________
       (page generated 2024-08-09 23:01 UTC)