在今年所有的IDE演进(主题上的所有平台都发生了变化)之后,我希望了解这些平台的技术状态。
它们各自的优点和缺点是什么? 其中一种方法有局限性吗?
我在c#和Javascript方面有很好的经验,没有编程语言的影响可以倾斜到一边。
在今年所有的IDE演进(主题上的所有平台都发生了变化)之后,我希望了解这些平台的技术状态。
它们各自的优点和缺点是什么? 其中一种方法有局限性吗?
我在c#和Javascript方面有很好的经验,没有编程语言的影响可以倾斜到一边。
当前回答
Phonegap非常慢:点击一个按钮最多需要3秒才能显示下一个屏幕。 Iscroll是缓慢和跳跃的。
还有其他有趣的错误和问题,我能够克服, 但总的来说,还没有完全成熟。
编辑: 根据不爽的评论,实际上不是Phonegap慢,而是JS/Browser原生引擎慢
其他回答
我和Xamarin一起工作过。以下是我发现的优点和缺点:
阳性
易于编码,c#使工作更容易 性能不是问题 本地用户界面 好的IDE,很像Xcode和Visual Studio。 Xamarin的调试器 Xamarin SDK是免费的开源软件。维基
底片
你需要了解你想要瞄准的每个平台(iOS、Android、WP8)的API。但是,您不需要了解Objective-C或Java。 Xamarin跨平台共享的东西很少(比如数据库和web服务)。 你必须为每个平台分别设计UI(这可能是好事,也可能是坏事)。
我使用Appcelerator Titanium的时间并不长,但我会把我对它的理解放在最后。
我可以更多地谈谈PhoneGap和Xamarin之间的区别,因为我每周都有5天(或更多)的时间在使用这两个软件。
如果您已经熟悉c#和JavaScript,那么我想问题是,业务逻辑是更适合JavaScript还是c#的领域?
PhoneGap
PhoneGap is designed to allow you to write your applications using JavaScript and HTML, and much of the functionality that they do provide is designed to mimic the current proposed specifications for the functionality that will eventually be available with HTML5. The big benefit of PhoneGap in my opinion is that since you are doing the UI with HTML, it can easily be ported between platforms. The downside is, because you are porting the same UI between platforms, it won't feel quite as at home in any of them. Meaning that, without further tweaking, you can't have an application that feels fully at home in iOS and Android, meaning that it has the iOS and Android styling. The majority of your logic can be written using JavaScript, which means it too can be ported between platforms. If the current PhoneGap API does most of what you want, then it's pretty easy to get up and running. If however, there are things you need from the device that are not in the API, then you get into the fun of Plugin Development, which will be in the native device's development language of choice (with one caveat, but I'll get to that), which means you would likely need to get up to speed quickly in Objective-C, Java, etc. The good thing about this model, is you can usually adapt many different native libraries to serve your purpose, and many libraries already have PhoneGap Plugins. Although you might not have much experience with these languages, there will at least be a plethora of examples to work from.
Xamarin的
Xamarin.iOS and Xamarin.Android (also known as MonoTouch and MonoDroid), are designed to allow you to have one library of business logic, and use this within your application, and hook it into your UI. Because it's based on .NET 4.5, you get some awesome lambda notations, LINQ, and a whole bunch of other C# awesomeness, which can make writing your business logic less painful. The downside here is that Xamarin expects that you want to make your applications truly feel native on the device, which means that you will likely end up rewriting your UI for each platform, before hooking it together with the business logic. I have heard about MvvmCross, which is designed to make this easier for you, but I haven't really had an opportunity to look into it yet. If you are familiar with the MVVM system in C#, you may want to have a look at this. When it comes to native libraries, MonoTouch becomes interesting. MonoTouch requires a Binding library to tell your C# code how to link into the underlying Objective-C and Java code. Some of these libraries will already have bindings, but if yours doesn't, creating one can be, interesting. Xamarin has made a tool called Objective Sharpie to help with this process, and for the most part, it will get you 95% of the way there. The remaining 5% will probably take 80% of your time attempting to bind a library.
更新
正如下面的评论所指出的,Xamarin发布了Xamarin Forms,这是一个围绕平台特定UI组件的跨平台抽象。绝对值得一看。
PhoneGap / Xamarin Hybrid
现在,因为我说过我会得到它,上面提到的PhoneGap的警告,是一种混合方法,你可以使用PhoneGap的一部分,Xamarin的一部分。我在这方面很有经验,我要提醒你不要这么做。高度。这样做的问题在于,这是一个无人之地,如果你遇到问题,几乎没有人会接近你在做什么,并会极大地质疑你正在尝试做什么。这是可行的,但绝对不好玩。
Appcelerator钛
As I mentioned before, I haven't worked much with Appcelerator Titanium, So for the differences between them, I will suggest you look at Comparing Titanium and Phonegap or Comparison between Corona, Phonegap, Titanium as it has a very thorough description of the differences. Basically, it appears that though they both use JavaScript, how that JavaScript is interpreted is slightly different. With Titanium, you will be writing your JavaScript to the Titanium SDK, whereas with PhoneGap, you will write your application using the PhoneGap API. As PhoneGap is very HTML5 and JavaScript standards compliant, you can use pretty much any JavaScript libraries you want, such as JQuery. With PhoneGap your user interface will be composed of HTML and CSS. With Titanium, you will benefit from their Cross-platform XML which appears to generate Native components. This means it will definitely have a better native look and feel.
还有AppGyver类固醇,结合PhoneGap和本地UI很好。
使用类固醇,你可以添加像本机标签,本机导航栏,本机动画和过渡,本机模式窗口,本机抽屉/面板(facebook侧菜单)等东西到你的PhoneGap应用程序。
这里是一个演示:http://youtu.be/oXWwDMdoTCk?t=20m17s
Phonegap非常慢:点击一个按钮最多需要3秒才能显示下一个屏幕。 Iscroll是缓慢和跳跃的。
还有其他有趣的错误和问题,我能够克服, 但总的来说,还没有完全成熟。
编辑: 根据不爽的评论,实际上不是Phonegap慢,而是JS/Browser原生引擎慢
作为替代方案,你可以在BridgeIt .mobi上查看BridgeIt。它是开源的,解决了上面讨论的浏览器性能/一致性问题,因为它利用了设备上的标准浏览器而不是web视图浏览器。它还允许你访问本地功能,而不必担心应用商店部署和/或本地容器。
我已经将它用于简单的基于摄像头的访问和扫描仪访问,它适用于简单的应用程序。文档内容有点少。不知道它在更复杂的应用程序上会如何表现。