News for hackers. Stuff that matters.
Re:HMPL – template language for displaying UI from server to... by echoangle on Friday August 09, 2024 @04:26PM (#41205135)
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.
Re:HMPL – template language for displaying UI from server to... by Normal_gaussian on Friday August 09, 2024 @05:31PM (#41205547)
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.

Re:HMPL – template language for displaying UI from server to... by echoangle on Friday August 09, 2024 @05:52PM (#41205652)
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.

Re:HMPL – template language for displaying UI from server to... by antonmak1 on Saturday August 10, 2024 @01:36PM (#41210980)
Thank you very much for your feedback! This idea has been discussed and used in web development for quite some time now. I am certainly not inventing anything new, but I think the idea of combining the template language approach and server requests to get a UI looks interesting.
Re:HMPL – template language for displaying UI from server to... by synergy20 on Friday August 09, 2024 @04:37PM (#41205212)
You are correct. It's just that, Javascript wants to re-do backend and Rust wants to rewrite everything these days.
Re:HMPL – template language for displaying UI from server to... by benatkin on Friday August 09, 2024 @06:33PM (#41205911)
Rust is rapidly making strides on the front-end, through WebAssembly and Tauri.
Re:HMPL – template language for displaying UI from server to... by robertoandred on Friday August 09, 2024 @05:28PM (#41205518)
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".
Re:HMPL – template language for displaying UI from server to... by slater on Friday August 09, 2024 @04:38PM (#41205220)
The horse-shoe theory of web development:

In the end, it bends back to HTML5, CSS, JS with Jquery, and PHP + MySQL :D

Re:HMPL – template language for displaying UI from server to... by sourcecodeplz on Friday August 09, 2024 @05:25PM (#41205506)
True and tested, get running in under 1 minute and you already have a working prototype at the end of the day.
Re:HMPL – template language for displaying UI from server to... by kopirgan on Friday August 09, 2024 @09:00PM (#41206617)
Hopefully not back to punched cards for input
Re:HMPL – template language for displaying UI from server to... by sam_bristow on Saturday August 10, 2024 @12:44AM (#41207369)
I prefer the skateboarding half-pipe theory. We keep going back and forth, and people do some crazy tricks at each end.
Re:HMPL – template language for displaying UI from server to... by mattchamb on Friday August 09, 2024 @09:49PM (#41206759)
Everything is a cycle.. for example I am using graphql at work and being heavily reminded of the WSDL and WCF of old
Re:HMPL – template language for displaying UI from server to... by antonmak1 on Saturday August 10, 2024 @01:33PM (#41210966)
Hello! Thank you very much for your comment! I described in more detail the example of use here - https://dev.to/antonmak1/how-to-reduce-javascript-file-size-...