Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Very little compares to rust compiled to wasm in terms of perf, it's great. It also compiles to a comparatively tiny payload size. Can't comment on cross-compilation.
That's one of the reasons I want MS to give up on Blazor and focus on a universal modular wasm runtime and bridge so you can offlload to js processes for final rendering. The prognostication of markup is long established as a broken paradigm.
On the F# side, many people who use fable use elmish for web:
https://github.com/elmish/elmish
All that said, if it's a production application, and the target is a browser mucking with an HTML DOM, typescript is usually still the best option. Wasm is great, until you're generating HTML as it's output; the DOM has native understanding of what it can and cannot do at your fingertips, so baking markup computation into a disconnected process is leaving that advantage on the table, while also sacrificing visual mechanics like transitions and Dom element lifecycle events. -
@SortOfTested hmmm yeah, I didn’t consider Elmish w/o Fable at all...
I trust you know what you are talking about when it comes to TS, and I have to agree. However, in this case time is an issue (as in time-to-prod), and I find TS tedious to write and by extension relatively slow to develop with, so I didn’t want to go there... if I hadn’t found Yew so great and fast to deal with, I’d still probably have gone with Vue.ts -
@100110111
Been there, I understand. Just be aware that paradigms like yew while fast to develop have significantly more limitations because they disconnect the update cycle from necessary DOM events. Pretty much all wasm frameworks that produce html have this issue, so if advanced UI behaviors and visuals become mandatory, you're back to writing JS and trying to hotwire it against your markup.
Ex:
https://github.com/yewstack/yew/... -
@SortOfTested damn, that didn’t cross my mind... hope I don’t have to regret my choice and rethink this. Then again, converting a codebase from lang/framework to another is much faster than developing it from scratch, at least if you’ve done the og yourself. Well, we’ll see... I still have 6 weeks before it has to be in prod....
Cont. on: https://devrant.com/rants/3492672/...
... Fable as a framework is a hot confusing mess with little to no documentation. Gorram it. I was kind of excited for the prospect of ”F# Everywhere”, but if you have to turn such a beautifully concise lang into a hot chaotic mess to make a framework for web front, then no thank you, I’ll try something else that isn’t JS...
So I decided to lose my Rust virginity and give Yew a shot... never have I ever written a frontend this fast! Holy crap, I’m baffled...
rant