locked
Does ASP.NET Core hosted mean a server trip every time? RRS feed

  • Question

  • User-1068797065 posted

    We're planning to re-write our website in Blazor, but also taking the opportunity to break down each section into it's own Blazor project.
    While we know we want each project to be WASM with PWA, we're unsure if each should be ASP.NET Core hosted (we'd prefer they all be the same).
    While our apps will be hosted in Azure allowing for this, we need the client to go to the server only in certain cases.
    In ASP.NET Core hosted, does every trip go to the server, or only code/pages you want? Will the convergence to .NET 5 this year change anything?
    This is an important decision for us to make and to get right, and I'm not sure if you can go back and change these choices after-the-fact.

    Thanks very much for any insight.

    Sunday, June 28, 2020 1:01 PM

Answers

  • User-821857111 posted

    If you use the standard ASP.NET Hosted template, the application will only make calls to the server when it first loads, and then whenever it makes calls to the endpoints in the Server project, typically to get or post data, or to make use of proprietary algorithms that you prefer not to include in dlls that get downloaded to a browser. The Client and Shared projects will be downloaded to the browser/client on first request. 

    This is a standard implementation of client-server architecture. The version of .NET is irrelevant.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 29, 2020 8:06 AM

All replies

  • User-821857111 posted

    If you use the standard ASP.NET Hosted template, the application will only make calls to the server when it first loads, and then whenever it makes calls to the endpoints in the Server project, typically to get or post data, or to make use of proprietary algorithms that you prefer not to include in dlls that get downloaded to a browser. The Client and Shared projects will be downloaded to the browser/client on first request. 

    This is a standard implementation of client-server architecture. The version of .NET is irrelevant.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 29, 2020 8:06 AM
  • User-1068797065 posted

    Thanks Mike.  Seems to be the best of both world and the best option for us.

    Tuesday, June 30, 2020 1:21 PM