移动开发-本地VS跨平台VS JavaScript

时间:2022-03-24 02:17:14

Our company will soon start developing few products for mobile platforms, as CTO I was asked to examine the Pro and Cons of the different tools available in order to achieve the best quality / cost effective solution.

我们公司将很快开始为移动平台开发少量产品,因为CTO I被要求检查不同工具的优缺点,以实现最佳的质量/成本有效的解决方案。

We will be aiming primarily at iOS and Android , secondary for Windows-Mobile and BlackBerry.

我们将主要针对iOS和Android,其次是Windows-Mobile和黑莓。

Candidates:

候选人:

After conducting some background research, I found the following possible candidates:

通过一些背景调查,我发现了以下可能的候选人:

  • Native - Simply but laboriously develop for each platform with its native tools and language.

    本机——使用本机工具和语言为每个平台进行简单而费力的开发。

  • HTML5, CSS and JavaScript - Could be a web service running on the device's browser (a website) , or an app which incapsulate such code around WebKit.

    HTML5、CSS和JavaScript——可以是一个运行在设备浏览器(一个网站)上的web服务,也可以是一个围绕WebKit嵌入这些代码的应用。

  • Rho mobile - Made by Google so it ought to be good - nevertheless based on Ruby (which we are not comfortable with) and does have a complex and rather flimsy dev environment.

    Rho mobile——由谷歌制作,因此应该是不错的——不过基于Ruby(我们对此并不熟悉),而且确实有一个复杂而脆弱的开发环境。

  • PhoneGap - It seems easy and mostly based on Javascript - It is open source but lately acquired by adobe - (not a good sign)

    PhoneGap——看起来很简单,而且主要基于Javascript——它是开源的,但最近被adobe收购了——(这不是一个好兆头)

  • Appcelerator - Anything from Javascript to PHP and to python, have a nice range of API Access but we heard many stories of rejection (by apple), and incompatibilities when using complex code across different platforms.

    Appcelerator——从Javascript到PHP到python,都有很好的API访问范围,但是我们听到了很多拒绝的故事(苹果),以及在不同平台上使用复杂代码时的不兼容性。

  • And more like MoSync, Sencha, Appmobi and Corona (didn't tested them first hand).

    更像MoSync、Sencha、Appmobi和Corona(没有直接测试)。

Some points of reference:

一些参考点:

  • We are not planning on developing games, the applications we are planning to develop are in the realm of business applications & information tools.

    我们不打算开发游戏,我们计划开发的应用程序是在业务应用程序和信息工具领域。

  • The applications are not depending on excessive use of the devices API's (but do need some minor basic access)

    应用程序并不依赖于设备API的过度使用(但是需要一些基本的访问)

  • The company already developed for iOS and we have a small team of native iOS developers (Objective-C geeks)

    该公司已经为iOS开发,我们有一个小型的本地iOS开发者团队(Objective-C geeks)

  • We would like to be sure that we can carry on developing our applications in the feature without them getting broken due to new OS or APIs

    我们希望确保我们可以继续在这个特性中开发我们的应用程序,而不会因为新的操作系统或api而损坏它们

  • It will be beneficial to ensure before hand that the application will not be rejected due to cross platform code (mostly AppStore)

    最好事先确保应用程序不会因为跨平台代码(大部分是AppStore)而被拒绝

  • Like any company we would like to be as cost effective as we can - on the other hand we insist on high quality products and top-of-the-line User experience.

    和其他公司一样,我们希望尽可能地降低成本——另一方面,我们坚持高质量的产品和一流的用户体验。

There is no better place to ask this question than *, I would appreciate any comments from developers with experience on this topic.

没有比*更好的地方来问这个问题了,我希望有经验的开发人员能对这个问题发表评论。

3 个解决方案

#1


60  

There are 500k+ apps on the app markets and competition is fierce. It is paramount to have great UX and graphics.

应用市场上有500k以上的应用,竞争非常激烈。拥有优秀的用户体验和图形是最重要的。

Cross-platform tools are NOT on par with native development. If they were, we would all be using them. But we are not. With a reason - you do NOT have full control. And full-control is necessary to have great looking apps.

跨平台工具不能与本地开发相提并论。如果是的话,我们都会用它们。但我们不是。有一个原因——你没有完全的控制权。而且要有好看的应用程序,完全控制是必要的。

If your app is not a consumer app, but an enterprise app, which use is dictated by some internal department, then you might get by with so-so design, because the value of such app is in it's functionality.

如果你的应用程序不是消费者应用程序,而是企业应用程序,而企业应用程序的使用是由一些内部部门决定的,那么你或许可以通过一般的设计,因为这类应用程序的价值就在于它的功能。

But, if you are serious about mobile apps market - then the only way is to go native. And you need an UX guy and a designer (who knows mobile development) on team full time. You will spend upwards of 50% of time on looks. The project that I'm part of now is spending 80%+ of time on looks (graphics, animations, UX, usability testing).

但是,如果你认真对待移动应用市场,那么唯一的办法就是本土化。你需要一个UX人员和一个设计师(谁知道移动开发)在团队中全职工作。你会花上超过50%的时间在外观上。我现在参与的项目花费了超过80%的时间在外观(图形、动画、用户体验、可用性测试)上。

A suggestion: spend a reasonable amount of time (= days) using you competitors apps. Also spend time with top 50 apps on each market. You will get a feeling how high the bar is. Then check apps made with cross-platform tools (you can find links on their sites) and compare.

建议:花合理的时间(= days)使用你的竞争对手应用程序。同时,在每个市场上花时间在50个应用上。你会感觉到门槛有多高。然后检查用跨平台工具制作的应用程序(你可以在他们的网站上找到链接)并进行比较。

#2


9  

While I'm in complete agreement with @Peter Knego, I'd add a few minor points for teams looking to support several platforms:

虽然我与@Peter Knego完全一致,但我还是要为那些希望支持多个平台的团队增加几点:

  • As Peter notes, UX is huge, and cross-platform UX is least-common-denominator UX. It's hard enough to get this stuff to be everything it needs to be without tying a hand behind your back. Really fantastic web apps are judged on their ability to come close to a native experience, not the other way around.

    正如Peter指出的,UX是巨大的,跨平台的UX是最小公分母的UX。要让这些东西成为它所需要的一切,而不把一只手绑在背后是很难的。真正奇妙的网络应用是根据他们的能力来判断他们是否能接近本土经验,而不是相反。

  • There are many parts of a product that aren't UX. It's worth considering carefully what kind of reuse you can get there. For instance, I've often advised teams who have SQL databases already working on Android not to try to use Core Data on iPhone. There's no reason to reinvent your object and data models.

    产品的很多部分都不是用户体验。值得仔细考虑的是,您可以获得什么样的重用。例如,我经常建议有SQL数据库的团队已经在Android上工作,而不是试图在iPhone上使用核心数据。没有理由重新创建对象和数据模型。

  • This is not a blanket suggestion that you write your core in C++. If you have an extensive, existing C++ core, I've made suggestions before about how to reuse it. But I don't generally recommend it for new code. It's better to use the best OS-level features of the platform in most cases.

    这并不是说要用c++编写核心代码。如果您有一个广泛的、现有的c++核心,我之前已经就如何重用它提出过建议。但我一般不会推荐它用于新代码。在大多数情况下,最好使用平台最好的os级别的特性。

  • Designing network protocols that work well on all platforms is pretty easy and should be pursued. Your best bet here in almost every case is REST and JSON. Keep it simple, especially for iPhone which hates things like SOAP and parsing complex XML.

    设计在所有平台上工作良好的网络协议是非常容易的,应该进行。几乎在所有情况下,最好的选择是REST和JSON。保持简单,特别是对于不喜欢SOAP和解析复杂XML的iPhone。

  • Some complicated layout problems are easier in HTML+CSS than with native controls. This is particularly true if you have complex multi-column tables (especially things you'd need colspan and rowspan for). I've had fairly good luck embedding individual UIWebView pieces in otherwise native apps, even when portability is not a consideration at all. There can be some worthwhile reuse here. Just remember that you don't want to waste a lot of effort and performance trying to make your HTML browser-neutral. On iPhone, use WebKit extensions anywhere they make your app better for the user.

    有些复杂的布局问题在HTML+CSS中比在本地控件中更容易处理。如果您有复杂的多列表(尤其是需要colspan和rowspan的表),那么这一点尤其正确。我很幸运地在其他本地应用程序中嵌入了独立的UIWebView片段,甚至在不考虑可移植性的时候也是如此。这里有一些值得重用的东西。只要记住,您不想浪费大量的精力和性能,试图使您的HTML浏览器中立。在iPhone上,使用WebKit扩展可以让你的应用更适合用户。

One of the most important lessons in this, though, is that there isn't a single "right" way to make an app that is appropriate for all platforms. iPhone apps should act like iPhone apps. Android apps should act like Android apps.

不过,这其中最重要的一个教训是,没有一种“正确”的方式来制作适合所有平台的应用程序。iPhone应用程序应该像iPhone应用程序一样。Android应用程序应该像Android应用程序一样。

Highly cross-platform approaches are a cheap way to get "something" if you don't really care what "something" is. They're a very expensive way to get something great.

高度跨平台的方法是一种获取“某物”的廉价方法,如果你并不真正关心“某物”是什么。这是一种非常昂贵的方式来获得伟大的东西。

#3


2  

I work at AppMobi and I'll just make a few comments.

我在AppMobi工作,我想说几句。

  1. You're app shouldn't be rejected for being cross platform using a native webview. We haven't had Apple use that on any AppMobi submitted apps.

    你的应用程序不应该被拒绝使用原生webview的跨平台。我们还没有让苹果在AppMobi提交的应用程序中使用它。

  2. Rhombile isn't "Made by google". In fact, it's not even the part of Motorola that Google bought, it's their business division. They are pushing towards HTML5/Javascript but currently Ruby.

    Rhombile不是“谷歌制造的”。事实上,它甚至不是谷歌收购的摩托罗拉的一部分,而是他们的业务部门。他们正在开发HTML5/Javascript,但目前是Ruby。

  3. Appcelerator started out supporting a webview, then backtracked. They just raised a ton of money to go back to the webview suppport.

    Appcelerator一开始支持webview,后来又退回了。他们刚刚筹集了大量的资金,用于webview的支持。

As to people saying "No" to the cross platform apps. Facebook and some other major companies are moving towards HTML5 based apps for mobile.

至于那些对跨平台应用说“不”的人。Facebook和其他一些大公司正在转向基于HTML5的移动应用。

#1


60  

There are 500k+ apps on the app markets and competition is fierce. It is paramount to have great UX and graphics.

应用市场上有500k以上的应用,竞争非常激烈。拥有优秀的用户体验和图形是最重要的。

Cross-platform tools are NOT on par with native development. If they were, we would all be using them. But we are not. With a reason - you do NOT have full control. And full-control is necessary to have great looking apps.

跨平台工具不能与本地开发相提并论。如果是的话,我们都会用它们。但我们不是。有一个原因——你没有完全的控制权。而且要有好看的应用程序,完全控制是必要的。

If your app is not a consumer app, but an enterprise app, which use is dictated by some internal department, then you might get by with so-so design, because the value of such app is in it's functionality.

如果你的应用程序不是消费者应用程序,而是企业应用程序,而企业应用程序的使用是由一些内部部门决定的,那么你或许可以通过一般的设计,因为这类应用程序的价值就在于它的功能。

But, if you are serious about mobile apps market - then the only way is to go native. And you need an UX guy and a designer (who knows mobile development) on team full time. You will spend upwards of 50% of time on looks. The project that I'm part of now is spending 80%+ of time on looks (graphics, animations, UX, usability testing).

但是,如果你认真对待移动应用市场,那么唯一的办法就是本土化。你需要一个UX人员和一个设计师(谁知道移动开发)在团队中全职工作。你会花上超过50%的时间在外观上。我现在参与的项目花费了超过80%的时间在外观(图形、动画、用户体验、可用性测试)上。

A suggestion: spend a reasonable amount of time (= days) using you competitors apps. Also spend time with top 50 apps on each market. You will get a feeling how high the bar is. Then check apps made with cross-platform tools (you can find links on their sites) and compare.

建议:花合理的时间(= days)使用你的竞争对手应用程序。同时,在每个市场上花时间在50个应用上。你会感觉到门槛有多高。然后检查用跨平台工具制作的应用程序(你可以在他们的网站上找到链接)并进行比较。

#2


9  

While I'm in complete agreement with @Peter Knego, I'd add a few minor points for teams looking to support several platforms:

虽然我与@Peter Knego完全一致,但我还是要为那些希望支持多个平台的团队增加几点:

  • As Peter notes, UX is huge, and cross-platform UX is least-common-denominator UX. It's hard enough to get this stuff to be everything it needs to be without tying a hand behind your back. Really fantastic web apps are judged on their ability to come close to a native experience, not the other way around.

    正如Peter指出的,UX是巨大的,跨平台的UX是最小公分母的UX。要让这些东西成为它所需要的一切,而不把一只手绑在背后是很难的。真正奇妙的网络应用是根据他们的能力来判断他们是否能接近本土经验,而不是相反。

  • There are many parts of a product that aren't UX. It's worth considering carefully what kind of reuse you can get there. For instance, I've often advised teams who have SQL databases already working on Android not to try to use Core Data on iPhone. There's no reason to reinvent your object and data models.

    产品的很多部分都不是用户体验。值得仔细考虑的是,您可以获得什么样的重用。例如,我经常建议有SQL数据库的团队已经在Android上工作,而不是试图在iPhone上使用核心数据。没有理由重新创建对象和数据模型。

  • This is not a blanket suggestion that you write your core in C++. If you have an extensive, existing C++ core, I've made suggestions before about how to reuse it. But I don't generally recommend it for new code. It's better to use the best OS-level features of the platform in most cases.

    这并不是说要用c++编写核心代码。如果您有一个广泛的、现有的c++核心,我之前已经就如何重用它提出过建议。但我一般不会推荐它用于新代码。在大多数情况下,最好使用平台最好的os级别的特性。

  • Designing network protocols that work well on all platforms is pretty easy and should be pursued. Your best bet here in almost every case is REST and JSON. Keep it simple, especially for iPhone which hates things like SOAP and parsing complex XML.

    设计在所有平台上工作良好的网络协议是非常容易的,应该进行。几乎在所有情况下,最好的选择是REST和JSON。保持简单,特别是对于不喜欢SOAP和解析复杂XML的iPhone。

  • Some complicated layout problems are easier in HTML+CSS than with native controls. This is particularly true if you have complex multi-column tables (especially things you'd need colspan and rowspan for). I've had fairly good luck embedding individual UIWebView pieces in otherwise native apps, even when portability is not a consideration at all. There can be some worthwhile reuse here. Just remember that you don't want to waste a lot of effort and performance trying to make your HTML browser-neutral. On iPhone, use WebKit extensions anywhere they make your app better for the user.

    有些复杂的布局问题在HTML+CSS中比在本地控件中更容易处理。如果您有复杂的多列表(尤其是需要colspan和rowspan的表),那么这一点尤其正确。我很幸运地在其他本地应用程序中嵌入了独立的UIWebView片段,甚至在不考虑可移植性的时候也是如此。这里有一些值得重用的东西。只要记住,您不想浪费大量的精力和性能,试图使您的HTML浏览器中立。在iPhone上,使用WebKit扩展可以让你的应用更适合用户。

One of the most important lessons in this, though, is that there isn't a single "right" way to make an app that is appropriate for all platforms. iPhone apps should act like iPhone apps. Android apps should act like Android apps.

不过,这其中最重要的一个教训是,没有一种“正确”的方式来制作适合所有平台的应用程序。iPhone应用程序应该像iPhone应用程序一样。Android应用程序应该像Android应用程序一样。

Highly cross-platform approaches are a cheap way to get "something" if you don't really care what "something" is. They're a very expensive way to get something great.

高度跨平台的方法是一种获取“某物”的廉价方法,如果你并不真正关心“某物”是什么。这是一种非常昂贵的方式来获得伟大的东西。

#3


2  

I work at AppMobi and I'll just make a few comments.

我在AppMobi工作,我想说几句。

  1. You're app shouldn't be rejected for being cross platform using a native webview. We haven't had Apple use that on any AppMobi submitted apps.

    你的应用程序不应该被拒绝使用原生webview的跨平台。我们还没有让苹果在AppMobi提交的应用程序中使用它。

  2. Rhombile isn't "Made by google". In fact, it's not even the part of Motorola that Google bought, it's their business division. They are pushing towards HTML5/Javascript but currently Ruby.

    Rhombile不是“谷歌制造的”。事实上,它甚至不是谷歌收购的摩托罗拉的一部分,而是他们的业务部门。他们正在开发HTML5/Javascript,但目前是Ruby。

  3. Appcelerator started out supporting a webview, then backtracked. They just raised a ton of money to go back to the webview suppport.

    Appcelerator一开始支持webview,后来又退回了。他们刚刚筹集了大量的资金,用于webview的支持。

As to people saying "No" to the cross platform apps. Facebook and some other major companies are moving towards HTML5 based apps for mobile.

至于那些对跨平台应用说“不”的人。Facebook和其他一些大公司正在转向基于HTML5的移动应用。