与REST API移动应用程序开发计划是好主意吗? [英] Mobile App Development Plan with REST Api is Good Idea?

查看:183
本文介绍了与REST API移动应用程序开发计划是好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的移动原生应用的发展。

I'm new to mobile native app development.

但我熟悉Web应用开发。

But I'm familiar with web app development.

我要开发iPhone本机应用程序,然后再之后开发Android原生应用。

I was going to develop iPhone Native App first and then develop Android Native App after that.

要减少工作,我的计划是开发REST API的我的应用程序。

To minimize work, my plan was to develop REST APIs for my apps.

API服务器将处理数据库CRUD和会话,以便本机应用程序会打电话

API server is going to handle database CRUD and session so that Native App would call

从抽象的方式数据库数据。

data from database in abstract manner.

让自己的iOS,Android和等本机应用程序只使用这些REST API的

so that my iOS, Android and etc native apps just use those REST APIs

读写照片,文字,经纬度等。

to read and write photos, text, LatLng etc.

我不知道这是开发本机应用程序,建议这样做。

I'm not sure this is a recommended way to develop native apps.

与本机应用程序和数据库或许直接的沟通将有更好的表现,但我在其他所有本机应用程序的版本开发逻辑担心。

Perhaps direct communication with native app and database would have better performance but I'm worried on developing logics in every other native app version.

推荐答案

是的,它是在Android的好,推荐的方法。
有在Android的SOAP没有官方的支持,虽然KSAOP2工作在一些Android应用。
为了实现客户端使用基于REST的Web SVC,你需要做的是在一个单独的线程。
的Andr​​oid 4.x版不支持在主线程的网络连接。

Yes, it is good and recommended approach in Android. There is no official support for SOAP in android, though KSAOP2 works in some android apps. To implement client to consume restful web svc, you need to do it in a separate thread. Android 4.x does not support network connections in main thread.

iOS的:它可以根据是否webapplciation提供RESTful Web服务是好的,也可以使用SOAP。连接到网络URL在SOAP消耗更多的内存。

iOS: it may be good based if the webapplciation provides RESTful webservice or you can use SOAP. Connecting to network url in SOAP consumes more memory.

RESTful方法是除了SOAP普遍接受的Web服务。

RESTful approach is universal accepted webservice besides SOAP.

这篇关于与REST API移动应用程序开发计划是好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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