What are the advantages and limitations of using Adobe AIR/flex for iOS development?

Source: Internet
Author: User

This is one of my answers on zhihu. The original Article is here: http://www.zhihu.com/question/20001972/answer/15572624.
 

I have never used xcode to develop specific projects. My mobile development experience is mainly Android SDK, air for Android, and air for IOS.

Due to the limitations of development experience, I cannot accurately describe the advantages and disadvantages of xcode. Here we only analyze it based on my android development experience and air development experience on IOS.


Air advantages

The advantage of air is actually the advantage of flash or ActionScript language. I have already seen many of these advantages on the Internet:

 

1. Excellent 2D performance and rendering Mechanism
The remarks on flash performance on the network are absolutely false. In fact, flash performance is quite high, and in most cases it is higher than JavaScript. After such a long history of authoritarian development, actionscript has formed an easy-to-use displayobject mechanism, coupled with flexible movieclip, Sprite and other objects, in terms of 2D animation production, is currently the best choice for Internet technology. Even if you think that the performance of the display list is lower (when the Display object exceeds 1 K), you can use bitmapdata as a high-performance engine for bitmap rendering.

 

2. booming 3D technology
Stage3d is easier to master than OpenGL. With a variety of open-source and paid engines, programmers may be able to make 3D Animations (or games) without having to understand the 3D working mechanism ). Of course, the current stage3d driver support still needs to be improved, but Adobe is currently working very hard (don't try to get down), the driver situation will be solved slowly.
What's even more exciting is the Starling engine that uses stage3d for 2D rendering. Born entirely for the game, the 2D performance of Flash has been improved by an order of magnitude.

 

3. Improved frameworks and communities
After years of development, the flash community has been very well developed and has many excellent frameworks, tools, engines, debuggers, and even compilers. Of course, the OC community may be better, so this advantage is not obvious.

 

4. Easy-to-use languages
ActionScript is a simplified version of Java. I can't compare ActionScript with OC, but it is definitely easier to use than Java. Related comparison can see this: http://www.zhihu.com/question/19762068/answer/15544195

 

5. You can use ane To do what OC can do.
The ANE plug-in technology used by air allows you to use OC to develop some local plug-ins and call it through APIS, so that you can do things that air cannot do. As I will mention later, this is actually a disadvantage.


Air disadvantage

 

1. Large files
Air does not use the virtual machine mode on IOS. It directly compiles the ActionScript code into binary code, which is no different from the binary code converted into xcode. The entire air operation also turns into binary code. This leads to no matter what the size of the program is, you always add the runtime size-10 MB + on the basis of it.

 

2. It is not a bug
For the reason described above, you need to use ActionScript as OC. Otherwise, you may encounter bugs that are not bugs. I mentioned this bug IN THIS ARTICLE: http://zengrong.net/post/1654.htm.

 

3. Painful debugging
Flashbuilder is not developed for iOS, so its debugging process is complex and painful. On flashbuilder 4.6, I must use the iTunes spam software to install the packaged debug version IPA file on the iOS device, and then start the debugging process on flashbuider. The IPA of the debug version runs very slowly (yes, It is very). Even because of its slowness, many bugs cannot occur.
Of course, this situation has improved after the emergence of air 3.4. Air 3.4 can deploy IPA to iOS devices for debugging without using iTunes. However, the current flashbuilder4.6 does not support this method. To use air3.4's new direct deployment debugging function, you must use the command line and then call FDB for debugging.
Air 3.5 supports outputting the debugging stack in the release version (not the debug version), which allows us to debug IPA at normal speeds, but this actually makes us more troublesome.

 

4. Painful Compilation
Does it take 20 minutes for you to endure a compilation? If your program is complicated, the time will be extended. Can you stand to discover a small bug before releasing a program, and wait 20 minutes for compilation and debugging? Note that some bugs can only appear after compilation.

 

5. Painful ane debugging
Unlike the above debugging, ANE debugging is more painful and unpredictable. In many cases, ANE's error is direct FC, with no error code and no message. To solve the problem, you have to guess. Can you guess it?
What's even more painful is that in most cases, programmers who use air work in windows and Debug on Windows systems using the ADL provided by air. This debugging method does not support ane, to test ane, you must package it and debug it on the real iOS device. This encountered the "painful debugging" mentioned above.


Incomplete Summary
 

 

In this case, you can use air

  • What you want to develop is games (do not use air to develop applications)
     
  • There is a flash game that needs to be transplanted to IOS (transplanted)
     
  • Develop a new game with only one month (quick development)
     
  • Only the following code and flash (technical restrictions) are supported)
     

 

About flex

The flex SDK contains the SWF compiler, SwF related tools, mxml language, and a set of frameworks named Flex. Most of these frameworks are interface-based. However, even if Adobe says that their flex UI components have been optimized for mobile devices, never use them to develop programs on mobile devices. Otherwise, you will suffer.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.