ria开发_使用Adobe Flash Platform构建RIA

ria开发

The Flash that you thought you knew has changed. It’s grown up.

您以为自己知道的Flash已更改。 长大了

In this article, I’ll explain some of the technologies that make up the Flash Platform, how they fit together, and how you can use them to build RIAs. Pay attention, because there will be a quiz at the end! The first 200 people to submit their answers will receive a copy of The Adobe Flash Platform ActionScript Reference for Rich Internet Application Development (that’s the print version) delivered to their door for free, thanks to Adobe.

在本文中,我将解释组成Flash平台的一些技术,它们如何组合在一起以及如何使用它们来构建RIA。 注意,因为最后会有测验! 由于Adobe的帮助,前200名提交答案的人员将免费免费获得《 用于富Internet应用程序开发的Adobe Flash Platform ActionScript参考 (印刷版)》的副本。

The transformation that Flash has undergone has been occurring for some time, and many developers are aware of it. Every day I hear of a developer building a powerful new application for the Flash runtime that performs tasks like connecting to enterprise solutions powered by SAP or Oracle – and all with the full blessing of those vendors. Flash has evolved beyond the Skip Intro button for which we used to hate it, and has become ubiquitous – helping the browser perform way beyond the text rendering that it was first built for.

Flash经历的转换已经发生了一段时间,许多开发人员都意识到了这一点。 我每天都听到开发人员为Flash运行时构建功能强大的新应用程序的情况,该应用程序执行诸如连接到由SAP或Oracle支持的企业解决方案之类的任务,并得到所有这些供应商的全力支持。 Flash的发展已经超越了我们曾经讨厌的“ 跳过介绍”按钮,并且无处不在-帮助浏览器执行超出其最初为之目的的文本渲染的方式。

It was Macromedia (back in 2002, in their pre-Adobe acquisition days) who coined the term Rich Internet Application (RIA). The introduction of this term coincided with the release of a set of new custom components for Flash MX, thus supplying Flash developers with a set of UI components and providing them with a means to build their own. Flash already contained the ability to make a call to a remote server without forcing a page refresh, but with the release of ColdFusion MX that same year came Flash Remoting, which allowed applications built with Flash to pass serialized data to the server via AMF (Action Message Format).

正是Macromedia(早在2002年,在Adobe收购之前)就创造了Rich Internet Application(RIA)一词。 该术语的引入与Flash MX的一组新自定义组件的发布相吻合,从而为Flash开发人员提供了一组UI组件,并为他们提供了构建自己的工具。 Flash已经包含了在不强制刷新页面的情况下调用远程服务器的功能,但是随着同一年发布的ColdFusion MX,Flash Remoting得以实现,该功能允许使用Flash内置的应用程序通过AMF将序列化的数据传递给服务器。邮件格式)。

These two products – custom components for Flash and Flash Remoting – and the synergy that could be experienced by combining them has since been expanded many times in the six-and-a-half years since they were first released. Recently, these technologies have been termed the Adobe Flash Platform. This umbrella term describes a collection of Adobe products, including multiple runtimes, development tools, and servers.

自从首次发布以来,这两个产品(用于Flash和Flash Remoting的自定义组件)以及将它们组合在一起所能体验到的协同作用已经在六年半的时间内得到了扩展。 最近,这些技术被称为Adobe Flash Platform。 这个总称描述了Adobe产品的集合,包括多个运行时,开发工具和服务器。

Adobe Flash Platform
Flash运行时 (The Flash Runtime)

The Flash Player is the cornerstone of the Adobe Flash Platform; it offers the developer a single, cross-platform runtime with all the capabilities of the Internet today. It supports more than just vector animation – it’s also a multimedia player. In fact, the majority of all online video today is delivered via Flash, with the capacity to offer true High Definition video via the same H.264 codec used in Blu-ray.

Flash Player是Adobe Flash Platform的基石。 它为开发人员提供了一个单一的,跨平台的运行时,并具有当今Internet的所有功能。 它不仅支持矢量动画,而且还是多媒体播放器。 实际上,当今大多数在线视频都是通过Flash交付的,并且能够通过蓝光中使用的相同H.264编解码器提供真正的高清视频。

The runtime can communicate with application servers via web services, HTTP, and remote object calls without the need to perform a browser refresh. Additionally, the player has had VoIP capacity for many generations, and it’s possible to build and deploy collaborative applications with Flash that can include text chat, whiteboarding, and the sharing of desktops across operating systems.

运行时可以通过Web服务,HTTP和远程对象调用与应用程序服务器进行通信,而无需执行浏览器刷新。 此外,该播放器已经具有VoIP的历史,并且可以使用Flash构建和部署协作应用程序,其中包括文本聊天,白板和跨操作系统共享桌面。

A lot of effort has been invested into making sure that Flash-based RIAs work successfully for the wide variety of devices and operating systems. For example, Adobe and Google together have recently announced the successful implementation and development of a virtual user that Google uses to retrieve text from Flash content; this enables the content to appear in Google’s search results. Adobe is constantly improving the performance of accessibility within the Flash Player and its compatibility with screen readers for the visually impaired. Deep linking and browser history compatibility are features present in the open source Flex framework for Flash applications; these aim to eliminate the kind of navigation problems encountered with dynamic content in Ajax-based RIAs.

为了确保基于Flash的RIA在各种设备和操作系统上都能成功工作,已经投入了大量的精力。 例如,Adobe和Google最近共同宣布成功实施和开发了一个虚拟用户,Google用来从Flash内容中检索文本 ; 这样可以使内容显示在Google的搜索结果中。 Adobe一直在不断改进Flash Player中可访问性的性能以及与视障人士的屏幕阅读器的兼容性。 深度链接和浏览器历史记录兼容性是Flash应用程序的开源Flex框架中提供的功能。 这些旨在消除基于Ajax的RIA中动态内容遇到的那种导航问题。

Adobe has successfully matured the Flash runtime in the short time that they’ve had it as a product. With each iteration, particularly Players 9 and 10, significant improvements in performance have occurred; Player 10 now offers hardware acceleration for advanced graphical effects. Flash Player 10 also introduces new functionality, including 3D effects, custom filters and effects, advanced text support, and dynamic streaming for improved video performance.

Adobe将Flash运行时作为产品在很短的时间内就成功地成熟了。 在每次迭代中,尤其是播放器9和10,性能都得到了显着提高。 现在,播放器10提供了用于高级图形效果的硬件加速。 Flash Player 10还引入了新功能,包括3D效果,自定义滤镜和效果,高级文本支持以及动态流,以提高视频性能。

Flash Player 10 is the latest version of the browser plugin; it’s available for Windows, OS X, Linux, and Solaris. Flash Lite 3 is a scaled-down version of the runtime for use on mobile and handheld devices.

Flash Player 10是浏览器插件的最新版本。 它可用于Windows,OS X,Linux和Solaris。 Flash Lite 3是运行时的缩减版本,可在移动和手持设备上使用。

抬头-在空中! (Look – up in the AIR!)

And then there’s Adobe AIR – a new category of runtime that combines Flash Player 10 and WebKit (the web page rendering engine behind Safari and Chrome) into a stand-alone runtime capable of running offline applications. The runtime is available for Windows, OS X, and Linux.

然后是Adobe AIR –一种新的运行时类别,它将Flash Player 10和WebKit(Safari和Chrome之后的网页渲染引擎)组合为能够运行脱机应用程序的独立运行时。 该运行时适用于Windows,OS X和Linux。

Adobe AIR was introduced by Adobe mid-2008 after a lengthy public beta cycle. Developers can use their web application building skills to create apps for the desktop and deploy them via AIR. The AIR runtime incorporates functionality missing from the browser, such as access to the file system to create, delete, and maintain files and folders.

经过漫长的公开测试版发布,Adobe AIR由Adobe在2008年中期推出。 开发人员可以使用其Web应用程序构建技能来为桌面创建应用程序,并通过AIR进行部署。 AIR运行时包含浏览器缺少的功能,例如访问文件系统以创建,删除和维护文件和文件夹。

Adobe AIR supports drag and drop interaction with the operating system, network connection detection, and SQLite for local storage of data; the latter can be easily searched with standard SQL queries. If Acrobat Reader is installed on the client machine, AIR will utilize that software package’s capabilities for rendering PDFs. A version of the AIR runtime for mobile and handheld devices has been hinted at by Adobe, although there’s yet to be a release date announced.

Adobe AIR支持与操作系统的拖放交互,网络连接检测以及用于数据本地存储SQLite。 后者可以使用标准SQL查询轻松搜索。 如果在客户端计算机上安装了Acrobat Reader,则AIR将利用该软件包的功能来呈现PDF。 尽管尚未宣布发布日期,但Adobe暗示了适用于移动和手持设备的AIR运行时版本。

Of course, all of these tools are free to download, and Flash Player is bundled as part of a Windows and OS X distribution.

当然, 所有这些工具都可以免费下载 ,并且Flash Player是Windows和OS X发行版的一部分。

RIA开发工具 (Development Tools for RIAs)

Flash CS4 Professional is the latest iteration of the Flash authoring environment. Originally an animation tool, the Flash IDE can also be used to program Flash movies using ActionScript, an ECMAScript-based object oriented programming language. It has the necessary tools for ActionScript authoring, including an ActionScript editor and an advanced debugger. Flash CS4 is both a tool for designers and developers, and while it’s possible to create whole applications with Flash, Adobe has created a framework for Flash applications called Flex (check out some of the Flex tutorials on sitepoint.com).

Flash CS4 Professional是Flash创作环境的最新版本。 Flash IDE最初是一种动画工具,也可以用于使用ActionScript (一种基于ECMAScript的面向对象的编程语言)对Flash电影进行编程。 它具有用于ActionScript创作的必要工具,包括ActionScript编辑器和高级调试器。 Flash CS4既是设计人员又是开发人员的工具,虽然可以使用Flash创建整个应用程序,但Adobe已为Flash应用程序创建了一个名为Flex的框架(请参阅sitepoint.com上的一些Flex教程 )。

Originally released as an enterprise platform (with an enterprise price to match), Flex is now a free, open source framework for building applications to run within the Flash runtime. Flex applications are authored in a combination of two languages:

Flex最初作为企业平台发布(与企业价格相匹配),现在是一个免费的开源框架,用于构建要在Flash运行时中运行的应用程序。 Flex应用程序是用两种语言组合编写的:

MXML, a declarative XML-based language in which tags represent classes within the framework; it’s principally used for UI layouts and behaviors, and ActionScript 3, an object-oriented language typically used for client logic. Developers with a Java background will find ActionScript intuitive and may be tempted to author with it entirely.

MXML,一种基于声明式XML的语言,其中标签表示框架中的类; 它主要用于UI布局和行为,以及ActionScript 3(一种通常用于客户端逻辑的面向对象的语言)。 具有Java背景的开发人员会发现ActionScript是直观的,并且可能会尝试完全编写它。

The Flex framework contains over 100 extensible UI components. It can be downloaded for free as part of the free Flex 3 SDK, which also contains a stand-alone compiler.

Flex框架包含100多个可扩展的UI组件。 可以作为免费的Flex 3 SDK的一部分免费下载该软件 ,该软件还包含一个独立的编译器。

Flex Builder

A number of open source frameworks have emerged to assist Flex application development. The most popular of these is Cairngorm, an open source project managed by Adobe. Others worth looking at include Mate, a tag-based, event-driven framework; and PureMVC, a lightweight ActionScript 3 framework for creating applications based on the model-view-controller concept.

已经出现了许多开源框架来帮助Flex应用程序开发。 其中最受欢迎的是由Adobe管理的开源项目Cairngorm 。 其他值得关注的东西包括Mate ,一个基于标签的事件驱动框架。 和PureMVC ,这是一个轻量级的ActionScript 3框架,用于基于模型视图控制器概念创建应用程序。

While the Flex framework and Flex SDK are free, the Flex development tool, Flex Builder, is a commercial product (although it’s free for educational use). Flex Builder 3 is an Eclipse-based IDE, and is available as either a stand-alone application or as a plugin for Eclipse. There are versions of Flex Builder for both Windows and OS X, and a beta version is available for Linux.

尽管Flex框架和Flex SDK是免费的,但Flex开发工具Flex Builder是一种商业产品( 尽管它是免费提供给教育使用的 )。 Flex Builder 3是基于Eclipse的IDE,可以作为独立应用程序使用,也可以作为Eclipse的插件使用。 有适用于Windows和OS X的Flex Builder版本,适用于Linux的beta版本。

Flex Builder supports the editing of MXML, ActionScript, and CSS files, including code completion, tag insight, and syntax coloring. It also includes a visual layout tool, to facilitate the positioning of components in a WYSIWYG environment.

Flex Builder支持MXML,ActionScript和CSS文件的编辑,包括代码完成,标记洞察和语法着色。 它还包括可视化布局工具,以方便在所见即所得环境中定位组件。

Flex Builder is available in two editions, Standard and Professional. The Professional edition includes a charting library, performance profiling tools, and support for automated functional testing. Projects built with Flex Builder can be deployed either in the browser via the Flash Player, or as stand-alone applications via Adobe AIR.

Flex Builder有两个版本,Standard和Professional 。 专业版包括图表库,性能分析工具以及对自动功能测试的支持。 使用Flex Builder构建的项目可以通过Flash Player部署在浏览器中,也可以通过Adobe AIR部署为独立的应用程序。

伺服器 (Servers)

A Flash application is able to retrieve data from a remote server via HTTP calls; this can be done with either of the Adobe tools mentioned above. With Flash MX, Macromedia introduced a once proprietary binary data transfer format for communication with an application server called Action Message Format (AMF); this has recently been made open source. AMF borrowed the means to describe the structure of data from the SOAP protocol; automatic translation of this format was provided with the Flash Remoting classes and service that was included in ColdFusion. AMF has also been reverse-engineered and is available for a number of application servers; AMFPHP, WebORB, and RubyAMF are examples of that reverse-engineering.

Flash应用程序能够通过HTTP调用从远程服务器检索数据。 可以使用上述任一Adobe工具来完成。 通过Flash MX,Macromedia引入了一种曾经专有的二进制数据传输格式,用于与应用程序服务器进行通信,称为动作消息格式(AMF)。 最近已将其开源。 AMF借用了从SOAP协议描述数据结构的方法; ColdFusion中包含的Flash Remoting类和服务提供了这种格式的自动翻译。 AMF还经过了逆向工程,可用于许多应用程序服务器。 AMFPHPWebORBRubyAMF就是这种反向工程的例子。

Adobe now also have an open source, Java remoting and web messaging technology that Flex and Adobe AIR applications can use to connect to Java server logic called BlazeDS. This uses the same AMF protocol mentioned above. BlazeDS integration has recently been added to the Spring framework to make Spring-powered RIAs with Flex front ends possible.

Adobe现在还具有开放源代码,Java远程处理和Web消息传递技术,Flex和Adobe AIR应用程序可以使用它们来连接到称为BlazeDS的 Java服务器逻辑。 这使用了与上述相同的AMF协议。 BlazeDS集成最近已添加到Spring框架中,以使具有Flex前端的Spring供电的RIA成为可能。

Adobe have additional server products that also support AMF; ColdFusion has been previously mentioned, while another is LiveCycle Data Services, which also includes Flex Messaging for real-time data push and publish/subscribe messaging.

Adobe有其他也支持AMF的服务器产品。 前面已经提到过ColdFusion,而另一个是LiveCycle Data Services ,它还包括用于实时数据推送和发布/订阅消息传递的 Flex消息传递

The Adobe Flash Media Server group of products are also included within the Flash Platform. The Flash Media Interactive Server can be used to build Flash-based collaborative applications, which can include features like streaming Flash video, VoIP, chat, webcam chat, and online gaming. The Flash Streaming Media Server is capable of streaming both live and on-demand Flash video.

Flash Platform中还包括Adobe Flash Media Server产品组。 Flash Media Interactive Server可用于构建基于Flash的协作应用程序,其中可包括流Flash视频,VoIP,聊天,网络摄像头聊天和在线游戏等功能。 Flash流媒体服务器能够流传输实时和点播Flash视频。

不久的将来 (The Near Future)

Adobe’s long-awaited technology preview, Thermo, was released to attendees at Adobe MAX in November 2008 under the new name, Flash Catalyst. This is an interaction design tool for RIAs that will be released as a public beta in the first half of this year. Flash Catalyst will import design comps created in Illustrator, Photoshop, or Fireworks, making use of a new interchange format introduced with all the CS4 design tools called FXG.

Adobe期待已久的技术预览版Thermo已于2008年11月以新名称Flash Catalyst在Adobe MAX中发布。 这是用于RIA的交互设计工具,将于今年上半年作为公共Beta发布。 Flash Catalyst将导入在Illustrator,Photoshop或Fireworks中创建的设计图形,并利用所有CS4设计工具(称为FXG)引入的新交换格式。

Flash Catalyst

Flash Catalyst can convert the design elements in the artwork into design and interactive elements for an RIA project with workflow; this gives it the ability for an interactive element like a scrollbar to go back to Illustrator for some design tweaks to occur. Flash Catalyst converts elements like buttons or scrollbars into Flex custom components. Interactions and timeline events are added visually to projects in Flash Catalyst, but in reality the application is creating the whole project as MXML. Under the hood, Flash Catalyst is another Eclipse-based application just like Flex Builder.

Flash Catalyst可以将图稿中的设计元素转换为带有工作流程的RIA项目的设计和交互元素; 这使它能够使诸如滚动条的交互式元素返回到Illustrator,以进行一些设计调整。 Flash Catalyst将按钮或滚动条之类的元素转换为Flex自定义组件。 交互和时间轴事件以可视方式添加到Flash Catalyst中的项目,但实际上,应用程序将整个项目创建为MXML。 在底层,Flash Catalyst是另一个基于Eclipse的应用程序,就像Flex Builder一样。

Flash Catalyst is already listed as a part of the Flash Platform; the MXML that it produces is incompatible with Flex 3, but will be compatible with the next version, Flex 4 (code-named Gumbo), which is in public beta. Flex 4 has graphical enhancements including an implementation of FXG, and customizable components.

Flash Catalyst已被列为Flash平台的一部分; 它产生的MXML与Flex 3不兼容,但将与公开测试版中的下一个版本Flex 4(代号为Gumbo)兼容。 Flex 4具有图形增强功能,包括FXG的实现和可自定义的组件。

Flash Catalyst in Detail

Another new project related to Flash that was released at Adobe’s annual developer conference MAX late last year was Alchemy; this is a research project that allows users to compile C and C++ code to run on Flash Player 10. There were quite a few good examples of how additional functionality could be added to Flash-based applications using existing libraries, including encryption, support for RAW digital photographs, and PDF creation.

去年年底在Adobe年度开发者大会MAX上发布的另一个与Flash相关的新项目是Alchemy ; 这是一个研究项目,允许用户编译C和C ++代码以在Flash Player 10上运行。有很多很好的示例说明了如何使用现有库将附加功能添加到基于Flash的应用程序中,包括加密,对RAW的支持。数码照片和PDF创建。

结论 (Conclusion)

Adobe’s Flash Platform offers the RIA developer a powerful, ubiquitous runtime in the Flash Player; within the browser it’s a case of code once, deploy everywhere, as there’s a version of the runtime for all major operating systems. The Flex open source framework gives developers the ability to build rich interactive applications to run in both the browser and on the desktop via Adobe AIR; it provides the ability to connect to data through a number of different connection types.

Adobe的Flash平台为RIA开发人员在Flash Player中提供了功能强大且无处不在的运行时; 在浏览器中,只需要编写一次代码,就可以部署到任何地方,因为所有主要操作系统都有一个运行时版本。 Flex开放源代码框架使开发人员能够构建丰富的交互式应用程序,以通过Adobe AIR在浏览器和桌面上运行; 它提供了通过多种不同的连接类型连接到数据的能力。

If you’re building a Rich Internet Application, and haven’t checked out the technologies that comprise the Adobe Flash Platform, then now is a good time to start. We’ll be publishing more articles on these topics over the coming months on sitepoint.com, so stay tuned!

如果您正在构建Rich Internet Application,但尚未检查构成Adobe Flash Platform的技术,那么现在是开始的好时机。 在接下来的几个月中,我们将在sitepoint.com上发布有关这些主题的更多文章,敬请期待!

In the mean time, test yourself on the contents of this article by taking the quiz. The first 200 people to submit their answers will receive a print copy of The Adobe Flash Platform ActionScript Reference for Rich Internet Application Development, delivered to their door for free, courtesy of Adobe. Take the quiz now!

同时,通过测验对本文的内容进行测试 前200名提交答案的人员将免费获得Adobe提供的《用于富Internet应用程序开发的Adobe Flash Platform ActionScript参考》的印刷版。 立即参加测验!

翻译自: https://www.sitepoint.com/rias-adobe-flash-platform-3/

ria开发

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值