如何同时为“所有”手机/移动设备写作?
我们创建在移动设备上运行的非游戏程序; iPhone、Windows Mobile、Android、Palm WebOS 等。我们的主程序是用 C# 为 Windows Mobile 编写的,我们被要求将其移植到 iPhone 上。我们不期待:
- 学习曲线回升 Objective-C、XCode 和 Cocoa Touch。
- 维持两个人的痛苦 用于保存产品的代码集 在两个不同的平台上同步。
我们决定,作为一项战略,我们希望在尽可能多的移动平台上同时创建所有新产品,这是一项艰巨的任务。
我们知道我们必须屈服于这些,但我们更愿意:
- 避免强迫我们的用户 连接到网络以使用产品。
- 没有一堆不同的套装 的源代码。
- 支持尽可能多的移动平台 我们可以。
我的问题是这样的; 对于针对 2 - 5 个最受欢迎的移动平台开发的最佳策略,您有何建议?
编辑:根据评论,我想澄清一下,我们有一款在这两个平台上都广受好评的产品PalmOS 和Winmobile。它在两个平台上的工作原理完全相同,使用户可以轻松切换手持设备并仍然使用它。
现在,我们即将创建许多新的业务应用程序,并希望将其扩展到其他硬件/操作系统。您对以最小的痛苦在许多新平台上部署有何建议?
We create non-game programs that run on mobile devices; iPhones, Windows Mobile, Android, Palm WebOS and the like. Our main program is written in C# for Windows Mobile and we've been asked to port it to iPhone. We are not looking forward to:
- The learning curve to pick up
Objective-C, XCode, and Cocoa Touch. - The pain of maintaining two
sets of code to keep the product in
sync on two different platforms.
We've decided that as a strategy we want to create all new products on as many mobile platforms as possible simultaneously, a formidable task.
We know we'll have to bend on these, but we'd prefer to:
- Avoid forcing our users to be
connected to the web to use a product. - Not have a bunch of different sets
of source code. - Support as many mobile platforms as
we can.
My question is this; What is your suggestion for the best strategy to develop for the 2 - 5 most popular mobile platforms?
EDIT: Based on the comments, I wanted to clarify that we have a product that we well-received on both PalmOS and Winmobile. It works exactly the same on both platforms, making it easy for a user to switch handhelds and still use it.
Now we're on the verge of creating many new business apps and want to expand that to other hardware/OSes. What are your suggestions to deploy on many new platforms with the minimum of pain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我建议你将应用程序的核心和 GUI 分开。因此,您可以继续使用 C# 开发适用于 Windows mobile 和 iPhoneOS 的应用程序(感谢 monoTouch)。通过这种策略,您只需在 Windows mobile (C#) 和 iPhone (Cocoa Touch) 上开发特定的 GUI。
对于其他移动操作系统,您无法使用跨平台开发环境(目前)。您需要重新开发所有应用程序。
所以:
I suggest you to separate the core of your application and the GUI. So you can continue to develop your applications in C# for Windows mobile and iPhoneOS (thanks to monoTouch). With this strategy you have only to develop the specific GUI on Windows mobile (C#) and iPhone (Cocoa Touch).
For other mobile os you can not use a cross platform dev env (for now). You need to redevelop all you application.
So:
虚拟化
根据您的匆忙,我听说 VMWare 正在开发一种移动虚拟化产品,该产品可以将平台统一为移动设备上 VM 内的单个执行点。它几乎肯定会支持大多数智能手机平台(Windows Mobile、Android、Symbian、Blackberry 甚至 iPhone)。当他们(和我们)支持所有人时,他们肯定会受益最多。
如果你不着急的话,也许可以稍等一下。
Virtualization
Depending on your hurry I heard that VMWare is working on a mobile virtualization product that would make it possible to unify platforms into a single execution point within VM on a mobile device. It will almost certainly support majority of smartphone platforms (Windows Mobile, Android, Symbian, Blackberry and maybe even iPhone). They (and we) would definitelly benefit the most when they'd support all of them.
If you're not in a hurry, maybe wait a bit.
对于 Iphone 的 ac# 应用程序,请查看 Monotouch。它是 iPhone 的 .net 框架的 OSS 版本。
With a c# application for the Iphone check out Monotouch. Its the OSS version of the .net framework for the iphone.
我会反其道而行之,给你一些严厉的爱,而不是简单地回答你提出的问题。
我的想法是,为什么您想要制作 2-5 个应用程序版本,而这些版本最多只能在所有平台上收到冷淡的反应?因为这就是你将要得到的。
如果您想制作广受好评并让用户兴奋地使用它们的应用程序,请让他们利用该平台。 iPhone 应用程序应该经过深思熟虑的用户输入,并利用尽可能多的平台功能,例如多点触控、简单的数据存储、加速计、摄像头等。
Palm 应用程序在后台工作得很好,所以编写一些可以充分利用这一点的东西。它甚至可能不仅仅是一个应用程序,以保持 Palm 简单而小型的应用程序方法。
Android 应用程序可以与系统更紧密地集成,因此让它们这样做可以为用户带来好处。
使用任何应用程序的主要好处应该是您完全了解该领域,并且可以描述问题领域的哪些方面最适合任何给定设备的优势。移通过住宿的棱镜来理解。
I'll go against the grain and give you some tough love instead of simply answering the question you asked.
My thought is, why would you want to make 2-5 versions of your application that will receive, at best, a lukewarm reception across all platforms? Because that is what you are going to get.
If you want to make applications that are well received and make users excited to use them, make them take advantage of the platform. iPhone apps should have well thought out user input and take advantage of as many platform features as possible, like mutl-touch, easy data storage, accelerometers, camera and so on.
Palm apps work great in the background so write something that takes full advantage of that. it might even be more than one app to keep to Palm's simple and small approach to apps.
Android apps can integrate much more tightly with the system, so let them do just that to the benefit of the user.
Your main benefit with any app should be that you understand the domain completely, and can describe what aspects of the problem domain work best with the strengths of any given device. Mobile apps are small(ish) and any small gain you get from trying to share code across devices (and how does that work exactly across Java/Obj-C much less Android to Blackberry library differences?) is totally lost in the distortion of your understanding through the prism of accommodation.
尝试使用 PhoneGap!您需要了解的只是网络技术。
Try using PhoneGap! All you need to know is web technologies.
你的问题有点晚了。但是您可以使用 Rhodes (http://rhomobile.com/products/rhodes) 为每个主要智能手机操作系统进行编写。数以万计的其他开发人员也这样做。 Rhodes 是第一个智能手机应用程序框架,也是唯一一个将 Web 开发人员享受的模型视图控制器优势提供给本机智能手机开发的框架。
A bit late to your question. But you can use Rhodes (http://rhomobile.com/products/rhodes) to write for every major smartphone OS. Tens of thousands of other developers do. Rhodes was the first smartphone app framework and the only one to provide the benefits of Model View Controller enjoyed by web developers to native smartphone development.
考虑通过网络实施您的应用程序。这违反了您“避免用户连接到 Web”的偏好,但出于以下原因考虑 Web:
Consider implementing your applications via the web. This violates your preference for "avoiding your users to be connected to the web", but consider the web for the following reasons:
考虑 Appcelerator Titanium、Rhomobile 的 Rhodes、PhoneGap、xmlvm.org 或其他跨设备工具包。
Consider Appcelerator Titanium, Rhomobile's Rhodes, PhoneGap, xmlvm.org, or other cross-device toolkits.
我假设您已经完成了市场研究,并且实际上知道所有平台都会盈利,而不仅仅是耗尽您的资源来开发一两个平台。
除非您违反“不连接到互联网”规则,否则没有很好的答案。但有一个很好的答案;普通的旧 C。
在普通的旧 C 中实现所有应用程序逻辑。然后;
iPhone - Objective-C 是 C 的严格超集,因此只需按原样使用代码即可。并使用 Cocoa Touch 在 Objective-C 中编写 UI。
Android - Android 的 Java 有 JNI,用于调用用 C 编写的本机代码。编写一个薄粘合层,并使用普通的 Android Java 实现您的 UI。
Windows Mobile - 您可以从任何 .NET 应用程序调用本机代码。因此,编写另一个粘合层,并使用 C# 或您喜欢的 .NET 语言实现您的 UI。
Symbian - Symbian 使用 C++ 的变体,因此就像在 iPhone 上一样,您可以按原样调用 C 代码。使用 C++ 和 Symbian API:s 编写 UI。
如果您违反了“无法连接到互联网”规则,那么使用现有的 C# 代码实现服务器并使用 HessianC# 将其公开为 Web 服务是轻而易举的事情。然后,自 2002 年左右开始销售的每部可安装应用程序的手机都可以使用 Hessian 实现。
I make the assumptions that you have already done your market research and actually knows that all platform will be profitable, and not just drain your resources developing for one or two.
There is no great answer unless you break the "no connect to internet" rule. But there is a good answer; plain old C.
Implement all application logic in plain old C. Then;
iPhone - Objective-C is a strict superset of C, so just use the code as is. And write a UI in Objective-C using Cocoa Touch.
Android - Android's Java have JNI for calling native code written in C. Write a thin glue layer, and implement your UI with normal Java for Android.
Windows Mobile - You can call native code from any .NET application. So write another thing glue layer, and implement your UI using C# or your prefered .NET language.
Symbian - Symbian uses a variant of C++, so just like on iPhone you can call your C code as is. Write your UI using C++ and Symbian API:s.
If you break the "no connect to internet" rule then implementing the server with your existing C# code and exposing it as a web service using HessianC# is a snap. And then Hessian implementations are available for every phone that you can install an application on, that has been sold since 2002 or so.