Jamaica trevoir.williams@gmail.com

Blazor - What and Why image

Blazor - What and Why

Blazor is a new web framework that changes what is possible when building web apps with .NET. Blazor is a clientside web UI framework based on C# instead of JavaScript and with Blazor, you can write your client-side logic and UI components all in C#. The resulting application can be compiled into .NET assemblies and then run directly in the browser using a new open web standard called WebAssembly. Alternatively, Blazor can run your .NET UI components on the server and handle all UI interactions fluidly over a real-time connection with the browser. When run on the server, Blazor enables full-stack web development with .NET. Blazor builds on the foundations of .NET Core to providea modern and high performance web development experience.

Why

Blazor promises to:

  • Create rich interactive UIs using C# instead of JavaScript.
  • Share server-side and client-side app logic written in .NET.
  • Render the UI as HTML and CSS for wide browser support, including mobile browsers.

As a .Net Developer, you would probably prefer to write C# all the time instead of doing a bunch of context-switching between JavaScript and C#. Blazor gives us this opportunity. On top of that, you will be able to share code between backend and frontend given one of the hosting models

What

Blazor apps can be hosted in one of the following ways:

  • Client-side in the browser on WebAssembly.
  • Server-side in an ASP.NET Core app.

Learn to build a Blazor Server Application on top of a RESTful API for a book store’s database using ASP.NET Core 3.1 API, Entity Framework, the Repository Pattern End to End ASP.NET Core 3.1 API and Blazor Development

Client-side

Blazor WebAssembly apps execute directly in the browser on a WebAssembly-based .NET runtime. In this mode, Blazor apps function similarly to front-end JavaScript frameworks like Angular or React.

PROs

  • No server-side dependency, it works stand alone in the browser like a static site
  • Client takes on more responsibility and does all the work

CONs

  • Restricted by the capabilities and features of the browser
  • Client needs to support WebAssembly and capable hardware and software that supports WebAssembly
  • The size of payload of the app is bigger and thereby it takes longer to load the app

Server-side

In this hosting model approach, we have two different processes: one that tends to components and one that tends to UI updates. In this model, the components are run on the Server and not client-side like the former hosting model. So for changes to reach the Server and thereby the components, there needs to be a real-time connection. This is accomplished through WebSockets and SignalR. It is pretty much built-in and no additional configuration is required.

PROs

  • This model is much smaller and the app loads faster
  • This runs on the server and can take full advantage of existing tooling and debugging
  • This model can use full .Net, can use any .Net Core compatible .Net APIs

CONs

  • Potential latency since every interaction is a network call
  • No Offline mode given the dependency on the server

Learn how to build a RESTful API and a Blazor client side application using ASP.NET Core 3.1 API, Entity Framework, the Repository Pattern in End to End ASP.NET Core 3.1 API and Blazor Development

Read More
JWT (Json Web Token) Authentication in ASP.NET Core image

JWT (Json Web Token) Authentication in ASP.NET Core

This is a guide to implement JWT Authentication in a .NET Core Application

Read More
Tips to Write Better Code image

Tips to Write Better Code

Common Coding Tips to help you with the presentation of your code.

Read More
Three Developer Tips When Using Third Party Libraries in Your Website image

Three Developer Tips When Using Third Party Libraries in Your Website

Some tips to help prevent malicious code from being injected into your web application, through third party libraries.

Read More
C# ADO.Net - LINQ vs SQL Data Reader image

C# ADO.Net - LINQ vs SQL Data Reader

A short comparison of how queries look in LINQ syntax vs using SQl Data Reader

Read More
The Ultimate HTML Primer image

The Ultimate HTML Primer

A succinct walk through of how to author an HTML page

Read More
View MySQL Database Records with PHP image

View MySQL Database Records with PHP

This lesson shows us how to query our database and be able to view the records that have been entered through our registration form.

Read More
Create and Manage SQL Database Views image

Create and Manage SQL Database Views

This article walks us through creating and managing these constructs.

Read More
Create MySQL Database Records with PHP image

Create MySQL Database Records with PHP

This lesson shows us how to use our PHP Data Object library in our PHP application, to insert new records into our MySQL Database

Read More
Connect To MySQL using PHP PDO image

Connect To MySQL using PHP PDO

This lesson shows us how to connect to a database using PHP Data Objects (PDO).

Read More
Design MySQL Database using phpMyAdmin image

Design MySQL Database using phpMyAdmin

This lesson walks us through using the free open source database management tool, phpMyAdmin, to create a new database to be used for our simple PHP Application.

Read More
SQL GROUP BY and Aggregate Functions image

SQL GROUP BY and Aggregate Functions

This article guides SQL developers on how to use aggregate functions to perform quick calculations in SQL.

Read More
Design PHP Form with $_POST Method image

Design PHP Form with $_POST Method

This lesson walks us through handling data from a form after the submit button has been clicked, using the POST method

Read More
Design PHP Form with $_GET Method image

Design PHP Form with $_GET Method

This lesson walks us through handling data from a form after the submit button has been clicked.

Read More
Types of JOINs in SQL image

Types of JOINs in SQL

A quick overview of JOIN commands that Relational Databases have to offer

Read More
Create a PHP Form using Boostrap 4 and JQUeryUI image

Create a PHP Form using Boostrap 4 and JQUeryUI

Bootstrap 4 makes it easy to create beautiful forms for web pages. In this video, we will explore how this can be done in a PHP website.

Read More
PHP Website Layout and Setup using Bootstrap 4 image

PHP Website Layout and Setup using Bootstrap 4

A jump start into creating a PHP application from scratch and setting up a consistent layout for all pages.

Read More
Setup and Use Free Heroku Account image

Setup and Use Free Heroku Account

A short guide on how to setup and use a Heroku account, create an app and publish a PHP application from GitHub.

Read More
Setup and Use Free GitHub Account image

Setup and Use Free GitHub Account

A short guide on how to setup and use a GitHub account, run a few Git commands and publish code to a repository.

Read More
Download and Install Microsoft Visual Studio Code for PHP Development image

Download and Install Microsoft Visual Studio Code for PHP Development

A short guide on how to install and configure Visual Studio Code for PHP Development

Read More
Setup for PHP using XAMPP Server image

Setup for PHP using XAMPP Server

A short guide on how to prep a development machine for PHP Development

Read More
Web Development Trend Traps image

Web Development Trend Traps

Web Development Trend Traps that developers should avoid falling into.

Read More
Be A Web Application Developer in 5 Steps image

Be A Web Application Developer in 5 Steps

A quick set of tips to help you get on your way to being a web developer

Read More
Create Your First React App image

Create Your First React App

Let’s explore the steps to get started with building a React

Read More
SQL Create New Database and Tables image

SQL Create New Database and Tables

A walk through of how to create a new database and tables using SQL

Read More
SQL Operators in the WHERE Clause image

SQL Operators in the WHERE Clause

Get familiar with commonly used to know SQL Operators and Keywords when filtering data with the WHERE Clause

Read More
Relational SQL vs. Non-Relational NoSQL Databases image

Relational SQL vs. Non-Relational NoSQL Databases

A comparison between Relational Databases and NoSQL Databases.

Read More
Working with Relational Databases image

Working with Relational Databases

A guide on how to get started with Relational Databases.

Read More
Bootstrap 4 and Visual Studio Code in 10 Minutes image

Bootstrap 4 and Visual Studio Code in 10 Minutes

A guide on how to author Bootstrap 4 Pages using Visual Studio Code

Read More
SQL SELECT Statement Syntax image

SQL SELECT Statement Syntax

A peek at the SQL Select Statement and the basic syntax

Read More
Helium Jekyll Theme Markdown Examples image

Helium Jekyll Theme Markdown Examples

Markdown samples usefull when you start write your blog 🎉 🎆.

Read More
Helium Theme Syntax Highlight Example image

Helium Theme Syntax Highlight Example

An example post about code insertion into posts.

Read More

Trevoir Williams

Jamaican Software Engineer and Lecturer.