SlideShare une entreprise Scribd logo
1  sur  109
.NET Conf
Learn. Imagine. Build.
.NET Conf
響應式程式開發之 .NET Core 應用
(Reactive Programming with .NET Core)
Blackie Tsai
.NET Conf
這場不會深入的討論如何把
Code 寫好寫滿
.NET Conf
主要是介紹
Reactive Programming
.NET Conf
並透過實際展示,認識
Reactive Programming
.NET Conf
Reactive Programming
是一種編碼風格
.NET Conf
讓我們用一種更合適的方式
撰寫某些情境的程式
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
介紹
Reactive Programming
展示
更多 Reactive
上手
Rx.NET
介紹
Reactive Extensions
.NET Conf
(https://blackie1019.github.io/)
.NET JAVASCRIPT
.NET Conf
什麼是
Reactive Programming?
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
int a = 2;
int b = 3;
int c = a + b;
Console. WriteLine("before: the value of c is {0}",c);
a=2;
b=7;
Console. WriteLine("after: the value of c is {0}",c);
以下程式結果為何?
.NET Conf
before: the value of c is 5
after: the value of c is 5
正常來說…
.NET Conf
before: the value of c is 5
after: the value of c is 9
但有時候我們期望能出現以下結果
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Reactive Programming 是
學習如何與周遭事件進行非
同步開發
.NET Conf
Reactive Programming 是
學習將事件當作資料流
(Stream)進行操作
.NET Conf
.NET Conf
.NET Conf
當到此資料流結束
發生一個錯誤
某一個click event
時間
.NET Conf
Again, 什麼是
Reactive Programming?
.NET Conf
Console.Write("Press input A:");
var a = Convert.ToInt32(Console.ReadLine());
Console.Write("Press input B:");
var b = Convert.ToInt32(Console.ReadLine());
var c = a+b;
Console.WriteLine("before: the value of c is {0}",c);
Console.Write("Press input B again:");
b = Convert.ToInt32(Console.ReadLine());
c = a+b;
Console.WriteLine("after: the value of c is {0}",c);
Imperative programming
.NET Conf
while (true)
{
Console.Write("Press input A:");
var a = Convert.ToInt32(Console.ReadLine());
Console.Write("Press input B:");
var subscription = Observable
.FromAsync(() => Console.In.ReadLineAsync())
.Subscribe(b => Console.WriteLine("the value of c is
{0}",a+Convert.ToInt32(b)));
Console.Write("enter symbol (or x to exit): ");
…
}
Reactive programming
.NET Conf
為什麼要考慮使用Reactive
Programming?
.NET Conf
.NET Conf
https://www.reactivemanifesto.org/
Message Driven
透過非同步訊息溝通達到模組隔離
與委託處理
Responsive
系統在任何情況下,都能及時響應
Resilient
系統在異常時,具有容錯性
Elastic
系統能依據需求彈性拓展
.NET Conf
再繼續講主題前,讓我們離
題一下認識 Functional
Programming
.NET Conf
.NET Conf
.NET Conf
C# 範例
Building building = SomeQueryThatShouldReturnBuilding();
var phoneNumber = null;
// Object-Oriented Programming
if(building != null){
if(building.Manager.ContactInfo != null){
if(building.Manager.ContactInfo.PhoneNumber != null){
phoneNumber = building.Manager.ContactInfo.PhoneNumber;
}
}
}
// Functional Programming
phoneNumber = SomeQueryThatShouldReturnBuilding()
.With(b=>b.Manager)
.With(m=>m.ContactInfo)
.With(c=>c.PhoneNumber);
.NET Conf
[1, 4, 9].map(Math.sqrt).map(
function(x){
return x + 1
}
);
=> [2, 3, 4]
JavaScript 範例
.NET Conf
Object-Oriented Programming Functional Programming
程式開發抽象的核心 資料結構 函式
資料與操作的關係 緊耦合 鬆耦合
溝通方式 物件(Objects) 透過介面 函式(Functions)透過協定
是否有狀態 有狀態(Stateful) 無狀態(Stateless)
回應值是否透明、可預測 回應值由輸入與狀態確定 回應值總是由輸入確定
核心活動 通過向其添加新方法來組合新的物件對象和
擴展現有物件對象
撰寫更多新函式
.NET Conf
.NET Conf
• 我已經在使用aync與await做開發了,沒有必要採
用其他框架來達到異部處理的需求了
• 因為牽涉到開發架構與框架,一旦採用了就沒有回
頭路了
• 因為牽涉到開發架構與框架,一旦採用了就沒有回
頭路了
.NET Conf
介紹 Reactive Extensions
.NET Conf
http://reactivex.io/
.NET Conf
Rx 是結合
觀察器模式, 迭代器模式與函
數編程的函式庫、框架與開
發方式。
觀察器模式, 迭代器模式與函
數編程
.NET Conf
.NET Conf
.NET Conf
.NET Conf
RxJava
RxJS
Rx.NET
UniRx
RxScala
RxClojure
RxCpp
RxLua
Rx.rb
RxPY
RxGo
RxGroovy
RxJRuby
RxKotlin
RxSwift
RxPHP
reaxive
RxDart
RX for Xamarin(Rx.NET)
RxAndroid
RxCocoa
RxNetty
.NET Conf
.NET Conf
https://github.com/Reactive-Extensions/Rx.NET
PM> Install-Package System.Reactive
或
> dotnet add package System.Reactive --version 4.0.0-preview00001
.NET Conf
Lab_00 - Reactive Programming Example
Talk is cheap. Show me the code !
.NET Conf
Rx 是結合
觀察器模式, 迭代器模式與函
數編程的函式庫、框架與開
發方式。
Rx = Observables + LINQ + Schedulers
.NET Conf
大话设计模式之观察者模式
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
大话设计模式 - 迭代器模式之看芒果台還是央视nie?
.NET Conf
L IN Q
.NET Conf
.NET Conf
.NET Conf
Lab_01 – HelloWorld on Rx.NET
Talk is cheap. Show me the code!
.NET Conf
Rx.NET 核心觀念
.NET Conf
拉取(PULL)
.NET Conf
推播(PUSH)
.NET Conf
.NET Conf
.NET Conf
Rx.NET 主要資料結構
.NET Conf
.NET Conf
IObservable<string> subject = new [] { "Jordan", "Kobe", "James"}.ToObservable();
IObservable<string> subject = Observable.FromAsync (() =>
Console.In.ReadLineAsync ());
IObservable<int> subject = Observable.Range(5, 8);
IObservable<int> subject =
from i in Observable.Range(1, 100)
from j in Observable.Range(1, 100)
from k in Observable.Range(1, 100)
where k * k == i * i + j * j
select new { a = i, b = j, c = k };
IObservable<long> subject = Observable.Timer(TimeSpan.FromSeconds(3));
Subject
.NET Conf
// System.Runtime.dll
public interface IObservable<T>
{
IDisposable Subscribe(IObserver<T> observer);
}
IObservable
.NET Conf
// System.Runtime.dll
public interface IObserver<T>
{
void OnNext(T value);
void OnCompleted();
void OnError(Exception exception);
}
IObserver
.NET Conf
// System.Runtime.dll
public interface IDisposable
{
void Dispose();
}
IDisposable
.NET Conf
// System.Reactive.Interfaces.dll
public interface IScheduler
{
DateTimeOffset Now { get; }
IDisposable Schedule<TState>(TState state, Func<IScheduler, TState,
IDisposable> action);
IDisposable Schedule<TState>(TState state, TimeSpan dueTime,
Func<IScheduler, TState, IDisposable> action);
IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime,
Func<IScheduler, TState, IDisposable> action);
}
ISchedule
.NET Conf
Lab_02 - IObservable and IObserver with Rx.NET
Talk is cheap. Show me the code !
.NET Conf
Rx
Asynchronous
programming
model
Events
Delegates
Tasks
IEnumerable<T>
.NET Conf
Rx.NET 方法
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Rx.NET 常見操作子
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
http://rxmarbles.com/
.NET Conf
http://rxwiki.wikidot.com/101samples
.NET Conf
• Lab_03 - Advance with Rx
Talk is cheap. Show me the code !
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Lab_04 - Stock Monitoring with Rx.NET
Lab_05 - MQTT with Rx.NET
Lab_06 - Xamarin with Rx.NET
Showcases
.NET Conf
https://reactiveui.net/
.NET Conf
https://github.com/Reactive-Extensions/RxJS
Draggable UI
Auto Completed
出處 :2017 iT 邦幫忙鐵人賽 : 30 天精通 RxJS
.NET Conf
“Do not forget nor dwell on the past, but do forgive it. Be aware
of the future but do no fear or worry about it. Focus on the
present moment, and that moment alone.”
.NET Conf
常見疑問
.NET Conf
或是
必定
函数式反应型编程(FRP) —— 实
时互动应用开发的新思路
.NET Conf
.NET Conf
.NET Conf
ReactiveX Official Site
Intro to Rx
Interactive diagrams of Rx Observables
Cloud-Scale Event Processing with the Reactive Extensions
(Rx) - Bart De Smet
The introduction to Reactive Programming you've been
missing
A Playful Introduction to Rx by Erik Meijer
.NET Conf
Rx.NET in Action: With examples in C#
.NET Design Patterns
Introduction to Rx: A step by step guide to the Reactive
Extensions to .NET
.NET Conf
fb.com/Study4.twfb.com/groups/216312591822635 Study4.TW
.NET Conf
.NET Conf

Contenu connexe

Tendances

Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJavaParadigma Digital
 
關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事Chen-Tien Tsai
 
JavaScript Interview Questions and Answers | Full Stack Web Development Train...
JavaScript Interview Questions and Answers | Full Stack Web Development Train...JavaScript Interview Questions and Answers | Full Stack Web Development Train...
JavaScript Interview Questions and Answers | Full Stack Web Development Train...Edureka!
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Apache Torqueについて
Apache TorqueについてApache Torqueについて
Apache Torqueについてtako pons
 
Design Patterns in Modern C++
Design Patterns in Modern C++Design Patterns in Modern C++
Design Patterns in Modern C++Dmitri Nesteruk
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring BootTrey Howard
 
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...HostedbyConfluent
 
Ch12 Spring 起步走
Ch12 Spring 起步走Ch12 Spring 起步走
Ch12 Spring 起步走Justin Lin
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreAvanade Nederland
 
Middleware in Asp.Net Core
Middleware in Asp.Net CoreMiddleware in Asp.Net Core
Middleware in Asp.Net CoreShahriar Hossain
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudEberhard Wolff
 

Tendances (20)

Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJava
 
Spring & hibernate
Spring & hibernateSpring & hibernate
Spring & hibernate
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
TestCafe Meetup Malmberg
TestCafe Meetup MalmbergTestCafe Meetup Malmberg
TestCafe Meetup Malmberg
 
關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
JavaScript Interview Questions and Answers | Full Stack Web Development Train...
JavaScript Interview Questions and Answers | Full Stack Web Development Train...JavaScript Interview Questions and Answers | Full Stack Web Development Train...
JavaScript Interview Questions and Answers | Full Stack Web Development Train...
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Ansible Playbook
Ansible PlaybookAnsible Playbook
Ansible Playbook
 
Apache Torqueについて
Apache TorqueについてApache Torqueについて
Apache Torqueについて
 
Design Patterns in Modern C++
Design Patterns in Modern C++Design Patterns in Modern C++
Design Patterns in Modern C++
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
 
Ch12 Spring 起步走
Ch12 Spring 起步走Ch12 Spring 起步走
Ch12 Spring 起步走
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
Middleware in Asp.Net Core
Middleware in Asp.Net CoreMiddleware in Asp.Net Core
Middleware in Asp.Net Core
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
Service Workerとの戦い ~ 実装編 ~ #scripty03
Service Workerとの戦い ~ 実装編 ~ #scripty03Service Workerとの戦い ~ 実装編 ~ #scripty03
Service Workerとの戦い ~ 実装編 ~ #scripty03
 
React + Redux for Web Developers
React + Redux for Web DevelopersReact + Redux for Web Developers
React + Redux for Web Developers
 

Similaire à 響應式程式開發之 .NET Core 應用 

Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .netMarco Parenzan
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyAlexandre Morgaut
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
 
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNextMicrosoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNextRodolfo Finochietti
 
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Stefan Marr
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsBizTalk360
 
Ft10 de smet
Ft10 de smetFt10 de smet
Ft10 de smetnkaluva
 
Java session17
Java session17Java session17
Java session17Niit Care
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Bruce Johnson
 
Dynamic languages for .NET CLR
Dynamic languages for .NET CLRDynamic languages for .NET CLR
Dynamic languages for .NET CLRpy_sunil
 
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)Will Huang
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009nkaluva
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsRobert MacLean
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 

Similaire à 響應式程式開發之 .NET Core 應用  (20)

Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNextMicrosoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
 
Ft10 de smet
Ft10 de smetFt10 de smet
Ft10 de smet
 
Java session17
Java session17Java session17
Java session17
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Dynamic languages for .NET CLR
Dynamic languages for .NET CLRDynamic languages for .NET CLR
Dynamic languages for .NET CLR
 
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 

Plus de Chen-Tien Tsai

Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CDChen-Tien Tsai
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IVChen-Tien Tsai
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part IIIChen-Tien Tsai
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part IIChen-Tien Tsai
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part IChen-Tien Tsai
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - OverviewChen-Tien Tsai
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6Chen-Tien Tsai
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreChen-Tien Tsai
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's differentChen-Tien Tsai
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speakerChen-Tien Tsai
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOpsChen-Tien Tsai
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service wokerChen-Tien Tsai
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPChen-Tien Tsai
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCPChen-Tien Tsai
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance OptimizationChen-Tien Tsai
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestChen-Tien Tsai
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short IntroductionChen-Tien Tsai
 

Plus de Chen-Tien Tsai (20)

Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CD
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET Core
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's different
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speaker
 
Agile tutorial
Agile tutorialAgile tutorial
Agile tutorial
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOps
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service woker
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequest
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 

Dernier

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Dernier (20)

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 

響應式程式開發之 .NET Core 應用 

Notes de l'éditeur

  1. Opening & Personal Introduction - 3 mins Reactive Programming Introduction - 8 mins Reactive Extensions Introduction – 9 mins .NET Core with Rx.NET - 10 mins Adv .NET Core with Rx.NET – 15 mins More Reactive - 2 mins Summary - 3 mins Others - 1 mins
  2. Gérard Philippe Berry 是法籍的電腦開學家,由他所提出的 Reactive Programming 是一種開發的編碼風格與架構,可以讓我們抱持與環境的互動,並將結果交由與其互動的環境來決定,而非程序本身。 這邊他也同時將所有程序按照其互動,分為了三種類型 Transformational program Interactive program Reactive program
  3. 給定的一組輸入並直接得到結果
  4. 以自己的速度與環境或其他程序互動
  5. 保持與環境的持續互動,但速度取決於環境而不是程序本身。
  6. 有獎徵答1
  7. http://blog.kitchenet.tn/what-is-reactive-programming/
  8. 響應式系統具備靈活性,鬆耦合和可擴展性。這使得它們更容易去開發、修改。而對 Error 與 Exception 有更大的容忍,並且當狀況發生時它們會更優雅地應對而不是讓直接系統崩潰。反應式系統有著高度的響應性,並會給用戶有效的交互反饋。 響應式系统是: Responsive 響應式(reacts to events at the speed of environment) 系統在任何情況下,都能及時響應,在可靠的時間內提供訊息且有穩定品質的服務。 Resilient 韌性、堅固, 具有容錯性(Fault-tolerant) 系統在失敗時,仍然保有 Responsive 特性。這是由 replication (複製), containment (容忍), isolation (隔離)以及 delegation (委託)的方式達成的。系統的任何組件發生問題時,可以隔離此部份,並獨立恢復,過程中不會影響整個系統。 Elastic 彈性(Easy Scale up/down and out) 即時量測效能,可透過演算法增加或減少服務的資源分配,滿足不同工作負載量的系統要求。 Message Driven 訊息驅動(modular, pipelined, asynchronous) 組件之間透過非同步訊息傳遞方式互相溝通,用以確保 loose coupling (鬆耦合), isolation (隔離), location transparency (與區域無關)的特性。還能提供錯誤訊息的委託處理機制。
  9. Anders Hejlsberg(安德斯·海爾斯伯格) 丹麥籍的開發教父,Pascal編譯器的主要開發人員,也是Delph與C#之父進入微軟公後,先後設計出了了Visual J ++,Net,C#和TypeScript。 可以說他開發出的軟體和發明的程式語言影響全世界程序員。目前,他是C#語言的首席架構師和TypeScript的核心開發者與TypeScript開源項目的重要領導人 functional Programming 允許開發者描述什麼是他們想要程序去做的,而不是強迫他們描述程序該如何去做
  10. 資料(data) 與操作(operations)
  11. The .NET Foundation is an independent organization, incorporated on March 31, 2014,[1] by Microsoft, to improve open-source software development and collaboration around the .NET Framework.[4] It was launched at the annual Build 2014 conference held by Microsoft.[5] 
  12. 結合觀察者模式(Observer Pattern), 迭代器模式(Iterator Pattern)與函數編程(Functional Programming)的函式庫、框架與開發方式。
  13. 依賴異步訊息傳遞去建立不同組件間的邊界,並以此確保鬆耦合、可隔離、位置透明和提供一種方式可將錯誤用訊息的方式委託至外部通知。 通過塑造和監視系統中的訊息佇列在必要時使用 Backpressure,顯式消息傳遞的使用可以實現負載管理、可擴展性和流程控制。 在通訊中使用位置透明的訊息傳遞使得管理集群和單個主機擁有相同的結構和語義 non-blocking 的通信允許接收者只在活動時消耗資源,可以減少系統的開銷。 Backpressure 指的是在 Buffer 有上限的系统中,Buffer 溢出的现象;它的应对措施只有一个:丢弃新事件。
  14. Package Manager Install-Package System.Reactive -Version 4.0.0-preview00001 .NET CLI dotnet add package System.Reactive --version 4.0.0-preview00001 System.Reactive.Core:  Is the heart of Rx and had extension methods for subscribing to subject. It has static class Observer to create observers. It also provides synchronization and scheduling services. System.Reactive.Interfaces: This provides the interfaces for for event pattern which subject can implement to raise events when data is available. It also has the scheduler interfaces and queriable interfaces for Rx schedulers and LINQ support. System.Reactive.Linq: This provides the famous static class Observable to create in-memory observable sequence. This extends the basic LINQ feature to Rx. System.Reactive.PlatformServices: This extends the basic scheduling services provided in System.Reactive.Core and will replace all the scheduling service in future. Dotnet Core Version: dotnet new console --framework netcoreapp2.0 dotnet add package System.Reactive --version 4.0.0-preview00001
  15. 展示A+B的範例
  16. 結合觀察者模式(Observer Pattern), 迭代器模式(Iterator Pattern)與函數編程(Functional Programming)的函式庫、框架與開發方式。
  17. 想知道一周發生什麼無腦新聞,看狂新聞就好了
  18. 有獎徵答2 有人發現這幅圖真正的意思嗎?=>少雞8
  19. 展示 - Array - Linq With Subscribling
  20. MyObserver MyObserver with Lambda MyObserver with Lambda and NewThread MyObservable EvenNumbers EvenNumbers by Rx.NET Example Odd and Even Numbers by Rx.NET Example
  21. Asynchronous programming model Events Delegates Tasks IEnumerable<T>
  22. Rx.NET in Action Demo Basic Delay Throttle Buffer Query Combine latest https://www.youtube.com/watch?v=DYEbUF4xs1Q
  23. Dalai Lama’s 18 Rules for Living” Expanded 不要忘記過去也不要留在過去,而是要放下。留意未來,但不要害怕也不要擔心。專注於現在的時刻,那一刻
  24. Others: