1

Razor Serverside and JavaScript are possible mixed to use. But, I'm not good at Javascript. I want to make client side app with C#. Is it possible to use Razor ServerSide with Razor WebAssembly? Thank you.

SatoManami
  • 19
  • 1
  • 1
    Razor, or Blazor...what are you asking? – Matthew Layton Mar 02 '20 at 11:31
  • 1
    I would worry less about the runtime that's running your code. You can build your server-side architecture with C#, ASP.NET, etc, and run with the standard .NET Core runtime. You can build your client-side architecture with C# and Blazor and run using WASM (which bootstraps the CLR in the browser). The advantage to you is being able to code against a single code-base (i.e. being able to share the same code between client and server). If you _really_ want to run a WASM back-end, then maybe look at something like wasmer.io, but it's probably overkill and definitely going to be a headache. – Matthew Layton Mar 02 '20 at 11:36
  • 1
    Not very clear. Add a concrete problem you want to solve. – H H Mar 03 '20 at 06:29

1 Answers1

1

Is it possible to use Razor ServerSide with Razor WebAssembly?

What would be the sense of that? ServerSIde means it executes on the server and sends the UI updates to the client, ONLY. WebAssembly is a technology to run bytecode in the browser for client side applications.

You ask for a vegan real cor steak - not possible. Those 2 technologies contradict themselves, you use either one or the other.

TomTom
  • 61,059
  • 10
  • 88
  • 148
  • 1
    If @SatoManami is talking about Blazor, I don't think these two technologies contradict each other. A good use case for server-side-only would be server-side validation. A good use case for client-side-only would be char-input filtering. I can see a clear use case for both. – Kyle B Mar 03 '20 at 01:23
  • 1
    Sadly that still makes no sense because both are front end technologies, not somethign any sane person would use to write an API - which is where your backend validation would reside. – TomTom Mar 03 '20 at 06:11