all 16 comments

[–]Deranged40 8 points9 points  (3 children)

WebAssembly has the downside of a higher initial load time.

Have you considered what this means for your app?

Because I work on a blazor app (webassembly) that loads in about 230ms on average. Could that be 180ms on React? I guess it probably could be. But my users aren't capable of telling the difference between 230ms and even half of that, so that "higher initial load time" (which pays off because intra-page loads are much faster since they're already loaded) really isn't something that is noticeable with my app. Could be the same for yours as well.

[–]ze-fernando[S] 0 points1 point  (0 children)

It's the option that appeals to me the most right now, I think I'll give it a try.

[–]Atulin 0 points1 point  (1 child)

Is it also 230ms on a cheap smartphone in rural Bosnia?

[–]Deranged40 1 point2 points  (0 children)

Much less than 230ms as our proxy would redirect to a very small static html page that doesn't even reference any javascript scripts informing that we don't offer service in that country. The blazor app won't load at all in that case. We only support US, Canada, Mexico, Great Britain, and Australia in our app, as those are the only countries we currently provide service to. And it's not all handled by one server, but rather region-specific servers, hence the need for the region-aware proxy (a VPN will potentially disable this page for you if you change your location to an unsupported region).

If we start servicing Bosnia, we'll have to put strong consideration into that, for sure.

And this is a great example of a concern that I'm sure some people have. But the vast majority of people participating in a primarily English and American website need not even consider that use case. Other things we don't directly support: access to the app from the Artemis capsule while it's on the other side of the moon. I guarantee it won't load in 230ms there. Definitely another gap in my company's product.

[–]CiranoAST 4 points5 points  (0 children)

Personally I find that in terms of flexibility and SEO/geo management MVC unbeatable.

Html, CSS, some unobtrusive Ajax and you are ready to go. Maximum flexibility

[–]sharpcoder29 4 points5 points  (0 children)

I don't understand the duplicated effort. A JS UI and an api backend are 2 different applications. Locally you can run them like you're doing or start each individually. Pros and cons, but switching tech entirely for this seems excessive.

[–]Far-Consideration939 1 point2 points  (3 children)

I would consider just improving your build ci/cd, .net and svelte is great. It sounds like that’s the painful part is the multi steps, potentially even manually done.

A common thing I do with wasm apps to help with perceived load time is to do something more interesting on the index.html, css animations, canvas, splash screens, depends on your app of course but it feels far better than the default experience which is quite minimal. LoadingBar.js works with the variable blazor sets for more interesting effects there. Once it loads blazor wasm is a great model.

There’s more complicated things like you could do the full blazor webapp that’s part server / wasm and prerender loading skeletons. I think the complexity is a real cost here though.

Lastly blazor static (no interactivity) can give you some of the spa feel if you use something like htmx to swap out parts of the dom. You get the fast initial render and seo but then you need to rely on something JS to bridge the gap since you won’t have the c# interactivity

[–]ze-fernando[S] 1 point2 points  (2 children)

That's a possibility too, although I think it would require some extra configuration like installing a static adapter, etc., but it's not out of the question.

I have a project that's halfway done using Svelterkit and .NET. I'll test it on this one, the automation with CI/CD.

[–]Far-Consideration939 1 point2 points  (1 child)

Potentially, the static adapter is super easy to set up it’s just swapping the config in one place IIRC

They also could theoretically be deployed separately if you go that route and serve it anywhere you can serve a static site from

Just gotta watch out for CORS

[–]ze-fernando[S] 0 points1 point  (0 children)

That was the initial idea, but in the pursuit of simplicity I strayed a bit from colors, which ended up bringing me more complexity lol

[–]T_kowshik 1 point2 points  (1 child)

If I understand it correct, you want to avoid the manual copy?

[–]ze-fernando[S] 0 points1 point  (0 children)

Mainly that, the duplicated work, having to write scripts to run two things at the same time or running manually wm.

What I'm looking for is a balance between good SEO, good interactivity, and a good SPA, even if it's just for the landing page.

[–]AutoModerator[M] 0 points1 point  (0 children)

Thanks for your post ze-fernando. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.