Azure 移动应用程序的最低依赖项

Minimum Dependencies for Azure Mobile App

新的“Azure Mobile App”资源(取代 "Azure Mobile Services")非常酷。但是,通过 Azure 门户(或在线其他地方找到)提供的示例代码假定最大依赖树,包括对 Entity Framework 的依赖。我希望有最小的依赖关系,但很难识别我可以 "safely" 删除哪些依赖关系。

显而易见的答案是删除提供我不需要的功能的依赖项——但问题是不清楚哪些依赖项提供了哪些功能。尽管如此,从某种意义上说,这只是问题的三分之一。

我知道我想尝试使用推送通知、身份验证(例如 OAuth)和 Dapper 访问 Azure SQL 数据库进行存储。但是...

如果我可以访问(所有?)其他功能的目录,我可能会选择重新确定我的研究的优先级,从而允许我发现我以前不知道的功能。举一个 "storage equivalent" 例子来说明我的意思,请考虑这个 Azure storage options infographic。一张图片值一千字!太棒了!

我发现最接近 "list of features" 的 Azure 移动应用程序在 "SDK Extensions" in a GitHub repo "readme" file 列表中。也许这个列表几乎可以解决我遇到的下三分之一的问题。

问题的最后三分之一是……历史。 Microsoft 发展迅速,新功能迅速浮出水面以取代旧功能。有时我会在阅读几篇解释如何使用特性 'X' 的文章(不一定由 Microsoft 创作)时卡住,却发现特性 'X' 实际上已被特性 'Y' 取代(doh! ).最后的观察导致了整体解决方案...

为了将它们联系在一起,我希望有一个 (1) 按类别分类的 Azure 移动应用程序功能概述和简要说明,就像前面引用的信息图 (2) 对关键 NuGet 的引用 (或 NPM) 与该功能相关的包和 (3) 功能状态的指示(例如 "active" / "superseded")。是的,以我的思维方式,允许已弃用的功能保留 "on the list" 并带有 "deprecated" 标志(以及指向替换它的技术或功能的指针!),而不是将其从中删除更有帮助完整列表。

是否有人有 material(或链接等)与此 "outline" 概述有些相似?这将是我找到我想要的功能所需的完美指导,并且依赖项数量最少。

供参考...

可从移动应用程序的 Azure 帐户下载的示例代码具有以下包依赖项:

手机Api"packages.config"

<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OData" version="5.5.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Authentication" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.CrossDomain" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Entity" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Home" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Notifications" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Quickstart" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Tables" version="0.2.575" targetFramework="net45" />
<package id="Microsoft.Azure.NotificationHubs" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="System.IdentityModel.Tokens.Jwt" version="4.0.2.205111437" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />

Azure API 应用程序 "packages.config"

将上述 packages.config 与新预览“Azure API App”资源类型进行对比 - 具有以下 packages.config:

<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.Azure.AppService.ApiApps.Service" version="0.9.16" targetFramework="net46" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net46" />
<package id="Swashbuckle" version="5.0.0" targetFramework="net46" />
<package id="Swashbuckle.Core" version="5.0.0" targetFramework="net46" />
<package id="System.IdentityModel.Tokens.Jwt" version="4.0.0" targetFramework="net46" />
<package id="WebActivatorEx" version="2.0.6" targetFramework="net46" />

这瘦得令人愉快。我想使用我之前描述的 "super-cool-overview-outline" 来缩小到接近这个的值。有人有这样的东西吗? :}

顺便说一句,如果确实存在这样的大纲 - 它可能包括一个列,阐明哪些功能当前在 Azure API 应用程序中可用或不可用。哇!

因为您包含了 Microsoft.Azure.Mobile.Server.Quickstart 包,所以您确实得到了全套。如果您希望直观地查看依赖关系图,请查看引入此包的 blog post

唯一需要的包是Microsoft.Azure.Mobile.Server,它会带来一些基本的依赖

.Tables 提供了 TableController,如果你想使用的话。

.Entity 依赖于 .Tables 和 EF,允许它们之间的集成(.Entity 是唯一需要 EF 的包)。

。推送通知需要通知

.CrossDomain 仅适用于旧版网络浏览器

.Home 为应用程序的根目录提供登陆页面

您可以选择这些的任意组合,只要您有服务器包。