本文介绍了为Web和功放独立ServiceStack服务;原生移动应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的建筑由几个后端(非ServiceStack)服务和通过在asp.net托管ServiceStack服务将数据发送到我们​​的系统应用程序 - 这是目前包含我们所需的服务/资源库/ DTO的结构如下独立ServiceProject项目所有提供的的。

Our architecture consists of several backend (non-ServiceStack) services and applications that send data to our system via ServiceStack service hosted in asp.net - this is currently a standalone ServiceProject project containing our required Services/Repository/DTOs following the structure of all the provided ServiceStack samples.

通过我们的后端完成我们现在正在设计我们由一个web应用和原生移动应用程序的两个前端的要求。对于Web应用程序,我真的很想继续使用剃刀插件从我们现有的DTO创建应用程序的布局/视图利用ServiceStack,为我们的移动应用程序,我们将只依赖于身份验证和数据ServiceStack服务 - 因为它是本土它的布局/视图将来自它自己的SDK。

With our backend complete we're now designing our two front-end requirements consisting of a web application and native mobile application. For the web application I'd really like to continue leveraging ServiceStack by using the Razor plugin to create the application's layout/views from our existing DTOs, for our mobile app we will only rely on the ServiceStack service for authentication and data - as it is native it's layout/views will come from it's own SDK.

我可以离开我的独立ServiceStack服务为是和:


  1. 创建了验证一个单独的Web应用程序项目
    对我们现有的独立ServiceStack服务,并使用
    的Razor视图插件?

  2. 有我们本地移动应用客户端
        对同一个独立ServiceStack服务认证?

大多数例子IE浏览器。 我见过有嵌入在Web项目中的服务,所以我不知道这是否分布类型设置支持。在这个任何指导或反馈大大AP preciated!

Most of the examples ie. RazorRockstars I've seen have the services embedded in the web project so I'm not sure if this distributed type of setup is supported. Any guidance or feedback on this is greatly appreciated!

推荐答案

这是非常可能的。您可以从两种,网络和本地移动应用程序使用的Web服务。我曾在其中用于拨打电话到不同的服务器托管的Web API服务ASP.NET MVC Web应用程序。在Web API服务被多个应用程序之间共享。我们通过从AJAX客户端调用消费它。

It is very much possible. You can consume the web service from both, web and native mobile application. I worked in a ASP.NET MVC web application which used to make call to Web API service hosted at different server. The Web API service was shared among multiple applications. We were consuming it by making AJAX calls from client.

类似于您的情况有什么东西在下面链接来实现,但他们使用的是云托管服务:

Something similar to your scenario is done at below link but they are using cloud to host service:http://www.codeproject.com/Articles/529109/Mobile-2fWebplusClient-2cplusWebplusAPIplusandplus

如果你有机会做一个Web应用程序的移动,而不是本机应用程序,然后在单个解决方案移动和桌面应用程序可以被创建。示范性的解决方案可以在这里找到:

If you have opportunity to make a web app for mobile instead of native app, then in a single solution both mobile and desktop app can be created. The exemplary solution can be found here: http://nopcommerce.codeplex.com/

感谢,并免费自由讨论更多的其他问题的情况下。

Thanks and free free to discuss more in case of further questions.

这篇关于为Web和功放独立ServiceStack服务;原生移动应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 02:53