简体   繁体   English

使用Flex创建iPhone / Android应用程序的缺点

[英]downside of using flex to create iphone/android app

So I know that adobe (or someone else) now provides a way to port your flex app to iphone. 所以我知道adobe(或其他人)现在提供了将flex应用移植到iphone的方法。 This seems to be a good solution when you want to create a multi-platform app that you can port to 3 top mobile OS. 当您要创建一个可以移植到3个顶级移动操作系统的多平台应用程序时,这似乎是一个很好的解决方案。 I am just wondering however. 我只是想知道。 What are the downside? 不利之处是什么? I am sure that doing it in flex is not as performant as doing it in obj-c or java. 我敢肯定,在flex中执行它的性能不如在obj-c或java中执行。 But how bad can it get? 但是它会变得多么糟糕呢? Are there other downside of doing it in Flex? 在Flex中执行此操作还有其他缺点吗? (vs obj-c for iphone/java for android and bb) (vs obj-c for iPhone / java android和bb)

What are the downside? 不利之处是什么?

Here are a few considerations: 以下是一些注意事项:

Performance is one consideration. 性能是一个考虑因素。 It seems unlikely that Flash / AIR will ever run as as performant as an optimized Native application. Flash / AIR似乎不太可能像优化的本机应用程序一样运行。 That last part is not unique to mobile, though. 不过,最后一部分并不是移动设备所独有的。 The lower level you go, the better performance you can get. 级别越低,性能越好。 C will run better than ActionScript. C将比ActionScript运行得更好。 Assembly code will run better than C. Machine code will run better than Assembly. 汇编代码的运行效果将优于C。机器代码的运行效果将优于汇编代码。

No Access to native APIs is another one. 没有访问本机API的权限。 In-app billing and contacts are two common requests I see. 应用程序内结算和联系是我看到的两个常见请求。 AIR 3 has introduced Native Extensions as a way to combat this. AIR 3引入了本机扩展来解决此问题。 However, to create a native extension you're going to have to write native code and compile it in a special way to expose it to the AIR runtime. 但是,要创建本机扩展,您将必须编写本机代码并以特殊方式对其进行编译,以将其公开到AIR运行时。 It is possible, over time, that a bunch of people creative Native Extensions that you'll be able to use so you don't have to do the dirty work yourself. 随着时间的流逝,可能会有很多人可以使用具有创造力的本机扩展,这样您就不必自己进行繁琐的工作。

The dependency on an external runtime is another limiting factor for some. 对外部运行时的依赖性是某些因素的另一个限制因素。 What if the user has an old version of AIR and has issues installing your app? 如果用户使用的是AIR的旧版本该怎么办? In AIR 3, Adobe introduced something called Captive Runtime to combat this. 在AIR 3中,Adobe引入了一种称为Captive Runtime的工具来解决这一问题。 It bundles the runtime as part of the app. 它将运行时捆绑为应用程序的一部分。 It adds about 8MB to the size of the app, but removes the external dependency. 它增加了应用程序大小约8MB,但消除了外部依赖关系。 Captive Runtime is the only way to deploy to iOS. 强制运行时是部署到iOS的唯一方法。

Those are the primary limitations I see. 这些是我看到的主要限制。 I think building with Flex/Flash brings a lot of benefits, but biggest being the ability to deploy easily to multiple platforms. 我认为使用Flex / Flash进行构建会带来很多好处,但最大的好处是能够轻松地部署到多个平台。 If you're already knowledgeable about Flash/AS3; 如果您已经对Flash / AS3有所了解; building Mobile Apps with that seems like a logical choice. 以此来构建移动应用似乎是一个合理的选择。

You will surely have to fine tune your flex application to each platform if you want good performance. 如果要获得良好的性能,您肯定必须对每个平台的Flex应用程序进行微调。

You have to weight what is more important to you; 您必须权衡对您而言更重要的内容; going with flex will enable me to do one application and be able to use it on 3 platforms, meaning fast prototyping on all platforms but it might cause some headaches or do you want to write your application for each platform, making it more performant, robust and will be able to use platform specific features to your advantage? 与flex一起使用将使我能够执行一个应用程序,并能够在3个平台上使用它,这意味着可以在所有平台上快速进行原型制作,但是这可能会引起一些麻烦,或者您想为每个平台编写应用程序,从而使其性能更高,更可靠并能够使用平台特定功能为您带来优势?

You can start by doing a working prototype in flex, test it on the different platforms and eventually, if/as need be, build a platform specific along the way. 您可以从在Flex中创建一个可用的原型开始,在不同的平台上对其进行测试,最终(如果需要)最终构建一个特定于平台的平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM