我应该使用 Flash 还是 Flex?

发布于 2024-09-25 06:57:32 字数 341 浏览 6 评论 0原文

在 SO,我问我应该使用什么语言来创建一个网络应用程序,该应用程序可以从用户网络摄像头捕获视频,并在用户单击“提交”时将其发送到服务器,答案大多是 Flash。

但在网上搜索时,我对 Flash/Flex 的事情感到困惑,因为他们说 Flash 是用来制作动画的,而 Flex 是用来真正创建 Web 应用程序的。

那么我应该使用什么呢?他们所说的 Flash 指的是 Flex?或者像 Flash 这样的程序就可以了?我应该使用 Flash Pro 吗?或者 Flash 生成器?学习 ActionScript 还是 XXL?

看起来网上有很多关于这方面的内容,但是我读得越多,我就越困惑。

提前致谢。

Here at SO, I asked what language I should use to create a web app that would capture video from the user webcam and send it to the server when he clicked 'submit' and the answers were mostly Flash.

But searching the web I got confused with this Flash/Flex thing as they say Flash is to make animations and Flex is to really create web apps.

So what should I use? By Flash they meant Flex? Or for a program like that Flash is fine? Should I use Flash Pro. or Flash Builder? Learn ActionScript or XMXL?

It may look there are tons of contents about this on the web, but the more I read, more I got confused.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

思念绕指尖 2024-10-02 06:57:32

我建议使用 Flex 编写此应用程序。主要是因为我认为 Flex 工具链比 Flash Professional 好很多。虽然您的问题中没有任何内容似乎真正需要 Flex 框架,但您可能会从使用它中受益。不仅因为其卓越的开发环境,还因为 Flex 框架中的一些功能使数据处理变得更加容易。

不管怎样,这里的术语似乎有很多混乱,所以我会尝试澄清一些事情:

免责声明:这绝不是所有 flash 的完整列表。虽然我已尽力求实,但为了简洁起见,我很可能遗漏了一些重要的细节(嘿,至少我尝试过),而在其他情况下,我可能只是错了。关于考虑来源的常见警告适用。

  • Flash 播放器,提供渲染矢量和光栅图形以及在虚拟机中运行用户代码的功能。播放器是flash平台的核心,使内容能够在多个平台上运行(通常不需要任何特定于平台的修改)。播放器中有相当多的API实际上是本机代码,但可以从ActionScript调用。

  • ActionScript 是 Fl​​ash 平台选择的高级语言。还有其他工具,最著名的是 Haxe,但 Adob​​e 工具不支持它们。该语言共有三个版本:ActionScript 1、2 和 3。前两个版本在 Flash 9 之前使用,Flash 9 引入了完全重写的虚拟机 (AVM2),因此也引入了 AS3。以前的语言在称为 AVM1 的旧虚拟机中运行。为 AVM1 制作的较旧内容可以在较新的支持 AVM2 的播放器中运行。不过,为了保持向后兼容性,它们仍将以 AVM1 模式运行。 Flash 实际上很好地处理了向后兼容性。

  • Flash Professional,也称为Flash IDE,是制作Flash内容的工具的名称。它最初只是创建动画的一种方式,但随着 Flash 影片格式获得了脚本功能,该工具也获得了脚本功能。然而,脚本长期以来一直是这个工具的私生子。虽然过去的几个版本在这方面有所改进,但与其他更以开发人员为中心的环境相比仍然相形见绌。该工具仅编译纯 ActionScript 项目,不用于开发 Flex 应用程序,并且通常被认为对设计人员比对开发人员更友好。

  • Flex 是 Adob​​e 企业应用程序框架的名称。 Flex 有一些关键技术,它不仅仅是一个核心功能库。下面我将尝试简明扼要地解释一下该框架的关键技术。 Flex SDK实际上是开源的,可以免费使用来开发应用程序。然而,虽然它包含构建 Flex 应用程序所需的任何内容,但它实际上并不包含 IDE。

    • MXML 是一种声明性语言。它通常用于声明性地定义视图,但可以用于很多事情。例如,swiz 框架利用 MXML 使用 国际奥委会。当然还有很多东西需要 swiz,但这超出了本答案的范围。

    • MXMLC 和 MXMLC COMPC 是两个用于编译 Flex 项目的编译器。前者用于编译swf应用程序,后者用于编译swc库。

    • 核心库除其他外,还包括两个标准组件集:MX 和 Spark;前者通常称为 Halo。 MX 是一个较旧的组件集,虽然仍然受支持,但已被视为已弃用,一旦 Spark 达到与 MX 相同的功能,很可能会被淘汰。然而,这两个组件集在很大程度上彼此兼容,并且可以在同一应用程序中很好地共存。提供的其他值得注意的功能是非常全面的数据访问和管理功能,既适用于基于文本的数据,例如 XML 或 JSON,也适用于二进制数据 (AMF)。

      该库通常简称为 FlexFlex 框架

  • Flash Builder 是 Adob​​e 用于开发 Flex 应用程序的 IDE。虽然当然可以使用它来开发纯 AS3 应用程序,但它最常用于开发 Flex 应用程序。它是一个不错的 IDE,具有现代开发环境中可用的大部分功能,但也有一些流行的替代品,例如 PowerFlasher 的 FDT。 Flex SDK 是免费且开源的,而 Flash Builder 既是专有软件又是商业软件。

I would suggest writing this application using Flex. Mainly because the Flex toolchain is a lot better than Flash Professional in my opinion. While there's nothing in your question that really seem to require the Flex framework, you would probably benefit from using it. Not only for its superior development environment but also because there's a few things in the Flex framework that just makes working with data a whole lot easier.

Regardless, there seems to be a lot of confusion regarding terminology here, so I'll try to clear a few things up:

DISCLAIMER: This is by no means a comprehensive list of everything flash. While I've tried my best to be factual I quite possibly have left out some important details for the sake of brevity (hey, at least I tried) and in other cases I may simply be wrong. The usual caveats about considering the source apply.

  • Flash player, provides the ability to render vector and raster graphics as well as run user code in a virtual machine. The player is the core of the flash platform, enabling content to run on multiple platforms (generally without any platform specific modifications.) There are quite a few APIs in the player that are actually native code but can be called from ActionScript.

  • ActionScript is the high level language of choice for the Flash Platform. There are others, most notably Haxe, but they aren't supported by Adobe's tools. There are three versions of the language: ActionScript 1, 2 and 3. The first two were used prior to Flash 9, which introduced a completely rewritten virtual machine (AVM2) and thus also introduced AS3. The former languages run in an older virtual machine called AVM1. Older content produced for AVM1 can run in newer AVM2 enabled players. They will still run in AVM1 mode however, in order to retain backwards compatibility. Flash actually handles backwards compatibility remarkably well.

  • Flash Professional, also known as the Flash IDE, is the name of a tool to produce flash content. It started out as a way to just create animations, but as the flash movie format got scripting capabilities, so did the tool. However, the scripting have long been a bastard child of this tool. While the past couple of versions have seen improvements in this area it still pales in comparison with other more developer centric environments. This tool only compiles pure ActionScript projects, is not used to develop Flex applications and is generally considered to be more designer friendly than developer friendly.

  • Flex is the name of Adobe's enterprise application framework. There are a few key technologies to Flex and it's more than just a core library of functionality. I'll try to concisely explain the key technologies of the framework below. The Flex SDK is actually open source and can be used freely to develop applications. However, while it contains anything needed to build Flex applications, it doesn't actually include an IDE.

    • MXML is a declarative language. It is generally used to declaratively define views, but can be used for many things. For instance, the swiz framework leverage MXML to declaratively define dependencies using IoC. There's of course a lot more to swiz, but that's beyond the scope of this answer.

    • MXMLC & COMPC are two compilers used to compile flex projects. The former is used to compile swf applications, the latter is used to compile swc libraries.

    • The core library among other things includes two standard component sets: MX and Spark; the former often referred to as Halo. MX is an older component set and while still supported, is considered deprecated and will likely be phased out once Spark reaches feature parity with MX. The two component sets are largely compatible with each other however and can co-exist quite well in the same application. Other notable functionality provided is quite comprehensive data access and management functionality, both for text based data such as XML or JSON as well as binary data (AMF.)

      The library is commonly referred to as just Flex or the Flex framework.

  • Flash Builder is Adobe's IDE for the development of Flex applications. While it is certainly possible to use it to develop pure AS3 applications it's most commonly used to develop Flex applications. It's a decent IDE with most of the features available in a modern development environment, but there are popular alternatives such as PowerFlasher's FDT. While the Flex SDK is free and open source, Flash Builder is both proprietary and commercial software.

活雷疯 2024-10-02 06:57:32

这并不完全正确。您可以使用 Flash Professional 在本机 Actionscript 3 中开发和编写代码,同时还能够在设计器级别进行开发,创建图像/动画等。

要回答您的问题,如果您希望使用 MXML 进行编码,那么您需要使用 Flash Builder。如果你想用原生 AS3 编写,你可以使用两者中的任何一个。两者都可以工作,但是根据个人经验,使用本机 AS3 可以更自由。此外,对于您希望制作的应用程序类型,性能可能是最重要的,因此建议使用 AS3 进行完全控制。

编辑:另外,如果您熟悉 C++ 或 Java,或任何其他面向对象的语言,我相信在 ActionScript3 中编程会感觉非常像家。

This is not entirely true. You may use Flash Professional to develop and write code in native Actionscript 3 while also being able to develop at the Designer level creating images/animations and so on.

To answer your question, if you wish to code in MXML, then you need to use Flash Builder. If you want to write in native AS3 you may use either of the two. Both will work, however, from personal experience you have more freedom using native AS3. Also, for the type of application that you wish to make, performance would probably be of great priority, thus having full control using AS3 is recommended.

EDIT: Also, if you are familiar with C++ or Java, or any other object oriented, I believe programming in ActionScript3 will feel very much like home.

柠檬 2024-10-02 06:57:32

IMO 说明了一切:Flash Professional 适合设计师,Flash Builder (Flex) 适合程序员。

使用 Flash Builder,您必须学习 MXML 和 ActionScript。 MXML 用于 GUI 的声明性布局,而 ActionScript 是编程语言。

IMO that says it all: Flash Professional is for Designers and Flash Builder (Flex) is for programmers.

With Flash Builder you have to learn both, MXML and ActionScript. MXML is for the declarative layout of the GUI and ActionScript is the programming language.

刘备忘录 2024-10-02 06:57:32

“Flash”是整个平台的名称(类似于.NET 或Java)。 “Flex”是构建在 Flash 之上的框架的名称。因此,通过使用 Flex,从技术上讲您也在使用 Flash。

开发的两个主要选项是 Flash Professional IDE 和 Flex(通过其编译器手动或通过 Flash Builder IDE)。区别在于创建用户界面的方式:在 Flash Professional 中,您可以直观地设计元素,而在 Flex 中,您可以使用 MXML 对其进行编码(尽管 Flash Builder 也附带了更基本的可视化设计器)。这两种工具都使用 ActionScript 来实现应用程序逻辑,尽管 Flash Professional 更多地将其用作脚本语言而不是传统的编程语言。

在我看来,由于您将进行更多的编程而不是设计,因此 Flex 更适合您的应用程序。首先,请查看一周学习 Flex

"Flash" is the name of the entire platform (think something like .NET or Java). "Flex" is the name of a framework built on top of Flash. So by using Flex, you're technically using Flash as well.

Your two main options for development are the Flash Professional IDE and Flex (either manually through their compiler or through the Flash Builder IDE). The difference is how you create the user interface: in Flash Professional, you design elements visually, whereas with Flex you code them using MXML (though Flash Builder comes with a more basic visual designer as well). Both tools use ActionScript for application logic, though Flash Professional uses it more as a scripting language than a traditional programming language.

Since you're going to be doing more programming than designing, Flex fits your application more, IMO. To get started, take a look at Learn Flex in a Week.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文