你如何同时为所有*手机/移动设备写信?

时间:2021-08-06 12:12:01

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:

我们创建在移动设备上运行的非游戏程序; iPhone,Windows Mobile,Android,Palm WebOS等。我们的主程序是用Windows Mobile的C#编写的,我们已经被要求将它移植到iPhone上。我们不期待:

  1. The learning curve to pick up Objective-C, XCode, and Cocoa Touch.
  2. 获取Objective-C,XCode和Cocoa Touch的学习曲线。

  3. The pain of maintaining two sets of code to keep the product in sync on two different platforms.
  4. 维护两组代码以保持产品在两个不同平台上同步的痛苦。

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?

我的问题是这个;对于为2-5个最受欢迎的移动平台开发最佳策略,您有什么建议?

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.

编辑:根据评论,我想澄清我们有一个我们在PalmOS和Winmobile上都很受欢迎的产品。它在两个平台上的工作原理完全相同,使用户可以轻松切换手持设备并仍然使用它。

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?

现在我们即将创建许多新的业务应用程序,并希望将其扩展到其他硬件/操作系统。您有什么建议在最少的痛苦下部署在许多新平台上?

9 个解决方案

#1


7  

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:

考虑通过网络实施您的应用程序。这违反了您“避免用户连接到网络”的偏好,但出于以下原因考虑网络:

  1. If your C# applications were written the right way, you could expose a web front-end to these applications by reusing your existing libraries.
  2. 如果您的C#应用​​程序以正确的方式编写,则可以通过重用现有库来向这些应用程序公开Web前端。

  3. Web 2.0 is supported by nearly all modern mobile platforms.
  4. 几乎所有现代移动平台都支持Web 2.0。

  5. Your developers could continue writing in the language they're used to (C#).
  6. 您的开发人员可以继续使用他们习惯使用的语言(C#)。

  7. There are many advantages to writing web apps vs platform-specific apps.
  8. 编写Web应用程序与特定于平台的应用程序有很多优点。

#2


5  

Consider Appcelerator Titanium, Rhomobile's Rhodes, PhoneGap, xmlvm.org, or other cross-device toolkits.

考虑Appcelerator Titanium,Rhomobile的Rhodes,PhoneGap,xmlvm.org或其他跨设备工具包。

#3


4  

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.

除非你打破“无连接到互联网”的规则,否则没有什么好的答案。但是有一个很好的答案;普通的老C.

Implement all application logic in plain old C. Then;

用普通的C实现所有应用程序逻辑。然后;

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

    iPhone - Objective-C是C的严格超集,因此只需按原样使用代码即可。并使用Cocoa Touch在Objective-C中编写UI。

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

    Android - Android的Java有JNI用于调用用C编写的本机代码。编写一个薄的粘合层,并使用普通的Java for Android实现您的UI。

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

    Windows Mobile - 您可以从任何.NET应用程序调用本机代码。所以写另一个胶水层,并使用C#或您喜欢的.NET语言实现您的UI。

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

    Symbian - Symbian使用C ++的变体,所以就像在iPhone上一样,您可以按原样调用C代码。使用C ++和Symbian API编写UI: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.

如果您打破“无连接到互联网”规则,那么使用现有的C#代码实现服务器并使用HessianC#将其作为Web服务公开是一件轻而易举的事。然后,Hessian实现可用于您可以安装应用程序的每部手机,自2002年左右开始销售。

#4


3  

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

我建议你将应用程序的核心和GUI分开。因此,您可以继续使用C#for Windows mobile和iPhoneOS开发应用程序(感谢monoTouch)。使用此策略,您只需在Windows移动(C#)和iPhone(Cocoa Touch)上开发特定的GUI。

For other mobile os you can not use a cross platform dev env (for now). You need to redevelop all you application.

对于其他移动操作系统,您无法使用跨平台开发环境(目前)。您需要重新开发所有应用程序。

So:

  • Windows Mobile: Core(C#) & GUI(C#)
  • Windows Mobile:核心(C#)和GUI(C#)

  • iPhone: Core(C#) & GUI(Cocoa Touch)
  • iPhone:核心(C#)和GUI(Cocoa Touch)

  • Android: Core(Java) & GUI(Java)
  • Android:核心(Java)和GUI(Java)

  • Other: depends on OS
  • 其他:取决于操作系统

#5


2  

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.

根据您的匆忙,我听说VMWare正在开发一种移动虚拟化产品,可以将平台统一到移动设备上的VM内的单个执行点。它几乎肯定会支持大多数智能手机平台(Windows Mobile,Android,Symbian,Blackberry甚至iPhone)。当他们支持所有人时,他们(和我们)肯定会受益最多。

If you're not in a hurry, maybe wait a bit.

如果你不赶时间,也许等一下。

#6


1  

With a c# application for the Iphone check out Monotouch. Its the OSS version of the .net framework for the iphone.

使用I#的c#应用程序查看Monotouch。它是iphone的.net框架的OSS版本。

#7


1  

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.

我的想法是,你为什么要制作2-5版本的应用程序,最多可以在所有平台上获得不冷不热的接收?因为这就是你要得到的。

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.

如果您希望创建受欢迎的应用程序并让用户兴奋地使用它们,请让他们利用该平台。 iPhone应用程序应该经过深思熟虑的用户输入,并利用尽可能多的平台功能,如mutl-touch,简单的数据存储,加速度计,相机等。

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.

Palm应用程序在后台工作得很好,所以写一些可以充分利用它的东西。它可能甚至不止一个应用程序,以保持Palm的简单和小的应用程序方法。

Android apps can integrate much more tightly with the system, so let them do just that to the benefit of the user.

Android应用程序可以与系统更紧密地集成,因此让他们这样做是为了用户的利益。

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.

您对任何应用程序的主要好处应该是您完全了解域,并且可以描述问题域的哪些方面最适合任何给定设备的优势。移动应用程序很小(ish),并且尝试跨设备共享代码所获得的任何微小收益(以及它如何在Java / Obj-C中完全更好地工作,而不是Android到Blackberry库的差异?)在你的失真中完全丢失了通过住宿的棱镜来理解。

#8


1  

Try using PhoneGap! All you need to know is web technologies.

尝试使用PhoneGap!您需要知道的只是网络技术。

#9


0  

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.

你的问题有点晚了。但您可以使用Rhodes(http://rhomobile.com/products/rhodes)为每个主要的智能手机操作系统编写代码。成千上万的其他开发人员。 Rhodes是第一个智能手机应用程序框架,也是唯一一个提供Web开发人员对本机智能手机开发所享有的模型视图控制器优势的框架。

#1


7  

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:

考虑通过网络实施您的应用程序。这违反了您“避免用户连接到网络”的偏好,但出于以下原因考虑网络:

  1. If your C# applications were written the right way, you could expose a web front-end to these applications by reusing your existing libraries.
  2. 如果您的C#应用​​程序以正确的方式编写,则可以通过重用现有库来向这些应用程序公开Web前端。

  3. Web 2.0 is supported by nearly all modern mobile platforms.
  4. 几乎所有现代移动平台都支持Web 2.0。

  5. Your developers could continue writing in the language they're used to (C#).
  6. 您的开发人员可以继续使用他们习惯使用的语言(C#)。

  7. There are many advantages to writing web apps vs platform-specific apps.
  8. 编写Web应用程序与特定于平台的应用程序有很多优点。

#2


5  

Consider Appcelerator Titanium, Rhomobile's Rhodes, PhoneGap, xmlvm.org, or other cross-device toolkits.

考虑Appcelerator Titanium,Rhomobile的Rhodes,PhoneGap,xmlvm.org或其他跨设备工具包。

#3


4  

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.

除非你打破“无连接到互联网”的规则,否则没有什么好的答案。但是有一个很好的答案;普通的老C.

Implement all application logic in plain old C. Then;

用普通的C实现所有应用程序逻辑。然后;

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

    iPhone - Objective-C是C的严格超集,因此只需按原样使用代码即可。并使用Cocoa Touch在Objective-C中编写UI。

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

    Android - Android的Java有JNI用于调用用C编写的本机代码。编写一个薄的粘合层,并使用普通的Java for Android实现您的UI。

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

    Windows Mobile - 您可以从任何.NET应用程序调用本机代码。所以写另一个胶水层,并使用C#或您喜欢的.NET语言实现您的UI。

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

    Symbian - Symbian使用C ++的变体,所以就像在iPhone上一样,您可以按原样调用C代码。使用C ++和Symbian API编写UI: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.

如果您打破“无连接到互联网”规则,那么使用现有的C#代码实现服务器并使用HessianC#将其作为Web服务公开是一件轻而易举的事。然后,Hessian实现可用于您可以安装应用程序的每部手机,自2002年左右开始销售。

#4


3  

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

我建议你将应用程序的核心和GUI分开。因此,您可以继续使用C#for Windows mobile和iPhoneOS开发应用程序(感谢monoTouch)。使用此策略,您只需在Windows移动(C#)和iPhone(Cocoa Touch)上开发特定的GUI。

For other mobile os you can not use a cross platform dev env (for now). You need to redevelop all you application.

对于其他移动操作系统,您无法使用跨平台开发环境(目前)。您需要重新开发所有应用程序。

So:

  • Windows Mobile: Core(C#) & GUI(C#)
  • Windows Mobile:核心(C#)和GUI(C#)

  • iPhone: Core(C#) & GUI(Cocoa Touch)
  • iPhone:核心(C#)和GUI(Cocoa Touch)

  • Android: Core(Java) & GUI(Java)
  • Android:核心(Java)和GUI(Java)

  • Other: depends on OS
  • 其他:取决于操作系统

#5


2  

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.

根据您的匆忙,我听说VMWare正在开发一种移动虚拟化产品,可以将平台统一到移动设备上的VM内的单个执行点。它几乎肯定会支持大多数智能手机平台(Windows Mobile,Android,Symbian,Blackberry甚至iPhone)。当他们支持所有人时,他们(和我们)肯定会受益最多。

If you're not in a hurry, maybe wait a bit.

如果你不赶时间,也许等一下。

#6


1  

With a c# application for the Iphone check out Monotouch. Its the OSS version of the .net framework for the iphone.

使用I#的c#应用程序查看Monotouch。它是iphone的.net框架的OSS版本。

#7


1  

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.

我的想法是,你为什么要制作2-5版本的应用程序,最多可以在所有平台上获得不冷不热的接收?因为这就是你要得到的。

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.

如果您希望创建受欢迎的应用程序并让用户兴奋地使用它们,请让他们利用该平台。 iPhone应用程序应该经过深思熟虑的用户输入,并利用尽可能多的平台功能,如mutl-touch,简单的数据存储,加速度计,相机等。

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.

Palm应用程序在后台工作得很好,所以写一些可以充分利用它的东西。它可能甚至不止一个应用程序,以保持Palm的简单和小的应用程序方法。

Android apps can integrate much more tightly with the system, so let them do just that to the benefit of the user.

Android应用程序可以与系统更紧密地集成,因此让他们这样做是为了用户的利益。

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.

您对任何应用程序的主要好处应该是您完全了解域,并且可以描述问题域的哪些方面最适合任何给定设备的优势。移动应用程序很小(ish),并且尝试跨设备共享代码所获得的任何微小收益(以及它如何在Java / Obj-C中完全更好地工作,而不是Android到Blackberry库的差异?)在你的失真中完全丢失了通过住宿的棱镜来理解。

#8


1  

Try using PhoneGap! All you need to know is web technologies.

尝试使用PhoneGap!您需要知道的只是网络技术。

#9


0  

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.

你的问题有点晚了。但您可以使用Rhodes(http://rhomobile.com/products/rhodes)为每个主要的智能手机操作系统编写代码。成千上万的其他开发人员。 Rhodes是第一个智能手机应用程序框架,也是唯一一个提供Web开发人员对本机智能手机开发所享有的模型视图控制器优势的框架。