使用现有的Spring MVC for mobile app [英] Use existing Spring MVC for mobile app

查看:160
本文介绍了使用现有的Spring MVC for mobile app的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Spring MVC的Web应用程序。现在,我们计划使用离子框架(用于Android和ios应用程序)开发移动应用程序。对于服务器端开发,以下是我的疑问。

I have a web application using Spring MVC. Now, we are planning to develop mobile apps using ionic framework (for android and ios apps). For server side development, following are my doubts.

1)我是否可以重用现有的Spring MVC以用于移动应用程序? (大多数调用返回json,因为我们的Web应用程序客户端是淘汰js)。

1) Can I reuse existing Spring MVC to be used from mobile apps as well? (Most of the calls are returning json as our web app client side is knockout js).

2)或者我应该使用Scala play框架?这对我来说是全新的,需要一个学习期,而这个开发是紧迫的。

2) Or should I go with Scala play framework? It is completely new to me and will need a learning period while this development is urgent.

3)如果我要使用Restful apis并重用现有的服务类,如果我不需要发送完整的bo(作为json)但需要忽略或添加更多字段?

3) If am to use Restful apis and reuse existing service classes, what if I dont need to send complete bo (as json) but needs to ignore or add some more fields?

4)当前的Spring MVC由Spring MVC保护。如果要使用Spring MVC或任何REstful服务,我将如何进行安全性?

4) Current Spring MVC is secured by Spring MVC. How will I go about security if am to use Spring MVC or any REstful services?

5)建议使用哪个Restful Web服务库?

5) Which Restful webservice library is advised?

谢谢

推荐答案

如果我理解正确,你说你已经拥有一个基本上可以提供宁静服务的应用程序API和输出json。在这种情况下,您只需要进一步查看 - 只需将其用作后端(添加您需要的任何其他API功能,并重用您已有的所有功能)。

If I understood correctly, you say that you already have an application that basically serves a restful API and outputs json. In that case, you just don't have to look any further - just use that as your backend (add any additional API functionality that you need, and reuse all that you already have).

您可以使用Angular $ resource 与RESTful进行交互来自Ionic内部的服务器端数据源。

You can use the Angular $resource to interact with RESTful server-side data sources from inside Ionic.

这篇关于使用现有的Spring MVC for mobile app的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆