Aspnetcore: Question: How is Blazor differen from a typcal web site ?

Created on 28 Mar 2018  路  4Comments  路  Source: dotnet/aspnetcore

Apart from (if I'm reading correctly) it runs entirely on the client's device and not my server, other than that it looks pretty much the same, or am I missing something huge and painfully obvious ?

area-blazor

Most helpful comment

The fact that it runs on the client is the big difference. Here are some aspects to consider:

  • App can use local processing power, you do not rely on doing all logic on the server (reduces e.g. latency, reduces necessary resources in the cloud, etc.)
  • App can work without a server (e.g. work offline in a progressive web app)
  • App cannot directly access backend services (e.g. DB), has to use e.g. web apis for that
  • Auth works differently
  • ...

However, you are right that it looks very similar to Razor on the server. That means that devs can reuse their existing skills and partly reuse existing C# codebases.

All 4 comments

In terms of basic looks, you're correct. It does look the same as the other SPA templates in Visual Studio. Blazor is an SPA type web framework after all. What I think you're missing is the fact that it is C# code running in your browser to render that UI and make it interactive. And that is the really impressive part.

The fact that it runs on the client is the big difference. Here are some aspects to consider:

  • App can use local processing power, you do not rely on doing all logic on the server (reduces e.g. latency, reduces necessary resources in the cloud, etc.)
  • App can work without a server (e.g. work offline in a progressive web app)
  • App cannot directly access backend services (e.g. DB), has to use e.g. web apis for that
  • Auth works differently
  • ...

However, you are right that it looks very similar to Razor on the server. That means that devs can reuse their existing skills and partly reuse existing C# codebases.

@rstropek now that you put it that way it doesn't sound too bad actually. I'd still prefer to trust server-side to the server rather than the average user's machine, who most likely runs IE on an 8 year computer, if I could afford it.

You could consider https://electronjs.org/ so that you do not have to rely on the user's browser. You will bring your own Chromium. Therefore, you only have to test for one target environment.

Was this page helpful?
0 / 5 - 0 ratings