52

Blazor – Build client web apps with C#

 4 years ago
source link: https://www.tuicool.com/articles/bY3qY3B
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
6rmiQvE.png!web

Interactive web UI with C#

Blazor lets you build interactive web UIs using C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries.

Blazor is a feature ofASP.NET, the popular web development framework that extends the .NET developer platform with tools and libraries for building web apps.

rU7zUf2.png!web

Run on WebAssembly or the server

Blazor can run your client-side C# code directly in the browser, using WebAssembly. Because it's real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.

Alternatively, Blazor can run your client logic on the server. Client UI events are sent back to the server using SignalR - a real-time messaging framework. Once execution completes, the required UI changes are sent to the client and merged into the DOM.

7jeUnim.png!web

Built on open web standards

Blazor uses open web standards without plugins or code transpilation. Blazor works in all modern web browsers, including mobile browsers.

Code running in the browser executes in the same security sandbox as JavaScript frameworks. Blazor code executing on the server has the flexibility to do anything you would normally do on the server, such as connecting directly to a database.

r6VbyiV.png!web

Share code and libraries

Blazor apps can use existing .NET libraries, thanks to.NET Standard—a formal specification of .NET APIs that are common across all .NET implementations.

.NET Standard allows the same code and libraries to be used on the server, in the browser, or anywhere you write .NET code.

Read more about code sharing with Blazor

Q3YBjaf.png!web

JavaScript interop

Your C# code can easily call JavaScript APIs and libraries. You can continue to use the large ecosystem of JavaScript libraries that exist for client side UI while writing your logic in C#.

When using server-side code execution, Blazor takes care of seamlessly executing any JavaScript code on the client.

Learn about JavaScript interop

2q2YJr6.png!web

Free tools for every operating system

Visual Studio and Visual Studio Code provide a great Blazor development experience on Windows, Linux, and macOS.

If you prefer to use a different editor, there are .NET command line tools that allow you to work with the editor of your choice.

Explore tools for .NET

maQJZbz.png!web

UI component ecosystem

Get productive fast with re-usable UI components from top component vendors like Telerik , DevExpress , Syncfusion , Radzen , and others.

nMVZvmE.png!web

60,000 + active OSS contributors 3,700 + OSS company contributors

Open-source and free

Blazor is part of the open-source .NET platform that has a strong community of over 60,000 contributors from more than 3,700 companies.

.NET is free, and that includes Blazor. There are no fees or licensing costs, including for commercial use.

Visit Blazor on GitHub

Active community

Blazor has an active community that is answering questions, producing samples, writing tutorials, authoring books, and more. Awesome Blazor provides a great community-maintained list of Blazor resources.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK