cordova - Xamarin 2.0 与 Appcelerator Titanium 与 PhoneGap

标签 cordova xamarin titanium

这个问题在这里已经有了答案:





Comparison between Corona, Phonegap, Titanium

(14 个回答)


6年前关闭。




在今年的所有 IDE 演变(所有平台都改变了)之后,我希望了解这些平台的技术状态。

每个人的优点和缺点是什么?
其中一种方法有一些限制吗?

我在 C# 和 Javascript 方面有很好的经验,而不是有可能偏向一侧的编程语言影响。

最佳答案

概述

Tim Anderson 报道

Cross-platform development is a big deal, and will continue to be so until a day comes when everyone uses the same platform. Android? HTML? WebKit? iOS? Windows? Xamarin? Titanum? PhoneGap? Corona? ecc.

Sometimes I hear it said that there are essentially two approaches to cross-platform mobile apps. You can either use an embedded browser control and write a web app wrapped as a native app, as in Adobe PhoneGap/Cordova or the similar approach taken by Sencha, or you can use a cross-platform tool that creates native apps, such as Xamarin Studio, Appcelerator Titanium, or Embarcardero FireMonkey.

Within the second category though, there is diversity. In particular, they vary concerning the extent to which they abstract the user interface.

Here is the trade-off. If you design your cross-platform framework you can have your application work almost the same way on every platform. If you are sharing the UI design across all platforms, it is hard to make your design feel equally right in all cases. It might be better to take the approach adopted by most games, using a design that is distinctive to your app and make a virtue of its consistency across platforms, even though it does not have the native look and feel on any platform.



编辑 Xamarin v3 于 2014 年开始提供 Xamarin.Forms 的选择以及仍然遵循这里提到的哲学的纯本地人(因为这样一个很好的答案而随意进行内联编辑)

另一方面,Xamarin Studio 没有尝试提供共享的 GUI 框架:

We don’t try to provide a user interface abstraction layer that works across all the platforms. We think that’s a bad approach that leads to lowest common denominator user interfaces. (Nat Friedman to Tim Anderson)



这是对的;但缺点是需要为您的应用程序维护两个或多个用户界面设计。

关于PhoneGap 和Titanium 的比较,在Kevin Whinnery 中有很好的报道博客。

电话鸿沟

The purpose of PhoneGap is to allow HTML-based web applications to be deployed and installed as native applications. PhoneGap web applications are wrapped in a native application shell, and can be installed via the native app stores for multiple platforms. Additionally, PhoneGap strives to provide a common native API set which is typically unavailable to web applications, such as basic camera access, device contacts, and sensors not already exposed in the browser.

To develop PhoneGap applications, developers will create HTML, CSS, and JavaScript files in a local directory, much like developing a static website. Approaching native-quality UI performance in the browser is a non-trivial task - Sencha employs a large team of web programming experts dedicated full-time to solving this problem. Even so, on most platforms, in most browsers today, reaching native-quality UI performance and responsiveness is simply not possible, even with a framework as advanced as Sencha Touch. Is the browser already “good enough” though? It depends on your requirements and sensibilities, but it is unquestionably less good than native UI. Sometimes much worse, depending on the browser.



PhoneGap 并不像人们想象的那样真正跨平台,并非所有功能都在所有平台上得到同等支持。
  • Javascript 不是应用程序规模的编程语言,太多的全局范围交互,不同的库通常不能很好地共存。我们花了很多时间试图让 Knockout.js 和 jQuery.mobile 一起玩得很好,但我们仍然有问题。
  • 框架和库的碎片化景观。选择太多,太多不够成熟。
  • 奇怪的是,对于我们的应用程序的需求,可以实现不错的性能(但不是使用 jQuery.Mobile)。我们尝试了 jqMobi(不是很成熟,但速度很快)。
  • 与其他应用程序或 cdevice 功能交互的能力非常有限,无论如何这不会是跨平台的,因为 HTML5 中没有任何标准,除了一些标准,如地理定位、相机和本地数据库。

  • 来自 Karl Waclawek

    Appcelerator Titanium

    的目标钛 移动是提供高水平,跨平台 JavaScript 运行时和 移动 API 开发(今天我们支持 iOS、Android 和 Windows Phone。与 PhoneGap、Adobe AIR、Corona 或 Rhomobile 相比,Titanium 实际上与 MacRuby/Hot Cocoa、PHP 或 node.js 的共同点更多。Titanium 建立在两个断言之上关于移动开发:
    - 有一个可以跨平台规范化的移动开发 API 的核心。这些区域应以代码重用为目标。
    - 有特定于平台的 API、UI 约定和开发人员在为该平台开发时应包含的功能。这些用例应存在特定于平台的代码,以提供最佳体验。

    因此,出于这些原因,钛不是“一次编写,到处运行”的尝试 .与 Xamarin 相同。

    Titanium 将朝着类似于 Xamarin 的方向迈出进一步的一步。在实践中,他们会做两个不同深度的层:Titanium 层(在 JS 中),它给你一个蜜蜂 JS-of-Titanium。如果你想更底层,已经创建了一个额外的层(称为 Hyperloop),其中(总是使用 JS)直接回调到 SO 的原生 API

    Xamarin (+ MVVMCross)

    AZDevelop.net

    Xamarin (originally a division of Novell) in the last 18 months has brought to market its own IDE and snap-in for Visual Studio. The underlining premise of Mono is to create disparate mobile applications using C# while maintaining native UI development strategies.

    In addition to creating a visual design platform to develop native applications, they have integrated testing suites, incorporated native library support and a Nuget style component store. Recently they provided iOS visual design through their IDE freeing the developer from opening XCode. In Visual Studio all three platforms are now supported and a cloud testing suite is on the horizon.

    From the get go, Xamarin has provided a rich Android visual design experience. I have yet to download or open Eclipse or any other IDE besides Xamarin. What is truly amazing is that I am able to use LINQ to work with collections as well as create custom delegates and events that free me from objective-C and Java limitations. Many of the libraries I have been spoiled with, like Newtonsoft JSON.Net, work perfectly in all three environments.



    在我看来,有几个巨大的优势,包括
  • 原生性能
  • 更易于阅读的代码 (IMO)
  • 可测试性
  • 客户端和服务器之间的共享代码
  • 支持(尽管 Xam 在 bugzilla 上可以做得更好)

  • 对我来说升级是结合使用 Xamarin 和 MVVMCross。它仍然是一个相当新的框架,但它是从其他几个框架(例如 MvvmLight 和 monocross)的经验中诞生的,现在已经在几个已发布的跨平台项目中使用。

    结论

    在了解了所有这些框架之后,我的选择是选择基于的开发工具。产品需求 .但是,一般而言,如果您开始使用一种您感觉舒服的工具(即使它需要更高的初始开销),那么您将永远使用它。

    我选择了 Xamarin + MVVMCross 我必须说对这个选择感到满意。
    我不害怕使用 Native SDK 进行软件更新或看到系统的有限功能或最琐碎的功能图形。 编写结构合理的代码 (DDD + SOA) 非常有用有一个与 native C# View 实现共享的核心项目。

    引用资料和链接
  • http://www.theregister.co.uk/Print/2013/02/25/cross_platform_abstraction/
  • http://kevinwhinnery.com/post/22764624253/comparing-titanium-and-phonegap
  • http://forums.xamarin.com/discussion/1003/your-opinion-about-several-crossplatform-frameworks#Comment_3334
  • http://azdevelop.azurewebsites.net/?page_id=181
  • https://github.com/MvvmCross/MvvmCross
  • http://pierceboggan.com/post/51671827932/binding-third-party-objective-c-libraries-in
  • 关于cordova - Xamarin 2.0 与 Appcelerator Titanium 与 PhoneGap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17249500/

    相关文章:

    android - Phone Gap 摄像头方向

    cordova - 如何在 Xcode 8 中禁用 "automatically manage signing"

    php - Titanium Studio/PHP - 在 iOS 上的 webview 中打开链接

    php - HTML 没有从 SQL 数据库获取数据

    android - 检测 phonegap 中的假/模拟位置?

    android - 使用 Metadata.xml 重命名公共(public)事件

    c# - 如何在 Android 设备上访问/读取/写入内部存储中的文档文件夹?

    ios - xamarin iOS : How to show the audio amplitude of the voice when recording

    javascript - 如何打开可编辑的对话框来发布推文

    ios - 如何在Appcelerator中使用父子关系更新 ImageView 的图像?