开发支持 Web 应用程序的移动应用程序的方法

发布于 2024-10-02 09:01:46 字数 637 浏览 4 评论 0 原文

我的公司构建了自己的项目管理 Web 应用程序。这就像打了类固醇的大本营。该应用程序的核心功能是:

  • 创建任务列表
  • 将任务分配给团队成员
  • 跟踪任务项目的工作时间

我希望构建移动应用程序作为 Web 应用程序的扩展。移动应用程序必须:

  • 重现上述功能
  • 连接到与 Web 应用程序相同的数据库
  • 保留拖放功能
  • Web 应用程序相同或更好的丰富用户体验
  • 提供与iPhone、Droid 和 Blackberry 上的

考虑到上述要求,我应该如何开发这个移动应用程序?我的公司大约有 20 名智能手机用户:8 部 iPhone、7 部机器人和 5 部黑莓。

我听说过像 Phonegap 这样的开发框架,它允许您使用 HTML、Javascript 和 CSS 进行开发。然后,该软件可以跨黑莓、iPhone 和 droid 平台运行。如果我是一名普通/略高于平均水平的程序员,我是否能够使用 PhoneGap(或其他 x 平台开发框架)构建满足上述要求的高质量跨平台移动应用程序?

或者我应该独立构建每个 iphone、droid 和 blackberry 应用程序?

最好的方法是什么?有哪些权衡?

My company built its own project management web application. It's like basecamp on steroids. The core features of this application are:

  • create task lists
  • assign tasks to team members
  • track hours against task items

I am looking to build mobile application(s) as an extension to the web application. The mobile applications(s) must:

  • reproduce the features mentioned above
  • connect to the same database as the web application
  • retain drag drop capabilities
  • provide a rich user experience equivalent to or better than the web application
  • work on iphone, droid and blackberry

Given the requirements above, how should I approach the development of this mobile application? There's about 20 smart phone users in my company: 8 iphones, 7 droids and 5 blackberries.

I've heard of development frameworks like Phonegap that allow you to develop in HTML, Javascript and CSS. The software then works cross platform across blackberry, iphone and droid. If I am an average/slightly-above-average programmer, will I be able to build a high quality cross platform mobile application with PhoneGap (or another x platform development framework) that meets the above requirements?

Or should I build each iphone, droid and blackberry application independently?

What's the best approach? What are the trade offs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

命硬 2024-10-09 09:01:46

约翰,

听起来你还有一些工作要做!当您拥有现有的基于 Web 的应用程序时,有两种基本方法可以使您的应用程序在任何特定设备上可用:您可以 (1) 编写一个本机应用程序,为您想要支持的每个设备实现您想要的功能,或者您可以(2) 为您现有的应用程序编写一个基于 Web 的“包装器”,并将内容作为 HTML/CSS 提供给这些相同的设备。

选项 1:为您想要支持的每个平台构建本机应用

对于第一种方法,好处可能是巨大的。通过使用每个设备的本机框架,您拥有充分的能力和灵活性来利用每个设备的最佳功能。您的应用程序的视图也可以更快地呈现,因为您将从服务器获取的只是用于填充视图的数据(即,您根本不需要加载图像、HTML 模板或 CSS 文件)。

这种方法的缺点是它本质上要求每个设备都有自己的应用程序。因此,如果您支持 Web 应用程序、iPhone 应用程序、Android 应用程序和 Blackberry 应用程序,这意味着您需要维护 4 个完全独立的代码库。如果您向网络应用程序添加某种新功能(您可能会在某个时候添加),您还必须在其他三个单独的代码库中实现该新功能。鉴于这些设备可以具有不同的交互模型,这可能会带来挑战。这里的另一个缺点可能是分发(即,您可能必须经历 iPhone 应用程序商店之类的审核过程,具体取决于您希望如何分发应用程序)。这也意味着您需要学习的内容要多得多,因为每个设备都有自己的 API 集和编程“哲学”。

选项 2:为您的应用编写一个基于 Web 的“包装器”(可能使用库)

这种方法也有很多好处。首先,如果您使用 PhoneGapSencha TouchRhomobile,最大的好处是理论上,您只需编写一次“移动应用程序”代码,它就可以在框架支持的每个设备上运行。与为三个平台编写本机应用程序相比,这工作量要少得多。

这里的缺点如下。此方法作为设备浏览器中的网站运行,因此您将无法访问每个设备的所有功能。根据定义,iOS 和 Android API 中的所有精彩内容都将无法供您使用。您在本地存储方面也受到一定限制,但考虑到您的网络应用程序,这可能不是您所关心的问题。另一个缺点是,通过这种方式,您的服务器将需要更多带宽,因为您要提供所有 HTML、图像和 CSS,而使用本机应用程序则不需要这些内容。根据用户数量和页面的复杂性,这对您来说可能很重要,也可能不重要。这里的另一个缺点是你不能全屏显示(例如,iPhone 的 Mobile Safari 底部总是有一个工具栏)。

一般问题

阅读您的问题时令我担心的一件事是您的要求列表。复制功能和连接到远程数据存储是您绝对可以使用本机和基于网络的移动应用程序完成的事情。但“保留拖放功能”则不然。例如,对于 iPhone,您可以使用 UITableViewCell 中的句柄来提供重新排序列表的方法,但完全拖放实际上并不适合移动设备的用户交互模型。您可能需要重新考虑这一点。

“提供相当于或优于Web应用程序的丰富用户体验”的要求也有点令人不安。虽然基于手机的应用程序可以真正简化获取和操作数据的方式,但请记住,您正在为几英寸见方的屏幕进行设计。从物理上来说,以有组织的方式提供与 21 英寸高清宽屏显示器相同宽度的信息是不可能的。

请记住,您正在为移动设备进行设计,因此您想要利用可用的平台,但请记住,您正在处理小屏幕和有限的交互方法(触摸、滑动和手势)

我的建议是,如果这是您第一次使用,那么您希望支持所有这些设备,并且您。已经有网络经验,我建议采用选项 2 并使用上述框架之一,这将是最简单的开始方式,并且您不需要学习任何完全不同的概念,

祝您好运 。 !

John,

Well it sounds like you've got a bit of work ahead of you! When you have an existing web-based application, there are two basic approaches to getting your app available on any particular device: you can (1) write a native app that implements the functionality you want for each device you want to support or you can (2) write a web-based "wrapper" for your existing app and serve the content as HTML/CSS to those same devices.

Option 1: Build a native app for each platform you want to support

As for the first approach, the benefits can be great. By using each device's native frameworks, you have the complete ability and flexibility to take advantage of the best features of each device. Your app's views can also render faster, since all you will be fetching from your server is the data to populate the views with (i.e., you do not have to load images, HTML templates, or CSS files at all).

The drawback with this approach is that it inherently requires each device to have its own application. So if you're supporting a web app, an iPhone app, an Android app, and a Blackberry app this means that you have 4 completely separate codebases to maintain. If you add some sort of new feature to your web app (which you presumably will at some point), you will also have to implement that new feature in the three other separate code bases. Given the fact that these devices can have different interaction models, this could pose a challenge. Another drawback here can be distribution (i.e., you may have to go through a review process for something like the iPhone app store depending on how you want to distribute your app). It also means that the amount you will have to learn is quite a bit greater since each device has its own API set and programming "philosophy".

Option 2: Write a web-based "wrapper" for your app (perhaps using a library)

This approach also has a great deal of benefits. First off, if you use a framework like PhoneGap or Sencha Touch or Rhomobile, the big benefit is that you theoretically write the "mobile app" code once and it works across each of the devices supported by the framework. Compared to writing a native app for three platforms, this is a lot less work.

Downsides here are as follows. This approach runs as a website in the device's browser, so you will not have access to all of the functionality of every device. All of the great stuff in the iOS and Android API's will by definition not be available to you. You are also somewhat limited here with regard to local storage, but this may not be a great concern to you given your web app. Another drawback is that there will be more bandwidth required from your server this way, since you are serving all of the HTML, images, and CSS that you would otherwise not have to with a native app. Depending on the number of users and complexity of the pages, this could be significant to you or not. Another downside here is that you cannot go full-screen (with the iPhone in Mobile Safari for instance there is always a toolbar at the bottom).

General Concerns

One thing that concerned me reading your question was your list of requirements. Reproducing features and connecting to a remote data store are things you can definitely do with both native and web-based mobile apps. But "retain[ing] drag drop capabilities" is not. With an iPhone, for instance, you can use handles in a UITableViewCell to provide a way to reorder lists, but full-on drag-and-drop is not really something that fits with a mobile device's user interaction model. You may have to re-think this one.

The requirement to "provide a rich user experience equivalent to or better than the web application" is also a bit troubling. While phone-based apps can have really streamlined ways to get at and manipulate data, remember that you are designing for a screen that is a few inches square. It is physically impossible to provide the same breadth of information in an organized manner than you can with a 21" HD widescreen monitor.

Remember that you're designing here for mobile, so you want to take advantage of the available platforms but remember that you're dealing with small screens and limited interaction methods (touches, swipes, and gestures).

My recommendation is that if this is your first time at this, you want to support all of these devices, and you already have experience with the web, I would suggest taking Option 2 and using one of the above-mentioned frameworks. It would be the easiest way to start and there wouldn't be any radically different concepts for you to have to learn.

Good luck!

深爱成瘾 2024-10-09 09:01:46

另外对 Neal L 上面发布的内容进行评论,通过 Rhomobile,您可以访问设备的本机功能,并在视图中进行拖放操作。

这里有几个培训和示例视频:http://rhomobile.com/webinars/

An additionally comment on what Neal L posted above, with Rhomobile you can access the devices native capabilities as well as have drag and drop in your views.

There are several training and example videos here: http://rhomobile.com/webinars/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文