Handlebars templates #4748
Replies: 2 comments 1 reply
|
I wouldn't quite describe Ruby on Rails as an inspiration for Leptos — if I'm recalling correctly, I think the only time I've talked about it is in the context of the RustNation talk where I quoted DHH to the effect that the cool thing about the Web is that you can run any language on the server that you want. There is no other connection or inspiration that connects the two projects other than "the cool thing about the Web is that you can use any language you want." Yes, I have thought about templates and templating a lot. I have used several of frameworks (on the server and the client) that use a template syntax of this kind. Leptos doesn't. If you think mixing code with UI markup will have nightmarish consequences for you and/or if reactive programming counts as a con, then using Leptos is probably a bad choice. But if you think that a template-syntax-like Rust web framework is a good idea, then I would very strongly encourage you to think about creating one. It's really not that hard to make a web framework, and the only way to learn how to do it is to do it! |
|
I'm kicking around some ideas in a new Auric SPA project, if anyone wants to follow along with experiments in migrating Ember.js semantics to Rust+WASM. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I recently watched a YouTube video by Greg Johnston where he mentioned Ruby on Rails as inspiration for Leptos.
I've also been a Rails fan, and Ember.js developer for 10+ years. (Ember was conceived as "Rails for the browser" back in the early SPA days).
Ember has been a huge struggle because... JavaScript. I picked up Rust around 5 years ago, and I always wanted to rewrite my Ember controllers, models, and adapters in Rust, compiled to WASM.
I'm using Leptos now, but I avoided it hard for years at first, because it uses reactive programming, and I think mixing code with visual markup is technical debt. But it's my best path forward for the time being.
I'm from the CGI era (1993+), where we learned about the nightmarish maintenance consequences of mixing code with UI markup, which is why the industry responded with templates (FreeMarker for Java, etc).
I still feel like Handlebars templates lead to the best maintainability, where visual designers are not marginalized, and where apps can be completely re-skinned by a designer without going back to the programmer.
Has there been any thought about templates, and controller touch-points for templates, yet? Async is currently a rough point in Leptos, and controllers with all-async functions could really help bridge the awkward gap.
All reactions