简体   繁体   English

iPhone 数据表单提交最佳实践?

[英]iPhone Data Form Submission best practice?

I am starting a new project where we need to make entering web data forms an easy experience on mobile.我正在开始一个新项目,我们需要在移动设备上轻松输入 web 数据 forms。

Currently our web site data forms cannot be styled and made mobile friendly they also reside behind a company firewall, however we can do POSTS via XML to submit a data form.目前我们的 web 站点数据 forms 无法进行样式设置和移动友好,它们也位于公司防火墙后面,但是我们可以通过 XML 进行 POST 以提交数据表单。

I'm currently undecided to which approach would be best.我目前尚未决定哪种方法最好。

  1. Rebuild the forms natively on the iPhone using iOS components使用 iOS 组件在 iPhone 上本地重建 forms
  2. Somehow create a local HTML5 Data form on the mobile, and then have the iPhone parse this and submit via XML.以某种方式在手机上创建一个本地 HTML5 数据表单,然后让 iPhone 解析并通过 XML 提交。

Has anyone done similar on mobile in the past, it would be great to hear of your experiences, one key piece to this project is that we also need to have the data forms offline, and have them posted when the device is back online.过去有没有人在移动设备上做过类似的事情,很高兴听到你的经历,这个项目的一个关键部分是我们还需要让数据 forms 离线,并在设备重新上线时发布它们。

In my opinion, the better option would be to recreate the forms using the iOS components.在我看来,更好的选择是使用 iOS 组件重新创建 forms。 It would be much more user friendly, and faster, if done right.如果操作正确,它将更加用户友好,速度更快。

Based on the background information you've given, I believe that the only way to go is with the native UI components.根据您提供的背景信息,我相信 go 的唯一方法是使用本机 UI 组件。 Here's why:原因如下:

  1. You've stated the need for offline form "submission".您已经声明需要离线表单“提交”。 You will have a much easier time if you have a native form that stores the information somewhere and then submits it when connected.如果您有一个本地表单将信息存储在某处,然后在连接时提交,您将有一个更轻松的时间。

  2. You've stated the desire to provide an easy experience on mobile.您已表示希望an easy experience on mobile. For that, I would naturally recommend native UI controls.为此,我自然会推荐原生 UI 控件。 Your custom "native" web controls are more likely to be confusing and difficult to use.您的自定义“本机”web 控件更可能令人困惑且难以使用。 Contrast that with UIKit which presumably has a lot of research behind it (and millions of satisfied users to back it.)相比之下,UIKit 背后大概有很多研究(以及数百万满意的用户支持它)。

  3. In the long run, it will be easier to integrate with the rest of the device if you use native controls.从长远来看,如果使用原生控件,将更容易与设备的 rest 集成。

For making XML requests, I recommend the ASIHTTPRequest library .为了发出 XML 请求,我推荐ASIHTTPRequest 库

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM