SlideShare a Scribd company logo
1 of 31
Download to read offline
.NET 6 Radzen Blazor
コンポーネントライブラリを使ってみよう
鈴⽊ 章太郎
Elastic テクニカルプロダクトマーケティングマネージャー/エバンジェリスト
デジタル庁 省庁業務グループ ソリューションアーキテクト
Elastic
Technical Product Marketing
Manager/Evangelist
デジタル庁
省庁業務グループ
ソリューションアーキテクト
元 Microsoft Technical Evangelist
Twitter : @shosuz
Shotaro Suzuki
l Blazor WebAssembly プロジェクト作成
l Radzen Component インストールと設定
l DataGrid
l Line Chart
l Image
l まとめ
アジェンダ
Blazor WebAssembly プロジェクト作成
Web Assembly(WASM) とは
• Web ブラウザ上でバイナリコードを直接実⾏できる
• 2019 年 12 ⽉ W3C 勧告、正式なウェブ標準に認定
• 様々な⾔語のバイナリコードを主要なブラウザのサンドボックス内で動作可能
• Web Assembly バイナリコードへのコンパイラなどのツールセットが必要
Edge
Chrome
Safari
Firefox
Web Assembly
バイナリコード
(W3C 標準技術)
C++ WASM
コンパイラ
Rust WASM
コンパイラ
C WASM
コンパイラ
SQLite ソースコード(C)
Rust ソースコード
C++ ソースコード
Modern Web UI with .NET & Blazor
Server WebAssembly Hybrid
HTML、CSS、.NET、C#... JavaScript の代わりに Open Web 標準でアプリ開発
どこにでもホストできる
Blazor Server と Blazor WebAssembly の
開発モデルの違い
Blazor Server Blazor WebAssembly
DOM
Blazor
WebAssembly
.NET
Razor Components
Blazor
.NET
Razor Components
DOM
SignalR
Blazor Server
• 開発モデルは C/S 型に近い
• DOM(ブラウザ UI)と Blazor ランタイム(仮想 DOM)
がやりとりし UI 描画(差分更新)
• 画⾯の⼊出⼒部分のみをリモートデスクトップのようにブラウザ
側に持ってきているとみなせる
• SignalR(Web ソケット通信)
• DB に直接アクセス可能
• Web アプリケーションを Client - Server 型に近いモデルで
開発可能
• Web サーバとの常時接続が必要
• サーバ側でリソース効率の⾼いアプリの作り⽅が必要
• Hot Reload
Blazor WebAssembly
• サンドボックス制限
• DB アクセス不可 → Native File Reference による
ローカル DBアクセス
• Web API を介して DB アクセス
• 静的な Web サーバにホスト
• アプリ全体がダウンロード(⼤きくなりがち)
• DOM(ブラウザ UI)と Blazor ランタイム(仮想
DOM)がやりとりしUI 描画(差分更新)、ランタイム
が Blazor アプリ(UI ロジック)とやりとりする
• Hot Reload (デバッグなしで実⾏)
Blazor WebAssembly プロジェクト⽣成
チェックを⼊れる︕
Radzen Component インストールと設定
Radzen Blazor
Component Library
https://blazor.radzen.com/
Radzen Blazor Component Library インストール - 1
https://blazor.radzen.com/get-started
いずれかでインストール実施
• 下記コマンドラインからパッケージをインストール
• Visual Studio 2022 の Nuget Package
Manager からプロジェクトを追加
• .csproj ファイルを⼿動で編集し、プロジェクト
参照を追加
dotnet add package Radzen.Blazor
Radzen Blazor Component Library インストール - 2
https://blazor.radzen.com/get-started
• 名前空間をインポート
Blazor アプリケーション の _Imports.razor
ファイルを開き、これらの2⾏を追加
@using Radzen
@using Radzen.Blazor
• Radzen 付属テーマを使⽤
Bootstrap の重要な部分(主にレイアウト)を含むテーマ
を使⽤するには、-base 接尾辞 のないファイルを含める
<link rel="stylesheet"
href="_content/Radzen.Blazor/css/default.css">
• テーマを含める
Blazor Pages/_Layout.cshtml (Server)
or
wwwroot/index.html(WebAssembly)
を開き、下記を追加してテーマ CSS ファイルを含める
オプションで、ブートストラップを含める
<link rel="stylesheet"
href="_content/Radzen.Blazor/css/default-
base.css">
<script
src="_content/Radzen.Blazor/Radzen.Blazor.js">
</script>
• Radzen.Blazor.js をインクルード
Blazor Pages /_Layout (Server)
or
wwwroot/index.html(WebAssembly)
を開き、下記を含める
Radzen Blazor Component Library インストール – 3
- Dialog、Notification、Context Menu、および Tooltip コンポーネントを使⽤ -
https://blazor.radzen.com/get-started
using Radzen;
...
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddTransient(sp => new HttpClient
{ BaseAddress = new
Uri(builder.HostEnvironment.BaseAddress) });
...
builder.Services.AddScoped<DialogService>();
builder.Services.AddScoped<NotificationService>();
builder.Services.AddScoped<TooltipService>();
builder.Services.AddScoped<ContextMenuService>();
...
await builder.Build().RunAsync();
}
<RadzenDialog/>
<RadzenNotification/>
<RadzenContextMenu/>
<RadzenTooltip/>
• MainLayout.razor ファイルを
開き、以下を追加
DataGrid
DataGrid
https://blazor.radzen.com/datagrid
DataGrid
https://blazor.radzen.com/datagrid
<RadzenDataGrid Data="@forecasts" TItem="WeatherForecast" PageSize="10" AllowPaging="true"
AllowFiltering="true" AllowColumnResize="true" AllowSorting="true">
<Columns>
<RadzenDataGridColumn TItem="WeatherForecast" Property="Date" Title="Date">
<Template Context="forecast">@forecast.Date.ToShortDateString()</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureC" Title="Temp. (C)"/>
<RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureF" Title="Temp. (F)"/>
<RadzenDataGridColumn TItem="WeatherForecast" Property="Summary" Title="Summary"/>
</Columns>
</RadzenDataGrid>
Line Chart
Line Chart
https://blazor.radzen.com/line-chart
Line Chart
https://blazor.radzen.com/line-chart
<RadzenChart>
<RadzenLineSeries Smooth="true" Data="@forecasts" CategoryProperty="Date" Title="Temp. (C)"
LineType="LineType.Solid" ValueProperty="TemperatureC">
<RadzenMarkers MarkerType="MarkerType.Circle" />
</RadzenLineSeries>
<RadzenLineSeries Smooth="true" Data="@forecasts" CategoryProperty="Date" Title="Temp. (F)"
LineType="LineType.Solid" ValueProperty="TemperatureF">
<RadzenMarkers MarkerType="MarkerType.Circle" />
</RadzenLineSeries>
<RadzenValueAxis>
<RadzenGridLines Visible="true" />
<RadzenAxisTitle Text="Temperature" />
</RadzenValueAxis>
</RadzenChart>
Image
Image
https://blazor.radzen.com/image
Image
https://blazor.radzen.com/image
@page "/image"
<div class="row">
<div class="col-xl-6">
<h3 class="mt-3">Image from application assets</h3>
<RadzenImage Path="images/community.svg" Style="width: 60%; margin: 3rem;" />
</div>
<div class="col-xl-6">
<h3 class="mt-3">Image from url</h3>
<RadzenImage Path="https://www.radzen.com/assets/hero-
40b90af93c7bda2d44608c74e2b8eeb6785e273e02340ec44583d097b5dfb896.png"
Style="width: 100%;">
</RadzenImage>
</div>
</div>
</RadzenExample>
まとめ
まとめ
l Blazor WebAssembly プロジェクト作成
l Radzen Component インストールと設定
l DataGrid
l Line Chart
l Image
リソース
• Go to https://blazor.net
• Install the .NET SDK
• Radzen Component Library
https://blazor.radzen.com/
Visual Studio Visual Studio for Mac Visual Studio Code
+ C# extension
Elastic Maps の機能紹介
https://www.elastic.co/jp/virtual-events/intro-to-elastic-maps
Elasticsearch の Elastic Maps を使えば位置データの地理空間分析を⼤規模、かつリアルタイムに実現できます。レイヤー、
ポイント、シェイプ、ダイナミッククライアントサイドスタイリング等を活⽤してデータを分析する事で、次のアクションにつなげられます。
最新の Elastic Maps の機能をデモを交えてご紹介します。
オブザーバビリティの最新トレンド: 未来への展望 (6/29)
https://www.elastic.co/jp/virtual-events/observability-trends-2022
オブザーバビリティの最新トレンドについて、そしてこの領域に今後期待されることをお話しいたします。
多くの企業がハイブリッドクラウド環境に移⾏するにつれ、クラウドネイティブテクノロジーとその複雑性をオブザーバビリティで管理
することがますます重要になってきています。eBPF から機械学習、CI/CD パイプラインの可視化まで、我々が市場から⾒える
こと、 顧客がそれにどのようにアプローチしているか、そして近い将来の可能性・展望についてお話しします。
Elastic Meetup #48 (6/29 19:30-21:00)
https://www.meetup.com/ja-JP/tokyo-elastic-fantastics/events/286154124/
・株式会社 HAJ エンパワーメント 松浦康介さん
『マイクロサービス、外部と内部。GraphQL、つなぐ州
全部。Elasticsearch、隔てなくサーチ。』
・Elastic Furukubo Takeo さん
『(仮)Lookup Runtime Field 〜Elasticsearch 8.2
新機能〜』
・Elastic 鈴⽊章太郎 さん
『Building a search experience with Elastic –
App Search/Elastic Cloud, Docker, Python,
React Search UI を使った最新サンプルアプリのご紹介』
ElasticON Solution Seminar (7/21 10:00~12:00)
https://www.elastic.co/elasticon/event/solution-seminar-japan-jp
Elastic 社が主催する ElasticON は、世界の主要都市で開催されているユーザーさま向けのカンファレンス・セミナー形式の
イベントです。今回のセミナーでは、Elastic 8.2 シリーズの最新情報と、ライブデモ、そして我々のお客さまがどのようにデータの
利活⽤をしているかの導⼊/活⽤事例をご紹介いたします。是⾮この無料バーチャルイベントにご参加ください。
Elastic x mabl 共同セミナー (7/29 15:00~16:00)
https://www.elastic.co/jp/virtual-events/elastic-mabl-webinar
デジタルカスタマーエクスペリエンスの向上
〜 Elastic と mabl で実現する、ユーザー視点の アプリケーション Observability 〜
Thank you for your attention!

More Related Content

What's hot

Spring3.1概要 データアクセスとトランザクション処理
Spring3.1概要 データアクセスとトランザクション処理Spring3.1概要 データアクセスとトランザクション処理
Spring3.1概要 データアクセスとトランザクション処理
土岐 孝平
 
第三回ありえる社内勉強会 「いわががのLombok」
第三回ありえる社内勉強会 「いわががのLombok」第三回ありえる社内勉強会 「いわががのLombok」
第三回ありえる社内勉強会 「いわががのLombok」
yoshiaki iwanaga
 

What's hot (20)

Ws2012フェールオーバークラスタリングdeep dive 130802
Ws2012フェールオーバークラスタリングdeep dive 130802Ws2012フェールオーバークラスタリングdeep dive 130802
Ws2012フェールオーバークラスタリングdeep dive 130802
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
 
C# 8.0 非同期ストリーム
C# 8.0 非同期ストリームC# 8.0 非同期ストリーム
C# 8.0 非同期ストリーム
 
WebSocket / WebRTCの技術紹介
WebSocket / WebRTCの技術紹介WebSocket / WebRTCの技術紹介
WebSocket / WebRTCの技術紹介
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
ウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説するウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説する
 
.NET 7におけるBlazorの新機能
.NET 7におけるBlazorの新機能.NET 7におけるBlazorの新機能
.NET 7におけるBlazorの新機能
 
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...
 
Spring3.1概要 データアクセスとトランザクション処理
Spring3.1概要 データアクセスとトランザクション処理Spring3.1概要 データアクセスとトランザクション処理
Spring3.1概要 データアクセスとトランザクション処理
 
今から始めるWebClient(JSUG勉強会 2020年その6 LT大会)
今から始めるWebClient(JSUG勉強会 2020年その6 LT大会)今から始めるWebClient(JSUG勉強会 2020年その6 LT大会)
今から始めるWebClient(JSUG勉強会 2020年その6 LT大会)
 
CFの便利機能を他の環境でも。Open Service Broker
CFの便利機能を他の環境でも。Open Service BrokerCFの便利機能を他の環境でも。Open Service Broker
CFの便利機能を他の環境でも。Open Service Broker
 
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetupこれで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
 
AngularとSpring Bootで作るSPA + RESTful Web Serviceアプリケーション
AngularとSpring Bootで作るSPA + RESTful Web ServiceアプリケーションAngularとSpring Bootで作るSPA + RESTful Web Serviceアプリケーション
AngularとSpring Bootで作るSPA + RESTful Web Serviceアプリケーション
 
第三回ありえる社内勉強会 「いわががのLombok」
第三回ありえる社内勉強会 「いわががのLombok」第三回ありえる社内勉強会 「いわががのLombok」
第三回ありえる社内勉強会 「いわががのLombok」
 
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
 
JSON Value into Power Automate
JSON Value into Power AutomateJSON Value into Power Automate
JSON Value into Power Automate
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
.NET 7期待の新機能
.NET 7期待の新機能.NET 7期待の新機能
.NET 7期待の新機能
 

Similar to Developing .NET 6 Blazor WebAssemby apps with Radzen Blazor component library.pdf

Similar to Developing .NET 6 Blazor WebAssemby apps with Radzen Blazor component library.pdf (20)

【de:code 2020】 「あつまれ フロントエンドエンジニア」 Azure Static Web Apps がやってきた
【de:code 2020】 「あつまれ フロントエンドエンジニア」 Azure Static Web Apps がやってきた【de:code 2020】 「あつまれ フロントエンドエンジニア」 Azure Static Web Apps がやってきた
【de:code 2020】 「あつまれ フロントエンドエンジニア」 Azure Static Web Apps がやってきた
 
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...
 
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...
 
jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発
 
New Features of DotNet 6 Blazor WASM
New Features of DotNet 6 Blazor WASMNew Features of DotNet 6 Blazor WASM
New Features of DotNet 6 Blazor WASM
 
LabVIEW NXG Web Module Training Slide
LabVIEW NXG Web Module Training SlideLabVIEW NXG Web Module Training Slide
LabVIEW NXG Web Module Training Slide
 
【BS14】Blazor WebAssemblyとJavaScriptのインターオペラビリティ
【BS14】Blazor WebAssemblyとJavaScriptのインターオペラビリティ 【BS14】Blazor WebAssemblyとJavaScriptのインターオペラビリティ
【BS14】Blazor WebAssemblyとJavaScriptのインターオペラビリティ
 
Wasm blazor and wasi 2
Wasm blazor and wasi 2Wasm blazor and wasi 2
Wasm blazor and wasi 2
 
Interoperability of webassembly with javascript
Interoperability of webassembly with javascriptInteroperability of webassembly with javascript
Interoperability of webassembly with javascript
 
サンプルアプリケーションで学ぶApache Cassandraを使ったJavaアプリケーションの作り方
サンプルアプリケーションで学ぶApache Cassandraを使ったJavaアプリケーションの作り方サンプルアプリケーションで学ぶApache Cassandraを使ったJavaアプリケーションの作り方
サンプルアプリケーションで学ぶApache Cassandraを使ったJavaアプリケーションの作り方
 
[TL04] .NET 15 周年の今こそ考えるクラウドネイティブ アプリケーションと .NET の活用
[TL04] .NET 15 周年の今こそ考えるクラウドネイティブ アプリケーションと .NET の活用[TL04] .NET 15 周年の今こそ考えるクラウドネイティブ アプリケーションと .NET の活用
[TL04] .NET 15 周年の今こそ考えるクラウドネイティブ アプリケーションと .NET の活用
 
Interactive connection2
Interactive connection2Interactive connection2
Interactive connection2
 
Building simple-app-using-.net 6 asp.net core web api-blazor web assembly-ela...
Building simple-app-using-.net 6 asp.net core web api-blazor web assembly-ela...Building simple-app-using-.net 6 asp.net core web api-blazor web assembly-ela...
Building simple-app-using-.net 6 asp.net core web api-blazor web assembly-ela...
 
ASP. NET Core 汎用ホスト概要
ASP. NET Core 汎用ホスト概要ASP. NET Core 汎用ホスト概要
ASP. NET Core 汎用ホスト概要
 
VSCodeで始めるAzure Static Web Apps開発
VSCodeで始めるAzure Static Web Apps開発VSCodeで始めるAzure Static Web Apps開発
VSCodeで始めるAzure Static Web Apps開発
 
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
 
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
 
.NET Core 3.0 で Blazor を使用した​フルスタック C# Web アプリ​の構築
.NET Core 3.0 で Blazor を使用した​フルスタック C# Web アプリ​の構築.NET Core 3.0 で Blazor を使用した​フルスタック C# Web アプリ​の構築
.NET Core 3.0 で Blazor を使用した​フルスタック C# Web アプリ​の構築
 
2021/03/19 パブリッククラウドを活かす運用プロセス自動化
2021/03/19 パブリッククラウドを活かす運用プロセス自動化2021/03/19 パブリッククラウドを活かす運用プロセス自動化
2021/03/19 パブリッククラウドを活かす運用プロセス自動化
 
Vue入門
Vue入門Vue入門
Vue入門
 

More from Shotaro Suzuki

More from Shotaro Suzuki (20)

This is how our first offline technical event in three years was able to succ...
This is how our first offline technical event in three years was able to succ...This is how our first offline technical event in three years was able to succ...
This is how our first offline technical event in three years was able to succ...
 
Introducing the new features of the Elastic 8.6 release.pdf
Introducing the new features of the Elastic 8.6 release.pdfIntroducing the new features of the Elastic 8.6 release.pdf
Introducing the new features of the Elastic 8.6 release.pdf
 
NET MAUI for .NET 7 for iOS, Android app development
 NET MAUI for .NET 7 for iOS, Android app development  NET MAUI for .NET 7 for iOS, Android app development
NET MAUI for .NET 7 for iOS, Android app development
 
What's New in the Elastic 8.5 Release
What's New in the Elastic 8.5 ReleaseWhat's New in the Elastic 8.5 Release
What's New in the Elastic 8.5 Release
 
Centralized Observability for the Azure Ecosystem
Centralized Observability for the Azure EcosystemCentralized Observability for the Azure Ecosystem
Centralized Observability for the Azure Ecosystem
 
What's New in the Elastic 8.4 Release
What's New in the Elastic 8.4 ReleaseWhat's New in the Elastic 8.4 Release
What's New in the Elastic 8.4 Release
 
Power Apps x .NET ~ Transforming Business Applications with Fusion Development
Power Apps x .NET ~ Transforming Business Applications with Fusion DevelopmentPower Apps x .NET ~ Transforming Business Applications with Fusion Development
Power Apps x .NET ~ Transforming Business Applications with Fusion Development
 
devreljapan2022evaadvoc-final.pdf
devreljapan2022evaadvoc-final.pdfdevreljapan2022evaadvoc-final.pdf
devreljapan2022evaadvoc-final.pdf
 
elastic-mabl-co-webinar-20220729
elastic-mabl-co-webinar-20220729elastic-mabl-co-webinar-20220729
elastic-mabl-co-webinar-20220729
 
Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...
Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...
Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...
 
Building a search experience with Elastic – Introducing Elastic's latest samp...
Building a search experience with Elastic – Introducing Elastic's latest samp...Building a search experience with Elastic – Introducing Elastic's latest samp...
Building a search experience with Elastic – Introducing Elastic's latest samp...
 
Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...
Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...
Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...
 
Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...
Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...
Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...
 
What's New in the Elastic 8.2 Release - Seamless User Experience with Search -
What's New in the Elastic 8.2 Release - Seamless User Experience with Search -What's New in the Elastic 8.2 Release - Seamless User Experience with Search -
What's New in the Elastic 8.2 Release - Seamless User Experience with Search -
 
Building Software Reliability through Distributed Tracing.pdf
Building Software Reliability through Distributed Tracing.pdfBuilding Software Reliability through Distributed Tracing.pdf
Building Software Reliability through Distributed Tracing.pdf
 
Building a Flutter Development Environment with VSCode and Useful Extensions
Building a Flutter Development Environment with VSCode and Useful ExtensionsBuilding a Flutter Development Environment with VSCode and Useful Extensions
Building a Flutter Development Environment with VSCode and Useful Extensions
 
Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...
Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...
Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...
 
Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...
Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...
Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...
 
Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...
Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...
Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...
 
Firebase, Firestore Extension for Elastic App Search Integration-20220216
Firebase, Firestore Extension for Elastic App Search Integration-20220216Firebase, Firestore Extension for Elastic App Search Integration-20220216
Firebase, Firestore Extension for Elastic App Search Integration-20220216
 

Recently uploaded

Recently uploaded (12)

論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 

Developing .NET 6 Blazor WebAssemby apps with Radzen Blazor component library.pdf

  • 1. .NET 6 Radzen Blazor コンポーネントライブラリを使ってみよう 鈴⽊ 章太郎 Elastic テクニカルプロダクトマーケティングマネージャー/エバンジェリスト デジタル庁 省庁業務グループ ソリューションアーキテクト
  • 3. l Blazor WebAssembly プロジェクト作成 l Radzen Component インストールと設定 l DataGrid l Line Chart l Image l まとめ アジェンダ
  • 5. Web Assembly(WASM) とは • Web ブラウザ上でバイナリコードを直接実⾏できる • 2019 年 12 ⽉ W3C 勧告、正式なウェブ標準に認定 • 様々な⾔語のバイナリコードを主要なブラウザのサンドボックス内で動作可能 • Web Assembly バイナリコードへのコンパイラなどのツールセットが必要 Edge Chrome Safari Firefox Web Assembly バイナリコード (W3C 標準技術) C++ WASM コンパイラ Rust WASM コンパイラ C WASM コンパイラ SQLite ソースコード(C) Rust ソースコード C++ ソースコード
  • 6. Modern Web UI with .NET & Blazor Server WebAssembly Hybrid HTML、CSS、.NET、C#... JavaScript の代わりに Open Web 標準でアプリ開発 どこにでもホストできる
  • 7. Blazor Server と Blazor WebAssembly の 開発モデルの違い Blazor Server Blazor WebAssembly DOM Blazor WebAssembly .NET Razor Components Blazor .NET Razor Components DOM SignalR Blazor Server • 開発モデルは C/S 型に近い • DOM(ブラウザ UI)と Blazor ランタイム(仮想 DOM) がやりとりし UI 描画(差分更新) • 画⾯の⼊出⼒部分のみをリモートデスクトップのようにブラウザ 側に持ってきているとみなせる • SignalR(Web ソケット通信) • DB に直接アクセス可能 • Web アプリケーションを Client - Server 型に近いモデルで 開発可能 • Web サーバとの常時接続が必要 • サーバ側でリソース効率の⾼いアプリの作り⽅が必要 • Hot Reload Blazor WebAssembly • サンドボックス制限 • DB アクセス不可 → Native File Reference による ローカル DBアクセス • Web API を介して DB アクセス • 静的な Web サーバにホスト • アプリ全体がダウンロード(⼤きくなりがち) • DOM(ブラウザ UI)と Blazor ランタイム(仮想 DOM)がやりとりしUI 描画(差分更新)、ランタイム が Blazor アプリ(UI ロジック)とやりとりする • Hot Reload (デバッグなしで実⾏)
  • 11. Radzen Blazor Component Library インストール - 1 https://blazor.radzen.com/get-started いずれかでインストール実施 • 下記コマンドラインからパッケージをインストール • Visual Studio 2022 の Nuget Package Manager からプロジェクトを追加 • .csproj ファイルを⼿動で編集し、プロジェクト 参照を追加 dotnet add package Radzen.Blazor
  • 12. Radzen Blazor Component Library インストール - 2 https://blazor.radzen.com/get-started • 名前空間をインポート Blazor アプリケーション の _Imports.razor ファイルを開き、これらの2⾏を追加 @using Radzen @using Radzen.Blazor • Radzen 付属テーマを使⽤ Bootstrap の重要な部分(主にレイアウト)を含むテーマ を使⽤するには、-base 接尾辞 のないファイルを含める <link rel="stylesheet" href="_content/Radzen.Blazor/css/default.css"> • テーマを含める Blazor Pages/_Layout.cshtml (Server) or wwwroot/index.html(WebAssembly) を開き、下記を追加してテーマ CSS ファイルを含める オプションで、ブートストラップを含める <link rel="stylesheet" href="_content/Radzen.Blazor/css/default- base.css"> <script src="_content/Radzen.Blazor/Radzen.Blazor.js"> </script> • Radzen.Blazor.js をインクルード Blazor Pages /_Layout (Server) or wwwroot/index.html(WebAssembly) を開き、下記を含める
  • 13. Radzen Blazor Component Library インストール – 3 - Dialog、Notification、Context Menu、および Tooltip コンポーネントを使⽤ - https://blazor.radzen.com/get-started using Radzen; ... public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add<App>("app"); builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); ... builder.Services.AddScoped<DialogService>(); builder.Services.AddScoped<NotificationService>(); builder.Services.AddScoped<TooltipService>(); builder.Services.AddScoped<ContextMenuService>(); ... await builder.Build().RunAsync(); } <RadzenDialog/> <RadzenNotification/> <RadzenContextMenu/> <RadzenTooltip/> • MainLayout.razor ファイルを 開き、以下を追加
  • 16. DataGrid https://blazor.radzen.com/datagrid <RadzenDataGrid Data="@forecasts" TItem="WeatherForecast" PageSize="10" AllowPaging="true" AllowFiltering="true" AllowColumnResize="true" AllowSorting="true"> <Columns> <RadzenDataGridColumn TItem="WeatherForecast" Property="Date" Title="Date"> <Template Context="forecast">@forecast.Date.ToShortDateString()</Template> </RadzenDataGridColumn> <RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureC" Title="Temp. (C)"/> <RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureF" Title="Temp. (F)"/> <RadzenDataGridColumn TItem="WeatherForecast" Property="Summary" Title="Summary"/> </Columns> </RadzenDataGrid>
  • 19. Line Chart https://blazor.radzen.com/line-chart <RadzenChart> <RadzenLineSeries Smooth="true" Data="@forecasts" CategoryProperty="Date" Title="Temp. (C)" LineType="LineType.Solid" ValueProperty="TemperatureC"> <RadzenMarkers MarkerType="MarkerType.Circle" /> </RadzenLineSeries> <RadzenLineSeries Smooth="true" Data="@forecasts" CategoryProperty="Date" Title="Temp. (F)" LineType="LineType.Solid" ValueProperty="TemperatureF"> <RadzenMarkers MarkerType="MarkerType.Circle" /> </RadzenLineSeries> <RadzenValueAxis> <RadzenGridLines Visible="true" /> <RadzenAxisTitle Text="Temperature" /> </RadzenValueAxis> </RadzenChart>
  • 20. Image
  • 22. Image https://blazor.radzen.com/image @page "/image" <div class="row"> <div class="col-xl-6"> <h3 class="mt-3">Image from application assets</h3> <RadzenImage Path="images/community.svg" Style="width: 60%; margin: 3rem;" /> </div> <div class="col-xl-6"> <h3 class="mt-3">Image from url</h3> <RadzenImage Path="https://www.radzen.com/assets/hero- 40b90af93c7bda2d44608c74e2b8eeb6785e273e02340ec44583d097b5dfb896.png" Style="width: 100%;"> </RadzenImage> </div> </div> </RadzenExample>
  • 24. まとめ l Blazor WebAssembly プロジェクト作成 l Radzen Component インストールと設定 l DataGrid l Line Chart l Image
  • 25. リソース • Go to https://blazor.net • Install the .NET SDK • Radzen Component Library https://blazor.radzen.com/ Visual Studio Visual Studio for Mac Visual Studio Code + C# extension
  • 26. Elastic Maps の機能紹介 https://www.elastic.co/jp/virtual-events/intro-to-elastic-maps Elasticsearch の Elastic Maps を使えば位置データの地理空間分析を⼤規模、かつリアルタイムに実現できます。レイヤー、 ポイント、シェイプ、ダイナミッククライアントサイドスタイリング等を活⽤してデータを分析する事で、次のアクションにつなげられます。 最新の Elastic Maps の機能をデモを交えてご紹介します。
  • 28. Elastic Meetup #48 (6/29 19:30-21:00) https://www.meetup.com/ja-JP/tokyo-elastic-fantastics/events/286154124/ ・株式会社 HAJ エンパワーメント 松浦康介さん 『マイクロサービス、外部と内部。GraphQL、つなぐ州 全部。Elasticsearch、隔てなくサーチ。』 ・Elastic Furukubo Takeo さん 『(仮)Lookup Runtime Field 〜Elasticsearch 8.2 新機能〜』 ・Elastic 鈴⽊章太郎 さん 『Building a search experience with Elastic – App Search/Elastic Cloud, Docker, Python, React Search UI を使った最新サンプルアプリのご紹介』
  • 29. ElasticON Solution Seminar (7/21 10:00~12:00) https://www.elastic.co/elasticon/event/solution-seminar-japan-jp Elastic 社が主催する ElasticON は、世界の主要都市で開催されているユーザーさま向けのカンファレンス・セミナー形式の イベントです。今回のセミナーでは、Elastic 8.2 シリーズの最新情報と、ライブデモ、そして我々のお客さまがどのようにデータの 利活⽤をしているかの導⼊/活⽤事例をご紹介いたします。是⾮この無料バーチャルイベントにご参加ください。
  • 30. Elastic x mabl 共同セミナー (7/29 15:00~16:00) https://www.elastic.co/jp/virtual-events/elastic-mabl-webinar デジタルカスタマーエクスペリエンスの向上 〜 Elastic と mabl で実現する、ユーザー視点の アプリケーション Observability 〜
  • 31. Thank you for your attention!