How to choose a web framework to build my frontend?

I have been reading up all day about Yew, Draco, Seed, Elm, React, Vue, Halogen, stdweb, wasm-bindgen, ....

And it's all a bit much to try to figure out what to use to build the gui of my application. Some of the things I consider:

  • I would prefer writing my frontend in Rust as much as possible, but: not if perf is worse than other solutions (yew seems to have some perf problems, and also I must admit that Elm syntax looks really nice)
  • I would be inclined to start from scratch with wasm-bindgen to avoid being locked in other peoples design problems, but I'm afraid that building from scratch is a lot of work and thus bad for producing actual results in reasonable time.

Now one of the things that I wondered about. I want to show large documents in the gui, and thus implement something like infinite scroll as described here.

If you have experience with the above frameworks, which would you say would allow sufficient control over how things get rendered to implement things like dom recycling and scroll anchors while helping me get rid of boilerplate and offering me a convenient way to write code as well as achieving good performance...

I suppose that a framework that would make it convenient to implement a well performing infinite scroll would probably be a good pick (based on gutfeeling only).

1 Like

Update: So far it seems that the most promising framework is draco, with as an alternative handcrafting with web-sys.

The main question is how expensive is the virtual dom. I'm going to investigate a bit, because on first sight it doesn't feel like a sensible thing to do. The reasoning behind it seems to be able to update the gui when the state of the model changes, without worrying about the prior state. Eg, just rerender everything to a virtual dom, diff it to the actual dom and then update the actual dom. I don't really like the approach.

I will investigate some further and do some benchmarking. I feel we should be able to combine convenience with "do only the strictly necessary work".

I think you may get some responses if you ask on Reddit - Dive into anything. More experienced rust users tend to visit there.

May be the best choice now!?! Yew is the most mature one but it suffer performance problems. All other frameworks are very young, so we don't know which will have problems to avoid it.

Just out of curiosity, What are the reasons?

I am not good at English so I am not sure what you mean here! I personally don't like the cycle:

  1. render new virtual dom
  2. do diffing with old virtual dom
  3. apply the diffs to real dom

But numbers from this show that most of time is spent on applying changes to real dom. And from my reading in the past, it is why frameworks try to find the minimal change list before apply to real dom.

How about the benchmarking? Could you share the result?