Uploaded on Dec 19, 2022
Blazor framework is a well-known framework among the .Net tech community. It is an open-source framework that is utilized to build single-page applications. It was created by Microsoft, which combines the traditional razor framework with the modern .Net and WebAssembly framework. Building a web application using Blazor development, requires writing code for the server-side and client side. Many programming languages are available that help to write codes. To know more visit at https://www.zenesys.com/blog/what-is-blazor
What Is Blazor
What Is Blazor? A Complete Guide to Getting Started
WHAT IS THE BLAZOR FRAMEWORK?
Blazor framework is a well-known framework among the .Net tech community. It is an open-
source framework that is utilized to build single-page applications. It was created by
Microsoft, which combines the traditional razor framework with the modern .Net and
WebAssembly framework. What's more? It helps to build both server-side and client-side
applications.
WELL, CURRENTLY, HOW DO WE CREATE WEB APPLICATIONS?
Building a web application using Blazor development, requires writing code for the server-side
and client side. Many programming languages are available that help to write codes.
Blazor generally has two
hosting models, one for the
BLAZOR HOSTING MODELS
client-side and the other for
server-side
1. Blazor WebAssembly 2. Blazor Server (refer to
(refer to client-side) server-side)
To build a Blazor app, you must know the project structure of Blazor
development. Let’s look at its structure.
1. PROGRAM.CS
• This file comprises the Main()method, an entry point for Blazor Server and
WebAssembly.
• The Main()method is also known as CreateHostBuilder() in a Blazor Server project
responsible for configuring the ASP.NET Core host.
• For the Blazor WebAssembly project, the app component (a root component) is
described in the main method. In the "App.razor file", the root component can be
placed in the root project folder.
2.WWWROOT
• It is a folder that is present in the root project folder and is considered a
webroot folder.
• The webroot folder access static files like images, stylesheets, and more with a
relative path to the webroot folder.
3. RAZOR COMPONENTS
• Most of the files present in the Blazor projects are considered .razor files. It
defines the necessary components which are responsible for the building of app
UI.
• The components used in the Blazor WebAssembly and Blazor server apps are
identical in most cases.
4. PAGES FOLDER
This folder comprises _Host razor page and routable components, which has .razor
extension.
5. SHARED FOLDER
It consists of Razor components and additional elements which can be shared
within pages.
6. _IMPORTS.RAZOR
It incorporates razor directives that can be included in the component of an app.
7. APP SETTING FILES
Environmental app setting files and appsettings.json help in offering the
configuration setting to the Blazor app.
8. DATA FOLDER
This folder contains the WeatherForecast class and the
WeatherForecastService implementation, which is capable of providing
weather data to the FetchData component.
Web: www.zenesys.com
CONTACT
Email: [email protected]
US
Phone: +1 (323) 565-1141
Comments