Relationship of Adobe AIR SDK and Flex SDK?

六月ゝ 毕业季﹏ 提交于 2020-01-12 06:53:13

问题


I'm trying to make sense of the whole mess of the Flash platform (mainly so I understand the terms being thrown around) and so far, I haven't been able to figure out how exactly the AIR and Flex SDKs are related. Without actually having looked at the SDKs, my understanding would have been that AIR enables you to develop Flash (i.e. ActionScript, and apparently also JavaScript/HTML) applications that can be run by the AIR runtime without the need of a browser (such as a pure desktop or smartphone application). The Flex SDK appears to be a collection of classes and additional APIs (similar to JavaFX?) to extend the "standard" Flash library.

Now, I've downloaded the most recent versions of both SDKs, and apparently, it's not that simple. So, first I looked at the AIR SDK (http://www.adobe.com/devnet/air/air-sdk-download.html, v3.4 as of now). As far as I can tell, the "adt" utility is the main part of AIR that lets you package finished applications. However, I'm not sure if the AIR SDK actually includes a compiler – say you have a bunch of ActionScript .as files and want to turn them into a .swf or .air file using the AIR SDK, is that even possible?

The Flex SDK (http://www.adobe.com/devnet/flex/flex-sdk-download.html, v4.6 as of now) unfortunately didn't help with the confusion. It does include compilers and other tools, but in its "bin" folder, I could also find "adt" and "adl" – the AIR tools! What's more, it also has "AIR SDK license.pdf" and "AIR SDK readme.txt" files; judging from those, it appears that the Flex SDK includes some older version of the AIR SDK version 2.

To make things even more confusing, I also found a "combined version of the Flex and AIR® SDKs (Flex SDK 4.6.0.23201 and AIR 3.4.0.2540 SDK)" on Adobe's site (http://gaming.adobe.com/getstarted/). It seems that this wasn't merely created by copying the AIR 3.4 files to the Flex 4.6 files, adding yet another item to the list.

So, essentially, I'd like to know the differences between these two (three?) SDKs. Would I need the Flex utilities to compile? Why does the "pure" Flex SDK include parts (?) of AIR? Could I just copy any version of the AIR SDK into a Flex SDK to use both with e.g. FlashDevelop?


回答1:


I haven't been able to figure out how exactly the AIR and Flex SDKs are related.

From an encapsulation perspective, they aren't related in any way. However, Adobe does distribute the AIR SDK with their versions of the Flex SDK.

When using an IDE, such as Flash Builder, a certain directory structure is expected, which includes the AIR SDK in a subdirectory of the Flex SDK.

When using Apache Flex, Apache does not have the rights to distribute the AIR SDK, so it is up to the user to combine the AIR SDK and Flex SDK in a way that makes it easy to use the SDK with Flash Builder. However, the Apache Flex folks are working on an "easy install" tool to prepare the Apache Flex SDK for use with Flash Builder. The tool downloads all the relevant non-Apache binaries and provides you with a finished package.

It is perfectly valid to use the Flex UI Framework without AIR; and to use the AIR SDK without Flex. However, in the Flex SDK, specifically in the mobile component set, I believe there are some dependencies to the AIR SDK. And to use AIR, you will need something to compile it. MXMLC from the Flex SDK is one option.

I'm going to attempt to answer some of your specific questions:

My understanding would have been that AIR enables you to develop Flash (i.e. ActionScript, and apparently also JavaScript/HTML) applications that can be run by the AIR runtime without the need of a browser (such as a pure desktop or smartphone application).

This is true; except I do not believe that AIR has HTML/JS support for smartphones in the same way it does on the desktop. The Mobile AIR Runtime does not include an embedded browser like the desktop version does. However, you can make use of the browser on the device using StageWebView.

The Flex SDK appears to be a collection of classes and additional APIs ...to extend the "standard" Flash library.

This is correct. The Flex Framework provides a lot of UI Component classes, in addition to a framework for building your own UI Classes. To be clear, the Flex SDK includes more than just the Flex Framework, including a step through debugger and the command line compiler.

it appears that the Flex SDK includes some older version of the AIR SDK

This is true; the Flex SDK includes a version of the AIR SDK. Flex and AIR are not on the same update schedule; so Flex would only get updated w/ the latest version of AIR when a new Flex release comes out. There are ways to overlay a new Air SDK onto a Flex SDK if you need it. Here are some instructions. I forget the version of AIR included in Adobe Flex 4.6, but I think it is AIR 3.2. AIR 3.4 is the latest from Adobe.

It is worth noting that Flex has been donated to the Apache Foundation; and they have already released Apache Flex 4.8.

Would I need the Flex utilities to compile?

I'm not entirely clear on the answer to this. Most people use MXMLC from the Flex SDK to compile AIR based applications. Even if you use Flash Builder, MXMLC is used under the hood. If you use Flash Professional, I believe it has it's own AIR Compiler but I do not know if it is based on MXMLC. Flash Builder 4.7 will include a brand new compiler--code named Falcon.

Could I just copy any version of the AIR SDK into a Flex SDK to use both with e.g. FlashDevelop?

In theory yes. I don't know anything about FlashDevelop, however I did understand it had support for Flex. I assume, by extension, it also has support for AIR.




回答2:


I'll try to make it simpler. The division into Flex SDK and AIR SDK is due to how Adobe development teams work, and mostly so because of different release cycles. AIR SDK has a different schedule from Flex SDK, and as of today, Flex SDK is no longer developed by Adobe. I think it is safe to say there is no other reason to the way they are packaged / distributed - I failed to find it in many years, so, even if there's one, it's not obvious or important.

Flex SDK usually contains an outdated version of AIR SDK, so you would need to copy the AIR SDK over Flex SDK to have an up to day environment. You may not copy anything, if you can handle setting up the stuff needed for both parts to function (not that much really). However, AIR SDK is not sufficient for development. Flex SDK is sufficient, but will not contain some bits pertaining to AIR (there are even more SDKs, then these two, but for simplicity, let's not mention them here).

I will try to list below things and the places where to look for them, I'm not sure this system is coherent, but it looks this is the best I can do:

Flex SDK

  • ABC (ActionScript) compiler, SWF (ranscoders, linkers etc). compiler, SWC (libraries) packager, utilities like documentation generator, disassembler, debugger.
  • Rudimentary AIR support, mostly what concerns desktops, the packager and the launcher (a debugger, basically).
  • runtimes (various players for the browser, standalone, the AIR player too).
  • libraries to link your code against (similar to headers in C) for different runtimes.
  • Ant tasks for running some utilities, mostly the compiler and linker, but they have some other stuff too, like HTML template generation etc.
  • SDK sources.
  • Flex framework (a large GUI library of dubious quality for designing enterprise style applications - forms, blanks, charts and so on).

AIR SDK

  • Packager and launcher for AIR, APK and what was that iOS application format...
  • It contains runtimes, emulators (mostly avd's for Android emulator + some utilities for working over adb etc, but probably something similar for iOS too).
  • Libraries (headers) for the runtimes.
  • A bit of Flex framework (mentioned above), that particularly targets desktop / mobile.
  • Stuff related to installer / updater.
  • Relevant sources.

Most importantly, Adobe donated Flex SDK to Apache, and the latest version released is 4.8 (by Apache). You will probably find it more complicated to use Apache version because it needs you to do more configuration and download some bits from Adobe, they are not permitted to re-distribute under Apache license.




回答3:


I don't have enough reputation to make this as a comment but in reference to wxvw's answer the Apache Flex one click installer has been release and is available here:

http://flex.apache.org/installer.html

It currently installs Flex 4.9 and all the required (and various optional) dependencies.



来源:https://stackoverflow.com/questions/12554447/relationship-of-adobe-air-sdk-and-flex-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!