简体   繁体   English

如何使用离线同步功能为移动应用程序设置后端

[英]How to set up the backend for mobile app using the offline sync feature

I'm starting with xamarin.forms mobile apps and trying to build an app using the azure offline sync feature.我开始使用 xamarin.forms 移动应用程序,并尝试使用 azure 离线同步功能构建应用程序。

In sample applications and tutorials one is asked to create a new backend project by selecting ASP.NET Web Application with the Azure Mobile App template - which in the meantime is retired.在示例应用程序和教程中,要求通过选择带有 Azure 移动应用程序模板的 ASP.NET Web 应用程序来创建一个新的后端项目 - 同时该模板已停用。

Similarly in the azure portal the template (Web + Mobile => Mobile App) to build the backend is retired.同样,在 azure 门户中,用于构建后端的模板(Web + Mobile => Mobile App)已停用。

So it seems the offline sync feature requires setup of specific components which no longer are provided by microsoft.所以看起来离线同步功能需要设置微软不再提供的特定组件。 Since other key features of mobile apps (push notification, authentication & authorization, ...) are still advertised it seems to me that the offline sync feature has silently died.由于移动应用程序的其他关键功能(推送通知、身份验证和授权等)仍在宣传中,在我看来,离线同步功能已悄然消失。

So my questions are:所以我的问题是:

  1. how to set up that backend given that those templates are no longer available?鉴于这些模板不再可用,如何设置该后端?
  2. anybody having experience with that feature in a real world application: does the offline sync feature as it was advertised has proven to be a usable feature ?任何在实际应用程序中使用过该功能的人:是否已证明宣传的离线同步功能是可用的功能?

Any guidance on how to implement the backend feature (without the mentioned templates) would be highly appreciated.任何关于如何实现后端功能(没有提到的模板)的指导都将受到高度赞赏。

  1. Check out the book: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/ - it covers set up without the portal functionality, which - as you have pointed out - is no longer included in the portal.查看这本书: https : //adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/ - 它涵盖了没有门户功能的设置,正如您所指出的那样 - 不再是包含在门户中。
  2. "It depends" - generic offline sync always has caveats because it requires models to be created a certain way in order to support offline sync. “这取决于” - 通用离线同步总是有警告,因为它需要以某种方式创建模型以支持离线同步。 Can you use the feature to synchronize "any" model?您可以使用该功能同步“任何”模型吗? No. However, if you follow the rules laid down (the book I linked to, which I wrote, is a good starting point), then it works well.不。但是,如果您遵循制定的规则(我所链接的书,我写的,是一个很好的起点),那么它运行良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM