SlideShare a Scribd company logo
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
Xamarin的Azure後端懶人包
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
定義介面共享專案
【前後端密切整合】
真‧全端工程師

More Related Content

PPTX
容器驅動開發 - .NET Conf 2017 @ 台中
PPTX
Developing Serverless application with Microsoft Azure and Cognitive Services
PPTX
ASP.NET Core 3.0 新功能
PPTX
與大師對談: 轉移到微服務架構必經之路 ~ 系統與資料庫重構
PPTX
ASP.NET Core 6.0 全新功能探索
PDF
SignalR實戰技巧 twmvc#17
PPTX
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
PPTX
使用 ASP.NET 5 實戰開發雲端應用程式
容器驅動開發 - .NET Conf 2017 @ 台中
Developing Serverless application with Microsoft Azure and Cognitive Services
ASP.NET Core 3.0 新功能
與大師對談: 轉移到微服務架構必經之路 ~ 系統與資料庫重構
ASP.NET Core 6.0 全新功能探索
SignalR實戰技巧 twmvc#17
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
使用 ASP.NET 5 實戰開發雲端應用程式

What's hot (18)

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

Similar to Xamarin的Azure後端懶人包 (20)

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

More from Chen Yu Pao (8)

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

Xamarin的Azure後端懶人包