Use existing Spring MVC for mobile app

2019-09-08 05:25发布

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) 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) 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) 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) 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) Which Restful webservice library is advised?

Thanks

1条回答
闹够了就滚
2楼-- · 2019-09-08 06:02

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).

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

查看更多
登录 后发表回答