10 June 2022
Blazor Server vs WebAssembly
Which approach should be chosen Blazor Server or Blazor WebAssembly? The difference is to do with where much of the code executes, either on the Server side or on the client side. Whilst much of the code would be the same there are some aspects of the code and project structure which are different. Depending upon on what the application does potentially a non-trivial task to swop between the two.
Binding is superficially relatively straightforward, however depending upon the elements/component used, the manner in which data is updated may differ!
Pages and components are ‘relatively’ independent and so when traversing between pages and components, data or information may need to be maintain. Where in the application should data be maintained and how should it be passed around?
Failure to handle errors correctly (exceptions) will require the user to reload the application before continuing. This may require the user repeat some work. Thus, error handling should be considered carefully to minimise inconvenience for the user.
Components or Pages?
An application can consist of a number of ‘pages’. However, whilst HTML and Razor can be used to define a whole page, there may be common elements. Therefore, could DRY principles be used to create reusable components?
To find out more about our Blazor training courses