Xamarin 2.0对比Appcelerator Titanium和PhoneGap [英] Xamarin 2.0 vs Appcelerator Titanium vs PhoneGap

查看:290
本文介绍了Xamarin 2.0对比Appcelerator Titanium和PhoneGap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今年所有IDE演变(所有主题平台都发生变化)后,我想了解这些平台的技术状态是什么。



每个人的优点和弱点是什么?
这些方法之一有一些限制?



我有一个很好的C#和Javascript的经验,没有程序化的语言影响,可以倾向于>

=http://www.theregister.co.uk/Print/2013/02/25/cross_platform_abstraction/> Tim Anderson


跨平台开发是一个很大的交易,并将继续这样做,直到一天的时候,每个人都使用同一个平台。 Android?
HTML? WebKit? iOS?视窗? Xamarin? Titanum? PhoneGap? Corona? ecc。



有时我听说,跨平台移动应用程序基本上有两种方法
。您可以使用嵌入的
浏览器控件,并将网络应用程序打包为本机应用程序作为
Adobe PhoneGap / Cordova或Sencha采用的类似方法,或
您可以使用跨平台工具 创建本机
应用程序
,例如Xamarin Studio,Appcelerator Titanium或Embarcardero
FireMonkey。



但在第二类中,有多样性。特别是,
根据他们抽象用户
接口的程度而有所不同。



这里是权衡。如果你设计你的跨平台框架,
可以让你的应用程序在每个平台上几乎一样。
如果你在所有平台上共享UI设计,很难让
使你的设计在所有情况下都是一样的。它可能更好的
采取大多数游戏采用的方法,使用一个设计是
与您的应用程序不同,并使其在
平台上的一致性的美德,即使它没有


编辑 Xamarin v3在2014年开始销售选择 Xamarin.Forms 以及仍然遵循此处提到的哲学的纯原生代(因为有这么好的答案,所以自由的内联编辑) / p>

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


我们不尝试在所有平台上提供一个可以使用
的用户界面抽象层。我们认为这是一个糟糕的方法,导致
最低公分母用户界面。 (Nat Friedman to Tim Anderson)


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



PhoneGap和Titanium的比较在 Kevin Whinnery 博客。



PhoneGap




PhoneGap的目的是允许基于HTML的Web应用程序部署到
,并安装为本地应用程序。 PhoneGap web
应用程序被包装在一个本机应用程序shell中,并且可以通过多个平台的本地应用商店安装

此外,PhoneGap努力提供一个通用的本地API集
,这通常对web应用程序不可用,例如基本的
摄像机访问,设备联系人和传感器尚未暴露在$ b $



要开发PhoneGap应用程序,开发人员将在本地目录中创建 HTML,CSS,
和JavaScript
文件像开发一个
静态网站。在
浏览器中接近原生质量的UI性能是一个不平凡的任务 - Sencha雇佣了一个大团队的web
编程专家全心全意地解决这个问题。即使
,在大多数平台上,在今天的大多数浏览器中,达到
原生质量的UI性能和响应性只是不可能框架如Sencha Touch先进。是
浏览器已经足够好虽然?这取决于你的需求
和敏感性,但它毫无疑问不如本机UI好。
有时更糟糕,取决于浏览器。


PhoneGap不是真正的跨平台,所有功能在所有平台上得到平等支持。




  • Javascript不是一种应用程序规模的编程语言,太多的全局范围交互,不同的库通常不会很好地共存。我们花了很多时间试图让knockout.js和jQuery.mobile一起玩,我们仍然有问题。


  • 框架和库的分割景观。太多的选择,太多不够成熟。


  • 奇怪的是,对于我们的应用程序的需要,可以实现体面的性能(不使用jQuery。移动)。我们尝试了jqMobi(不是很成熟,但速度很快)。


  • 与其他应用或设备功能交互的能力非常有限,




> Karl Waclawek



Appcelerator Titanium



Titanium 移动的目标是提供高级别的跨平台JavaScript 运行时和移动API 开发(今天我们支持iOS,Android和浏览器,分别是BlackBerry 10和Windows Phone即将推出)。 Titanium实际上与MacRuby / Hot Cocoa,PHP或node.js比它与PhoneGap,Adobe AIR,Corona或Rhomobile更常见。 Titanium基于关于移动开发的两个断言:
- 有一个核心的移动开发API,可以跨平台进行标准化。这些区域应该针对代码重用。
- 开发人员在为该平台开发时应该包含平台特定的API,UI惯例和功能。



因此,由于这些原因, Titanium不是尝试一次写入,无处不在。与Xamarin相同。



Titanium将在与Xamarin相似的方向上进行进一步的操作。在实践中,他们将做两个不同深度的层:钛Titanium(在JS),它给你一个蜜蜂JS-of-Titanium。如果你想要更低层次,创建一个额外的层(称为Hyperloop),在哪里(总是与JS)直接回调SO的原生API



Xamarin(+ MVVMCross)



AZDevelop.net


Xamarin(最初是Novell的一个部门)在过去18个月里,已经将
推向市场推出自己的IDE和管理单元视觉工作室。
强调Mono的前提是使用C#创建不同的移动应用程序
,同时保持原生的UI开发策略。



除了创建一个可视化设计平台开发本地
应用程序,他们具有集成的测试套件,结合本地
库支持和Nuget风格组件存储。最近,他们的
通过它们的IDE提供了iOS视觉设计,让开发人员
免于打开XCode。在Visual Studio中,所有这三个平台现在都支持
,并且云测试套件在地平线上。



从开始,Xamarin提供了丰富的Android视觉设计
的经验。我还没有下载或打开Eclipse或任何其他IDE
除了Xamarin。真正惊人的是,我能够使用LINQ
来处理集合,以及创建自定义委托和事件
,从我的目标C和Java的限制。


在我看来,有几个巨大的优势,包括




  • 原生性能

  • 阅读代码(IMO)

  • 可测试性

  • 客户端和服务器之间的共享代码

  • 支持在bugzilla上做得更好)



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



结论



我知道所有这些框架后,选择了基于产品需求的开发工具。但是一般来说,如果你开始使用一个你觉得舒服的工具(即使它需要更高的初始开销),然后你将永远使用它。



我选择了 Xamarin + MVVMCross ,我必须对这个选择感到满意。
我不怕方法本地SDK软件更新或看到系统的有限功能或最小的功能图形。 编写代码相当结构化(DDD + SOA)非常实用,可以与原生C#视图实施共享核心项目



参考资料和链接




After all IDE evolutions (all platforms on topic are changed) of this year, i'm looking to understand what is the state of technology for those platforms.

What are strengths and weaknesses of each ones? There are some limitations of one of those approach?

I have a good experience on C# and Javascript, than there are no programmatic language influence that could lean to one side.

解决方案

Overview

As reported by 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.

edit Xamarin v3 in 2014 started offering choice of Xamarin.Forms as well as pure native that still follows the philosophy mentioned here (took liberty of inline edit because such a great answer)

Xamarin Studio on the other hand makes no attempt to provide a shared GUI framework:

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)

This is right; but the downside is the effort involved in maintaining two or more user interface designs for your app.

Comparison about PhoneGap and Titanium it's well reported in Kevin Whinnery blog.

PhoneGap

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 is not as truly cross-platform as one might believe, not all features are equally supported on all platforms.

  • Javascript is not an application scale programming language, too many global scope interactions, different libraries don't often co-exist nicely. We spent many hours trying to get knockout.js and jQuery.mobile play well together, and we still have problems.

  • Fragmented landscape for frameworks and libraries. Too many choices, and too many are not mature enough.

  • Strangely enough, for the needs of our app, decent performance could be achieved (not with jQuery.Mobile, though). We tried jqMobi (not very mature, but fast).

  • Very limited capability for interaction with other apps or cdevice capabilities, and this would not be cross-platform anyway, as there aren't any standards in HTML5 except for a few, like geolocation, camera and local databases.

by Karl Waclawek

Appcelerator Titanium

The goal of Titanium Mobile is to provide a high level, cross-platform JavaScript runtime and API for mobile development (today we support iOS, Android, and the browser, with BlackBerry 10 and Windows Phone coming soon and eventually, respectively). Titanium actually has more in common with MacRuby/Hot Cocoa, PHP, or node.js than it does with PhoneGap, Adobe AIR, Corona, or Rhomobile. Titanium is built on two assertions about mobile development: - There is a core of mobile development APIs which can be normalized across platforms. These areas should be targeted for code reuse. - There are platform-specific APIs, UI conventions, and features which developers should incorporate when developing for that platform. Platform-specific code should exist for these use cases to provide the best possible experience.

So for those reasons, Titanium is not an attempt at "write once, run everywhere". Same as Xamarin.

Titanium are going to do a further step in the direction similar to that of Xamarin. In practice, they will do two layers of different depths: the layer Titanium (in JS), which gives you a bee JS-of-Titanium. If you want to go more low-level, have created an additional layer (called Hyperloop), where (always with JS) to call you back directly to native APIs of SO

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.

In my opinion there are several HUGE advantages including

  • native performance
  • easier to read code (IMO)
  • testability
  • shared code between client and server
  • support (although Xam could do better on bugzilla)

Upgrade for me is use Xamarin and MVVMCross combined. It's still quite a new framework, but it's born from experience of several other frameworks (such as MvvmLight and monocross) and it's now been used in at several released cross platform projects.

Conclusion

My choice after knowing all these framwework, was to select development tool based on product needs. In general, however if you start to use a tool with which you feel comfortable (even if it requires a higher initial overhead) after you'll use it forever.

I chose Xamarin + MVVMCross and I must say to be happy with this choice. I'm not afraid of approach Native SDK for software updates or seeing limited functionality of a system or the most trivial thing a feature graphics. Write code fairly structured (DDD + SOA) is very useful to have a core project shared with native C# views implementation.

References and links

这篇关于Xamarin 2.0对比Appcelerator Titanium和PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆