简体   繁体   English

我应该使用Azure移动服务还是坚持使用Web Api

[英]Should I use Azure Mobile Services or stick with Web Api

I am developing a prototype app/website as a 'spike' for a project feasibility study. 我正在开发一个原型应用程序/网站,作为项目可行性研究的“钉子”。 We need both a website and an app. 我们需要一个网站和一个应用程序。

I have come from a web forms/c# background with fair amount of sql experience.. and have been up a steep learning curve to get to grips with MVC, Entity framework etc. 我来自具有相当多的SQL经验的Web表单/ C#背景。.并经历了陡峭的学习过程,以掌握MVC,实体框架等。

I have developed an MVC app first which has OAuth and uses Asp.Identity (and roles - just couldn't stay away im afraid:). 我首先开发了一个MVC应用程序,该应用程序具有OAuth并使用Asp.Identity(和角色-恐怕不能逃脱:)。

This uses an Azure Website and Webjobs to handle other tasks.. I really like the idea of not having to manage the whole server. 这使用Azure网站和Webjobs来处理其他任务。我真的很喜欢不必管理整个服务器的想法。

Following what seems the logical step for a mobile app, I have also added Web Api to it.. and have done some successful checks that it is there and working using fiddler etc. 遵循移动应用程序似乎合理的步骤之后,我还向其中添加了Web Api ..并成功地进行了一些检查,检查它是否存在并使用提琴手等工作。

I now need to 'Spike' the mobile element of this and quite favour the Cordova approach since there are no real performance requirements and it looks like AngularJS etc can yield good gains. 我现在需要“钉住”这种移动元素,并且非常喜欢Cordova方法,因为没有真正的性能要求,并且看起来AngularJS等可以产生很好的收益。 So I have added the Cordova tools to my dev environment and done a couple of the tutorials and successfully have an app on my android phone.. so far so good. 因此,我将Cordova工具添加到了我的开发环境中,并完成了一些教程,并成功在Android手机上安装了一个应用程序。

So looking at Azure Mobile services, this seems to offer some nice facilities for our app.. however, and I realise it is still new, but it does seem geared to wards a Node-JS 'server side' application if using Cordova.. is this fixed or am I OK using C#? 因此,从Azure移动服务的角度来看,这似乎为我们的应用程序提供了一些不错的功能。.但是,我意识到它仍然是新的,但如果使用Cordova,它似乎确实适合于使用Node-JS“服务器端”应用程序。这是固定的还是可以使用C#吗? But also I feel I may have circumvented the need for the Mobile services part by adding WebApi.. 但是我也觉得我可以通过添加WebApi来解​​决对移动服务部分的需求。

On the surface it looks like the mobile services is a great 'cloud as service' model for simple app only requirements. 从表面上看,移动服务是仅用于简单应用程序的出色“云即服务”模型。 Or am I wrong .. and should I be using it IN ADDITION to my website.. 还是我错了..我应该在我的网站上另外使用它吗..

The APP and Website are going to use the same database, authentication etc. Which brings me on to the database.. This is not really an 'existing database' (which is where all the tutorials for Mobile Services seem to head).. I can start again if needed.. but of course it is built with code first EF models. APP和网站将使用相同的数据库,身份验证等。这使我进入了数据库。.这实际上不是一个“现有数据库”(这是移动服务的所有教程所处的位置)。可以根据需要重新启动..当然,它是使用代码优先EF模型构建的。

Should I divert energies to using mobile services or, as I am suspecting, carry on developing my own RESTful apis added on to my website.? 我应该将精力转移到使用移动服务上,还是怀疑继续开发自己的添加到我的网站上的RESTful API。

I guess I am looking for some best practice guidance here. 我想我正在这里寻找一些最佳实践指南。

the .NET backend for Mobile Services is actually WebAPI based and is actually geared towards dev's who want to take advantage of their existing .NET/WebAPI skills in writing the backend services as compared to the Portal-based JS backend (you can also write more complex code the JS backend). 用于移动服务的.NET后端实际上是基于WebAPI的,并且实际上是针对希望与基于Portal的JS后端相比,利用现有.NET / WebAPI技能来编写后端服务的开发人员的。复杂的代码(JS后端)。

A key thing to note about Mobile Services is that it's a collection services, not just a backend to your data store. 关于移动服务的关键注意事项是它是一种收集服务,而不仅仅是数据存储的后端。

You have authentication, push notifications, offline support, hybrid connect, etc... on the backend and corresponding client libraries for most mobile platforms (note, since it's REST based, there's not stopping you from consuming the same services from non-mobile platforms such as WPF, ASP.NET MVC, etc..) 您在大多数移动平台的后端和相应的客户端库上具有身份验证,推送通知,脱机支持,混合连接等...(请注意,由于它基于REST,因此不会阻止您从非移动平台使用相同的服务例如WPF,ASP.NET MVC等。)

So the question is, how much of the other features do you actually need and how much effort is it for you to write them yourself vs simply consuming/configuring them in Mobile Services. 因此,问题是,您实际需要多少其他功能,以及自己编写这些功能而不是在移动服务中简单地使用/配置它们需要花费多少精力。

I will answer your overly complex question with a overly simple answer: Mobile Services were designed for mobile devs with no or little experience developing a backend to use a backend with services for their mobile apps. 我将用一个过于简单的答案来回答您过于复杂的问题:移动服务是为没有或几乎没有开发后端以将后端用于其移动应用程序服务的经验的移动开发人员设计的。 If you're an experienced backend developer, you can do the same from scratch. 如果您是经验丰富的后端开发人员,则可以从头开始。

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

相关问题 Azure移动服务Web Api上的SignalR CORS - SignalR CORS on Azure Mobile Services Web Api Azure移动服务和Web API身份验证 - Azure Mobile Services and Web API authentication Web API和MVC中的Azure移动服务令牌验证 - Azure Mobile Services token validation in Web API and MVC Azure Web API 访问:我应该使用哪个 URL,Web 服务 URL 还是网关 URL? - Azure Web API Access: Which URL should I use, the Web Service URL or Gateway URL? 如何登录Azure Mobile Web Services自动生成的Web服务? - How do I log into a web service that was auto-generated by Azure Mobile Web Services? 是否可以将WP7与Azure移动服务一起使用 - Is it possible to use Azure Mobile Services with WP7 如何确保无需计时器即可在Android应用程序中使用Azure移动服务? - How do I make sure I can use Azure Mobile Services in my Android app without a Timer? 我可以在Windows Phone 8.1应用程序的Azure移动服务中使用自己的数据库吗? - Can i use my own database in Azure mobile services for Windows Phone 8.1 apps? 天蓝色的移动服务中有冲突的System.Web.Http.Cors程序集 - Conflicting System.Web.Http.Cors assembly in azure mobile services Azure移动服务日志 - Azure Mobile Services logs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM