SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Xamarin的
Azure後端懶人包
Azure Mobile App Service簡易上手
Azure Mobile App Service
Azure提供的PaaS服務(http://bit.ly/2o7S14J)
→提供簡易快速的OData (http://www.odata.org/)格式 REST API搭建
→整合AD, Facebook, Google帳號以及簡單自製規則認證
→提供可離線操作的API架構
→可整合Azure Notification Hub做推播功能
→Node.js的後端可完全用免費Quota的配置節省成本
Backend Language: C#, Node.js
前後端框架都開源放在Github:
C# client http://bit.ly/2DNzpCY
C# backend http://bit.ly/2DMW8Lq
Node.js backend http://bit.ly/2EruIfh
選Mobile App Quick Start有免費立即可用
Node.js後端
預設新建Service Plan記得要選成免費的
建立完成後進入Overview
網址copy起來
瀏覽器可看到預設的建立完成頁面
還有多少免費使用Quota會顯示在Azure
Portal,過一定時間後會重設
Azure Mobile App Quick Start範本
→預設建立起來的是Node.js + Sqlite的OData Web API架構
→Node.js的程式碼可以直接在Azure Portal網站上編輯
提供的功能:
→Easy Table:提供OData 格式的CRUD Web API,預設會建立一個TodoItem表
→Easy API:可用Node.js撰寫自訂格式的Web API
Easy API:
Step1
Easy API:
Step 2
Easy API:
Step 3
Easy API:
Step 4
Easy API:
Step 5
建完可直接用Postman驗證
C# Backend專案直接從Visual Studio建立
專案範本有bug,預設建立起來的一直是
.NET Framework v4.6,建議切換到v4.7
預設也是建立
TodoItem
資料表
後端儲存架構
Entity Framework
Code-First
佈署:下載Publish Profile
在Visual Studio內匯入該Publish Profile的
方式佈署
Xamarin
Quick Start
專案
預設產生的專案格式太舊,無
法在現在的Visual Studio 2017
正常開啟執行
修正後可直接在Visual Studio
2017開啟的版本放在GitHub:
http://bit.ly/2BFIIPA
記得改連線的URL
前端Debug
Azure Mobile App Client端框架C#版有提供
HttpHandler機制,可在建立存取API用的物
件時,加入Handler來做客製化動作(log data,
add custom header)
也可用
Fiddler(https://www.telerik.com/fiddler )來做
中間擷取Http封包的方式來偵錯,但要在建
立存取API用的物件上設定使用系統default
proxy,否則Fiddler會抓不到。
GitHub的範例程式碼:http://bit.ly/2rOYSGQ
其他注意事項及相關資源
→Node.js版後端可用內建Sqlite的Easy Table或是用MS SQL資料庫
→C#版後端的底層架構是搭建在
ASP.NET Web API + Entity Framework Code-First
配合MS SQL資料庫,但MS SQL在Azure上沒有免費層級的資源可使用,且也不
能使用Easy Tables和Easy APIs (Node.js後端獨享)。
→串自製使用者驗證而不是使用AD, Facebook, Google帳號的,取得使用者資訊、
取得群組資訊API、更新API token機制得自行實作且不能和原本提供的名稱一樣。
→較完整介紹各個功能的Online E-book: http://aka.ms/zumobook
→30 Days of Azure Mobile Apps: http://bit.ly/2DZaA6C
範例:http://bit.ly/2GyHKIA
C# Xamarin +
C# Azure Mobile App
利用 .NET Standard
定義介面共享專案
【前後端密切整合】
真‧全端工程師

Weitere ähnliche Inhalte

Was ist angesagt?

美团点评技术沙龙13-酒旅Hybrid架构体系及演进
美团点评技术沙龙13-酒旅Hybrid架构体系及演进美团点评技术沙龙13-酒旅Hybrid架构体系及演进
美团点评技术沙龙13-酒旅Hybrid架构体系及演进美团点评技术团队
 
API Token 入門
API Token 入門API Token 入門
API Token 入門Andrew Wu
 
容器與 Gitlab CI 應用
容器與 Gitlab CI 應用容器與 Gitlab CI 應用
容器與 Gitlab CI 應用Philip Zheng
 
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)Will Huang
 
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)Will Huang
 
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計Andrew Wu
 
KSDG BaaS Intro
KSDG BaaS IntroKSDG BaaS Intro
KSDG BaaS Introericpi Bi
 
Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Will Huang
 
Azure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
Azure Web App on Linux @ Global Azure Bootcamp 2017 TaiwanAzure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
Azure Web App on Linux @ Global Azure Bootcamp 2017 TaiwanWill Huang
 
Angular 5 全新功能探索 @ JSDC2017
Angular 5 全新功能探索 @ JSDC2017Angular 5 全新功能探索 @ JSDC2017
Angular 5 全新功能探索 @ JSDC2017Will Huang
 
Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4Kyle Shen
 
Angular 4 新手入門攻略完全制霸
Angular 4 新手入門攻略完全制霸Angular 4 新手入門攻略完全制霸
Angular 4 新手入門攻略完全制霸Will Huang
 
聊聊一些体验过的“云服务”
聊聊一些体验过的“云服务”聊聊一些体验过的“云服务”
聊聊一些体验过的“云服务”popoer
 
Frontend Devops at Cloudinsight
Frontend Devops at CloudinsightFrontend Devops at Cloudinsight
Frontend Devops at CloudinsightYan Wang
 
91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOpsAndrew Wu
 
IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》easychen
 

Was ist angesagt? (18)

宅學習 Firebase
宅學習 Firebase宅學習 Firebase
宅學習 Firebase
 
美团点评技术沙龙13-酒旅Hybrid架构体系及演进
美团点评技术沙龙13-酒旅Hybrid架构体系及演进美团点评技术沙龙13-酒旅Hybrid架构体系及演进
美团点评技术沙龙13-酒旅Hybrid架构体系及演进
 
API Token 入門
API Token 入門API Token 入門
API Token 入門
 
容器與 Gitlab CI 應用
容器與 Gitlab CI 應用容器與 Gitlab CI 應用
容器與 Gitlab CI 應用
 
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
 
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
 
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計
大規模微服務導入 - #2 從零開始的微服務 .NET Core 框架設計
 
KSDG BaaS Intro
KSDG BaaS IntroKSDG BaaS Intro
KSDG BaaS Intro
 
Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)
 
Azure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
Azure Web App on Linux @ Global Azure Bootcamp 2017 TaiwanAzure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
Azure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
 
Angular 5 全新功能探索 @ JSDC2017
Angular 5 全新功能探索 @ JSDC2017Angular 5 全新功能探索 @ JSDC2017
Angular 5 全新功能探索 @ JSDC2017
 
Vm docker compare
Vm docker compareVm docker compare
Vm docker compare
 
Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4
 
Angular 4 新手入門攻略完全制霸
Angular 4 新手入門攻略完全制霸Angular 4 新手入門攻略完全制霸
Angular 4 新手入門攻略完全制霸
 
聊聊一些体验过的“云服务”
聊聊一些体验过的“云服务”聊聊一些体验过的“云服务”
聊聊一些体验过的“云服务”
 
Frontend Devops at Cloudinsight
Frontend Devops at CloudinsightFrontend Devops at Cloudinsight
Frontend Devops at Cloudinsight
 
91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps
 
IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》
 

Ähnlich wie Xamarin的Azure後端懶人包

移动后端BaaS平台 AVOS Cloud 系统介绍
移动后端BaaS平台 AVOS Cloud 系统介绍移动后端BaaS平台 AVOS Cloud 系统介绍
移动后端BaaS平台 AVOS Cloud 系统介绍Junwen Feng
 
Azure Functions
Azure FunctionsAzure Functions
Azure FunctionsDino Wang
 
twMVC#23 | 快速上手 Azure Functions
twMVC#23 | 快速上手 Azure FunctionstwMVC#23 | 快速上手 Azure Functions
twMVC#23 | 快速上手 Azure FunctionstwMVC
 
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟Tianwei Liu
 
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure PlatformtwMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure PlatformtwMVC
 
以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台AppBen Lue
 
深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabricJohn Chang
 
Using google appengine (2)
Using google appengine (2)Using google appengine (2)
Using google appengine (2)Wei Sun
 
Using google appengine_1027
Using google appengine_1027Using google appengine_1027
Using google appengine_1027Wei Sun
 
Using google appengine_final
Using google appengine_finalUsing google appengine_final
Using google appengine_finalWei Sun
 
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4twMVC
 
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)twMVC
 
MiCloud服務提供者訓練
MiCloud服務提供者訓練MiCloud服務提供者訓練
MiCloud服務提供者訓練Simon Su
 
Android应用开发 - 沈大海
Android应用开发 - 沈大海Android应用开发 - 沈大海
Android应用开发 - 沈大海Shaoning Pan
 
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率Shengyou Fan
 
51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundryHong Cai
 
Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作liangxiao0315
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for HadoopersKuo-Chun Su
 

Ähnlich wie Xamarin的Azure後端懶人包 (20)

移动后端BaaS平台 AVOS Cloud 系统介绍
移动后端BaaS平台 AVOS Cloud 系统介绍移动后端BaaS平台 AVOS Cloud 系统介绍
移动后端BaaS平台 AVOS Cloud 系统介绍
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
twMVC#23 | 快速上手 Azure Functions
twMVC#23 | 快速上手 Azure FunctionstwMVC#23 | 快速上手 Azure Functions
twMVC#23 | 快速上手 Azure Functions
 
Tech days2011
Tech days2011Tech days2011
Tech days2011
 
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟
 
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure PlatformtwMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
 
App house
App houseApp house
App house
 
以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App
 
深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric
 
Using google appengine (2)
Using google appengine (2)Using google appengine (2)
Using google appengine (2)
 
Using google appengine_1027
Using google appengine_1027Using google appengine_1027
Using google appengine_1027
 
Using google appengine_final
Using google appengine_finalUsing google appengine_final
Using google appengine_final
 
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
 
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
 
MiCloud服務提供者訓練
MiCloud服務提供者訓練MiCloud服務提供者訓練
MiCloud服務提供者訓練
 
Android应用开发 - 沈大海
Android应用开发 - 沈大海Android应用开发 - 沈大海
Android应用开发 - 沈大海
 
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率
 
51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry
 
Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for Hadoopers
 

Mehr von Chen Yu Pao

HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門Chen Yu Pao
 
SkiaSharp on Xamarin Forms
SkiaSharp on Xamarin FormsSkiaSharp on Xamarin Forms
SkiaSharp on Xamarin FormsChen Yu Pao
 
ReactiveUI Xamarin.Forms
ReactiveUI Xamarin.FormsReactiveUI Xamarin.Forms
ReactiveUI Xamarin.FormsChen Yu Pao
 
WebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreWebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreChen Yu Pao
 
Xamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientXamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientChen Yu Pao
 
使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin FormsChen Yu Pao
 
Xamarin ARKit Introduction 01
Xamarin ARKit Introduction 01Xamarin ARKit Introduction 01
Xamarin ARKit Introduction 01Chen Yu Pao
 
Xamarin native forms
Xamarin native formsXamarin native forms
Xamarin native formsChen Yu Pao
 
Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Chen Yu Pao
 

Mehr von Chen Yu Pao (9)

HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門
 
SkiaSharp on Xamarin Forms
SkiaSharp on Xamarin FormsSkiaSharp on Xamarin Forms
SkiaSharp on Xamarin Forms
 
ReactiveUI Xamarin.Forms
ReactiveUI Xamarin.FormsReactiveUI Xamarin.Forms
ReactiveUI Xamarin.Forms
 
WebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreWebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET Core
 
Xamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientXamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR client
 
使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms
 
Xamarin ARKit Introduction 01
Xamarin ARKit Introduction 01Xamarin ARKit Introduction 01
Xamarin ARKit Introduction 01
 
Xamarin native forms
Xamarin native formsXamarin native forms
Xamarin native forms
 
Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手
 

Xamarin的Azure後端懶人包