返回正常中文阅读

想对这篇译文“指手画脚”吗?

您的参与将有助于译者提高译文的质量;同时,大家一起对问题的讨论也是最佳的学习方式。还等什么?请现在就注册登录译言,开始眉批!
大错 小错 不顺 建议

Flex 2: Enabling the Next Generation of Rich Internet Applicatio

Important note:Effective with the release of Adobe LiveCycle ES, the Adobe Flex DataServices 2 server product has been rebranded as a Solution Component ofLiveCycle ES. This article was written based on Flex Data Services butwill likely work as is with LiveCycle Data Services ES. Any articlesreferring to or using ColdFusion and Flex Data Services are notcompatible with LiveCycle Data Services ES. To learn about the newcapabilities of LiveCycle Data Services ES, see the tutorials in the LiveCycle Developer Center and read about Adobe LiveCycle Data Services ES.

In October 2005, Macromedia (now Adobe) provided the developercommunity with the first look at Adobe® Flex™ 2—a new lineup ofdeveloper tools, libraries and runtime services that will enabledevelopers everywhere to build and deploy rich Internet applicationsthat take advantage of the Flash® Player runtime. Since then, tens ofthousands of developers have started to build applications with Flexand provide their feedback to us. Additionally, Macromedia became partof Adobe, opening up a whole new world of opportunities for improvingthe future of Internet applications.

With theannouncement of the Flex 2, we're proud to show the results of thedevelopment cycle between October 2005 and June 2006. By combining anintuitive programming model, a powerful Eclipse-based IDE, and a richset of J2EE-based runtime services, we believe that the Flex 2 productline provides developers the most comprehensive solution for deliveringcross-platform rich Internet applications available today. The recentlyannounced pricing structure allows developers to build and deploy manykinds of applications for free without needing to install anything ontheir servers. And recent releases of technologies like the Flex-Ajax Bridge and Ajax Client for Flex Data Servicesunder open source licenses allow developers to incrementally add Flexcomponents to existing websites and applications, whether they arebased on static HTML or Ajax technologies.

Pushing the envelope on RIA development

Inearly 2001, Macromedia coined the phrase "rich Internet application"after seeing what developers and designers were building in MacromediaFlash. It was clear that these applications extended the designlimitations and interaction constraints of traditional HTMLapplications. They didn't require a full page refresh when usersinteracted with them. They used network bandwidth efficiently,transmitting only the portion of the data that changed and minimizingthe transfer of layout information. They contained a rich array ofinteractions that allowed end users to directly manipulate data. Theyseamlessly layered audio and video into the application's userinterface. They clearly maintained their context as the user navigatedthrough the application. And, of course, they supported high-fidelityprinting.

The effect of rich Internet applications hasbeen incredible, both in breadth and depth. We're seeing everyone fromInternet hobbyists to large enterprises building RIAs—and seeing theirbusiness improve dramatically as a result. Large financial servicesinstitutions are using RIAs to solidify their brand with customers andspeed up internal business decision-making through better interactionwith mission-critical data. Online retailers have reduced shopping cartabandonment by 50% during the checkout process. Individual developershave integrated slick online mapping services with webcams posted onNew York City's traffic lights to give commuters the most up-to-dateand useful traffic information.

As customers began tobroaden their use of rich Internet applications, developers quicklyrecognized some special needs. Some RIAs need to consume real-time datafeeds. Others need to run in occasionally connected environments,intelligently synchronizing data when a connection is established. Someneed to consume proprietary binary protocols. And still others requirethat multiple clients share a single instance of data.

Basedon our work with these early adopters, we set out to deliver an RIAplatform that addressed these needs and could be extended easily tomeet the specific needs of a wide range of applications. We wanted togive developers a client runtime, development environment, classlibraries, and data services to help them:

  • Be extremely productive in RIA application development
  • Create expressive applications with effective interface patterns
  • Deploy applications through a well-distributed, high-performance, cross-platform, cross-browser runtime environment
  • Use tools and technologies that scale with the size of the project and complexity of the task

Weare thrilled to introduce the Flex 2 product line as the best way tobuild a wide range of immersive applications, from simple restaurantmenus to complex workflow systems and synchronized trader desktops.

Ifyou're familiar with Flex 1.0 or 1.5, it's very important to recognizethat Flex 2 is far more than just a new release. From a technicalstandpoint, Flex 2 introduces new capabilities that enable developersto build an entirely new class of rich Internet applications. At thesame time, Adobe Flex Builder™ 2 has been built from the ground up onthe Eclipse open-source IDE framework and now includes the Flexframework and the compiler. In addition, the ColdFusion® and Flex teamshave worked closely together to provide ColdFusion-specific integrationpoints between Flex Builder, Flex Data Services, and the ColdFusionServer.

In addition to the technical and product advanceswe've made significant changes to the way Flex 2 is packaged, priced,and deployed. The Flex framework is available free of charge throughthe Adobe Flex 2 Software Development Kit (SDK). The Flex 2 SDKincludes the command-line compiler and documentation required todevelop, compile, and deploy Flex applications that connect to any XMLand SOAP web service. It is available as a separate download and allowsdevelopers to build and deploy any application (including those forcommercial use) free of charge. We have also made available alimited-connection version of Flex Data Services 2 free of charge foruse on a single, non-clustered server. (Of course, Flex Data Services 2will be also be licensed commercially on a per CPU, per project, andenterprise license basis.) Together, these free offerings bring theindustry's most powerful cross-platform RIA technology within reach ofevery developer and every project. That's huge.

A new foundation for rich Internet applications: Flash Player 9

Flash®Player, the backbone of the Flash Platform, is also evolving to providethe foundation for the Flex 2 product line and next-generation RIAs.Over the years the player, which began primarily as a client forplaying animation, incrementally extended its scripting language(ActionScript) by adding support for portions of the ECMAScriptstandard (the same standard that drives the development of JavaScript).By the release of Flash Player 7, ActionScript implemented the vastmajority of the ECMA standard. Flash Player 9 (until recently referredto as Flash Player 8.5) ships at the same time as the Flex 2 productline. Read more about it in Introducing Flash Player 9.With it we introduced ActionScript 3.0, a powerful object-orientedprogramming language designed for productivity and performance, andbased on the next generation of the ECMAScript standard. Read moreabout it in ActionScript 3.0 overview .

Flash Player 8 (releasedin September of 2005) made great advances in the rendering engine,introducing a set of extended expressiveness capabilities (filters,advanced gradient controls, rendering performance, and so forth), andvideo support enhancements (higher quality codec, alpha channelsupport, and so forth) that are unparalleled on the web today. FlashPlayer 8 also greatly improved the APIs that enable a developer tocommunicate between applications running in the player, the browser'sHTML document object model, and associated JavaScript functions, makingit easier to add Flash components to existing web pages andapplications.

Flash Player 9 builds on the advances inFlash Player 8 by focusing on improving script execution in the virtualmachine. In fact, it includes a brand new, highly-optimizedActionScript Virtual Machine (AVM) known as AVM2 and a new version ofthe ActionScript programming language. AVM2 is built from the ground upto work to support the needs of RIA developers. The new virtual machineis significantly faster, supports full runtime error reporting andindustry-standard debugging. It includes binary socket support,allowing developers to extend the player to work with any binaryprotocol. Flash player 9 will also contain AVM1, which executesActionScript 1.0 and 2.0 code, for backward-compatibility with existingand legacy content.

With ActionScript 3.0, we haveachieved more than simple compliance with the ECMAScript standard;Adobe now chairs the ECMAScript committee and helps drive itsevolution. ActionScript 3.0 features a compilation mode for strongercompile-time type checking that provides the benefits of languages suchas Java or C#. It supports new features to streamline datamanipulation, including the E4X (ECMAScript for XML) standard, whichextends the language and adds XML as a native data type allowingdevelopers to more naturally interact with and manipulate XML. It addsregular expressions support for better text parsing and processing. Itsheds some of the ad hoc event handling schemes in the old virtualmachine in favor of a unified model based on the W3C DOM Eventsstandard. And it has significantly updated APIs aimed at theapplication developer audience.

For a complete overview of the new capabilities, check out the articles, ActionScript 3.0 overview and Introducing Flash Player 9.

The Adobe Flex 2 product line

TheFlex product line gives application developers a powerful clientruntime, programming model, development environment, and data services.It supports common design patterns, works with existing development anddeployment technologies, and provides the benefits of a modern,standards-based language. The product line contains the followingdistinct technologies:

  • Adobe Flex framework and Flex 2 SDK
  • Adobe Flex Charting 2
  • Adobe Flex Builder 2
  • Adobe Flex Data Services 2

Flex framework

Atthe core of Flex 2 is the Flex framework, which is distributed for freeas part of the Flex Software Development Kit (SDK). The frameworkbuilds on the foundation provided by Flash Player 9 and ActionScript3.0 by providing a rich class library that embodies best practices forbuilding successful RIAs. The Flex framework provides a rich set ofextensible user interface components, a flexible model for controllinglayout and user interaction, and a robust infrastructure for accessingdata from remote services and binding it to the data objects and userinterface controls.

The Flex component library includesover 100 components and containers, ranging from simple widgets likebuttons and a color picker, to advanced controls like a data grid,accordion pane, and rich text editor. Developers can construct anapplication's user interface using these built-in components, subclassthem to modify their behavior, or create entirely new components usingthe component API. Like other modern user interface developmentenvironments, Flex enables developers to take advantage of predefinedinteractions, such as draggable columns on a data grid, or hook intosome well-defined events to define application-specific behaviors.

Developerslay out Flex components with MXML, an XML-based language that providesa declarative approach to controlling an application's visualappearance. Using MXML, developers can position components, specifyconstraints to enable a more "liquid" user interface, and use ViewStates and Transitions to control how the application should respond todifferent user actions and application events. To customize the lookand feel of an application, developers can set the built-in styleproperties through Cascading Style Sheets (CSS) or attach custom visualassets using built-in support for 9-slice.

Flexapplications access data and services through a set of built-in servicecomponents. Developers can access XML data through HTTP and webservices, as well as take advantage of additional services provided byFlex Data Services, including connectivity to remote Java objects,publish/subscribe messaging, and the new Flex Data Services. Tofacilitate working with data, Flex provides a rich data-bindinginfrastructure that automatically updates the user interface when datais returned, allowing applications to remain responsive even whenwaiting for results from the server.

Take a more in-depth look at enhancements in the product information about Flex framework.

Flex Charting 2

Adobeprovides a flexible charting extension to Flex. Developers can easilyadd these data visualization components to any application. TheCharting components are dynamically rendered on the client, making iteasy to add drill-down, rollover, and other interactivity that makesyour charts even more insightful than before. The Charting componentshave a fully exposed API that allows you to easily customize thecomponents or create your own.

The charts package isfully integrated into the framework's general infrastructure foreffects, styles, data binding, and drag and drop, and will workseamlessly with Flex Data Services (see below).

Flex Builder 2

FlexBuilder 2 is a brand new tool defined from the ground up to providedevelopers with an incredibly productive environment for building richInternet applications. It provides a state-of-the-art coding anddebugging environment; features intuitive layout, styling, andinteraction design tools; and promotes good, maintainable codingpractices. Built on the Eclipse platform, Flex Builder presents both afamiliar and truly extensible set of capabilities.

Developersusing Flex Builder 2 will find tools that significantly acceleratetheir coding efforts. "Content Assist" capabilities enable code hintingfor both MXML and ActionScript. Code navigation capabilities help youfind the definition of a method or class quickly. An option toincrementally compile your application automatically on every file savespeeds up the edit-run-debug cycle. Built-in error reporting makesfinding and fixing errors easy. The context-sensitive help system makesit fast to find documentation. The advanced debugging perspective makesdebugging Flash applications efficient and enables those who alreadyuse Eclipse to debug client and server code in a single IDE. Lastly,its integration with source control systems (such as CVS) and buildtools (such as Ant) make team development easy.

Developerswill find flexible visual support for laying out controls by absoluteposition, relative position, or predefined layout rules (such asvertical, tile, and so forth). Visual design support for "View States"is an innovative feature that enables you, with very few lines of code,to visually define how the appearance of a control or the entireapplication changes in response to some event. The CSS editoraccelerates the creation of new style sheets, or integration withexisting ones, and the ability to display edited styles and skins inthe Design view as you code, shortening the update and test cycle. Italso supports seamless round tripping between hand-edited code and codegenerated by the Design view, so that a team of developers can worktogether without code conflicts.

Developers using FlexBuilder 2 can import multimedia and video produced in FlashProfessional 8. Our goal is to give teams of interactive designers,videographers, multimedia producers, and application developers thebest of all worlds. They can use Flash Professional to create the mostprecise, powerful, and expressive interactive content and media. Theycan use Flex Builder to create the most immersive applicationexperiences. Over time, we intend to strengthen the workflow amongthese tools, making working together even easier and more efficient.

Flex Builder 2 will be available as an independent product with a standard tool pricing model. Read more about Flex Builder 2.

Flex Data Services 2

InFlex 1.0 we provided a set of runtime services to aid the transport ofdata and integration with existing server infrastructures. Flex DataServices 2 takes a massive step forward by providing a set ofmessage-based services and supporting capabilities that join yourenterprise architecture and information presentation by transparentlysynchronizing data between tiers. This significantly increasesdeveloper productivity by reducing time spent writing, debugging, andmaintaining the often-error-prone code required to move data among theclient, application, and database tiers.

Flex DataServices also exposes a robust messaging infrastructure for moving databetween the client and server, and allows developers to easily createapplications that efficiently leverage real-time data, occasionallyavailable services, and very large data sets. The Data Servicescapabilities seamlessly extend the framework, allowing developers torealize the benefits with very little overhead. For example, theclient-side messaging architecture provides an elegant model for eventand data queuing and synchronization, allowing organizations to produceoccasionally connected applications with minimal effort.

Inaddition, Flex Data Services enhances our efficient, binary protocolfor data transport (AMF), and continues to support RPC-styleinteraction with web services and Java objects. For more details, checkout the Flex 2 product information and the Data services and integration section in the Flex Developer Center.

The Flash Platform: Expanding the richness of rich Internet applications

Flashhas always been at the forefront of user experiences, thanks to thecapabilities of the technology and the incredibly creative communitythat pushes the envelope of traditional design practices. The resultingadvances in user experience design are often immediately available toFlex developers. Take, for example, the recent explosion in the use ofFlash Player for online audio and video.

Flash Player isthe most widely deployed audio and video player on the market. Itallows video elements to be seamlessly integrated into the surroundingcontent or application, such as triggering video cue point events inyour RIA. It supports progressive download of short-form video filesand integrates with Flash Media Server 2.0 for streaming moreinteractive, higher quality, long-form video.

Thecommunity has leveraged these capabilities to create rich Internetapplications that break down the silos that exist today betweenapplications and rich media. Instead of having their applicationslaunch a separate media player—thereby creating a discontinuousexperience—Flex developers can truly integrate video into theirapplication's user interface and workflow. For example, training videoscan navigate and highlight particular user interface elements of yourapplication and your application can cue specific portions of a videoto play based on a user's actions. Flash video and audio streams can beincorporated into Flex 2 applications by using Flash Media Server 2 or Flash Video Streaming Service,a hosted service for delivering large-scale Flash Video deploymentsdeveloped by leading CDN (Content Delivery Network) partners inconjunction with Adobe.

Lastly, now that the merger ofAdobe and Macromedia is complete, you can expect to see interesting newinnovations to work their way into the Flex product line. As we lookforward, some of the areas we are investigating include support forreal-time collaboration, improved designer-developer workflow, andgreater support for offline applications and documents. Look for moreon our future direction on Adobe Labs in the coming months.

Thank you from the Flex team

Bynow you've seen a high-level overview of the Flex 2 product line,including Flash Player 9, the Flex framework, Flex Builder, and FlexData Services. Our goal for the Flex 2 product line is to provide thedeveloper community with a great platform for delivering the bestapplication experiences to their customers.

We made theprerelease versions of Flex 2 available so the developer community atlarge would have an opportunity to have an early look at our direction,and to provide feedback. On behalf of the Flex product teams, thank youfor visiting Adobe Labs,downloading our beta, and getting involved. If you're a ColdFusiondeveloper, be sure to download the additional ColdFusion 7.0.2, whichcontains connectivity to Flex.

Visit the Flex Developer Center and flex.org to stay up to date and discuss your ideas and questions with other developers on the Adobe Flex Forums.To help make your initial experience with Flex 2 a productive one, wehave provided a series of sample applications, tutorials, and otherresources you can walk though before venturing "off road."

Whenyou've seen what's possible with Flex 2, please tell us what you think.We look forward to collaborating with you to build a set of productsthat enables you to change the face of Internet applications.

Resources for Flex 2

About the author

David Wadhwani is the vice president of product development for Adobe Flex.Prior to joining Macromedia in 2002 he was the founder and vice president ofproduct development at iHarvest Corporation. While at iHarvest, David led thedevelopment and deployment of a web-based knowledge management and collaborationsystem before selling it to Interwoven, Inc. Healso spent approximately four years at Oracle in the early 1990s where he waspart of the core team that conceived, designed, and implemented Oracle'sfirst business analytics software package. David is a graduate of BrownUniversity and a member of The Indus Entrepreneurs, and has advised a numberof software startups over the last five years.

Flex 2: 打开下一代富互联网应用之门


Flex 2:  打开下一代富互联网应用之门

David Wadhwani

David Wadhwani

Adobe

重要通知:受Adobe LiveCycle ES发布的影响, Adobe Flex Data Services 2 服务器产品已以被重贴牌为LiveCycle ES的一个分离组件。这篇文章是基于 Flex Data Services 写的,但是同样适用于 LiveCycle Data Services ES。任何提到或使用 ColdFusion 和 Flex Data Services 的地方不兼容于 LiveCycle Data Services ES。要了解 LiveCycle Data Services ES 的新功能,请阅读 LiveCycle 开发者中心的指南和 Adobe LiveCycle Data Services ES

2005 年10月,Macromedia(现在的Adobe)为开发者社区提供了Adobe® Flex™ 2 的第一个预览版本 - 开发工具,库和运行时库服务的一套全新阵容,它允许开发者利用 Flash® Player 运行时库的优点,随时随地创建和部署富互联网应用。从那时起,大量的开发者开始使用 Flex 开发应用程序,并向我们提供反馈。另外,Macromedia 成为 Adobe 的一部分,打开了改善网络应用程序未来机会的整个世界。

随 着 Flex 2 的发布,我们骄傲的展示一下2005年10月到2006年6月之间的开发周期。通过组合一个直观的程序设计模型,一个功能强大的基于 Eclipse 的 IDE,一个设置丰富的基于 J2EE 的运行时库,我们相信,Flex 2 产品线将提供给当今开发者们开发可用跨平台富互联网应用程序最全面的解决方法。最近公布的定价结构,允许开发人员自由创建和部署多种应用,而无需在他们的 服务器上安装任何东西。最新在开源许可证下发面的技术比如 Flex-Ajax BridgeAjax Client for Flex Data Services,允许开发者增量的添加 Flex 组件到存在的网站和应用程序上去,不管它们是基于静态 HTML 还是 Ajax 技术。

推动RIA(富互联网应用)开发的发展

早 在2001年,Macromedia看到开发者和设计者们在 Macromedia Flash 里建立的东西后,就使用了“富互联网应用”这个短语。很显然,这些应用程序突破了体统 HTML 应用程序的设计限制和互动约束。他们有效的使用了网络带宽,只传输改动了的那一部分数据,最小化了页面布局信息。包含了一组丰富的互动部署,允许最终用户 直接操作数据。无缝的把音频和视频分层到应用程序用户界面里去。清晰的保持了上下关系,用户就像在操纵应用程序一样。还有,当然,他们支持高保真打印。

富 互联网应用的影响真是令人难以置信,不管是深度还是广度。我们看到,从网络爱好者到大企业都在建设富互联网应用 - 并且最终看到他们的生意引人注目的改善。大型金融服务机构使用RIA在用户中巩固他们的品牌,通过更好的关键任务数据互动加速内部商业决策。在线零售商在 结账流程中减少了50%的购物物流费用。个别开发者把老套的在线地图服务和纽约市交通灯上安装的摄像头结合起来,为车友们提供最新和最有用的交通信息。

随着用户扩展了他们使用富互联网应用的范围,开发者迅速发现了一些特殊需求。有的 RIA 需要消耗实时数据供给。其他的需要在临时连接环境下运行,在一个连接激活时智能的同步数据。有的需要消耗专有二进制协议。还有需要多个客户共享一个单独的实例数据。

基于对这些早期使用客户的工作,我们下决心提供一个 RIA 平台,既能解决这些需求,也可以很容易的扩展而能满足更多应用程序的特殊需求。我们想为开发者们提供客户运行时库,开发环境,类库,和数据服务,以帮助他们:

  • 在 RIA 应用程序开发中具备超常生产力
  • 用有效的界面模式创造有表现力的应用程序
  • 在均分布,高效能,跨平台,跨浏览器的运行时库环境下部署应用程序
  • 根据项目的大小和任务的复杂度量身使用工具和技术。

我们兴奋的向大家介绍 Flex 2 产品线,它是构建大量浸入式应用的最佳途径,从简单的餐馆菜单到复杂的工作流程系统和同步贸易平台。

如 果你很熟悉 Flex 1.0 或 1.5,认识这一点非常重要:Flex 2 不仅仅只是一个新的发布。从技术观点上看,Flex 2 引入了新的功能,使开发者能构建一个全新级别的富互联网应用。同时,Adobe Flex Builder™ 2 已经在开源 IDE Eclipse 架构的基础上重新构建,现在它已经包含了 Flex 架构和编译器。另外,ColdFusion® 和 Flex 小组密切合作,在 Flex Builder, Flex Data Services, 和 ColdFusion Server之间提供为 ColdFusion 定制的融合点。

除 了技术和产品先进性之外,我们对 Flex 2 的包装,定价,和配置方式作了重大的改变。在 Adobe Flex 2 软件开发套件(SDK)中 Flex 架构是免费提供的。Flex 2 SDK 包括命令行编译器和开发,编译,和配置连接到任何 XML 和 SOAP 网络服务的 Flex 应用程序所需要的文档。开发者可以单独下载它,并允许他们免费的构建和配置任何应用程序(包括那些用于商业用途的)。我们同样也提供在单独,非集群服务器 上使用的 Flex Data Services 2 限制连接的免费版本。(当然,Flex Data Services 2 也可以在单个 CPU,单个项目上基于商业和企业许可证授权。)最终,这些免费产品将业界最强大的跨平台 RIA 技术带给每一个开发者和每一个项目。影响将是巨大的。

富互联网应用的新平台: Flash Player 9

Flash® Player, Flash 平台的主干,也正在演变成为 Flex 2 产线和下一代 RIA 提供基础的平台。在这几年中,起初 Flahs Player 主要作为播放动画的平台,通过加入对 ECMAScript 标准(推动 JavaScript 开发的同一标准)的部分支持,逐渐扩展了它自己的脚本语言 (ActionScript)。通过 Flash Player 7 的发布,ActionScript 实现了绝大多数 ECMA(欧洲计算机制造商协会)标准。Flash Player 9(最近它被称作 Flash Player 8.5)作为 Flex 2 产线也同时装载了这个标准。更多信息请看介绍 Flash Player 9。那篇文章中我们介绍了 ActionScript 3.0,一个为生产力和性能设计的强大面向对象编程语言,并且以下一代 ECMAScript 标准为基础。更多信息请看 ActionScript 3.0 概览

Flash Player 8(2005年9月发布) 在渲染引擎上取得了长足进步,引进了一组有表现力的扩展功能(过滤器,先进梯度控制,渲染性能,等等),视频支持增强(更高质量编码解码器,阿尔法通道支 持 ,等等),这些功能在今天的网络上空前流行。Flash Player 8 也很大的改善了 API,允许开发者在播放器中运行的应用程序,浏览器的 HTML 文本对象模型之间通信,并且联合 JavaScript 函数,很容易将 Flash 组件加到已存在的网页和应用程序之中去。

Flash Player 9 借鉴 Flash Player 8 的先进性,集中改进脚本在虚拟机上的执行效率。实际上,它包括一个被称为 AVM2 全新的,高优化的 ActionScript Virtual Machine (AVM)和一个新版本的 ActionScript 编程语言。AVM2 以支持富互联网应用开发者的需求为基础构建。新的虚拟机反应非常迅速,支持完整的运行时库错误报告和工业标准的调试。它包括二进制套接字支持,允许开发者 扩展播放器以适应任何二进制协议。Flash player 9 也会包括 AVM1,它执行 ActionScript 1.0和2.0代码,用来向下兼容现有和遗留下的内容。

通过 ActionScript 3.0,我们能得到更多,而不只是遵循 ECMAScript 标准;Adobe 现在主持 ECMAScript 委员会并帮助推动它的发展。就像 Java 或 C# 拥有的优点那样,ActionScript 3.0 以汇编模式编译时更强的类型检查为特点。它支持流线形数据操作,包括 E4X(ECMAScript for XML)标准,它扩展了这门语言,把 XML作为本地数据类型加入,允许开发者更自然的结合和操作 XML。为了更好的文本分析和处理,它加入了对正则表达式支持。它去掉了一些老版本虚拟机中的特定事件处理方案,更有利于基于 W3C DOM Events 标准的统一模型。并且它瞄准了应用程序开发者的需求,显著更新了API。

新功能的完整概述,参看下面的文章,ActionScript 3.0 概览介绍 Flash Player 9

Adobe Flex 2 产品线

Flex 产品线给应用程序开发者提供了强大的客户运行时库,程序设计模型,开发环境,和数据服务。它支持普通的设计模式,以现有开发和配置技术为基础工作,也提供一个现代的,基于标准的语言。产线包含下列独特技术:

  • Adobe Flex framework and Flex 2 SDK
  • Adobe Flex Charting 2
  • Adobe Flex Builder 2
  • Adobe Flex Data Services 2

Flex 框架

在 Flex 2 中处于核心地位的是 Flex 框架,它作为 Flex Software Development Kit (SDK) 的一部分免费分发。框架以 Flash Player 9 和 Action Script 3.0 提供的内含构建成功富互联网应用的最优方法的丰富的类库为基础。Flex 的框架提供一个丰富的可扩展用户界面组件设置,一个用于控制布局和用户互动的灵活模型,和从远程服务访问数据的健壮底层构造,并可以把它构建成数据对象和 用户界面控制器。

Flex 组件库包含超过100种组件和容器,范围从简单的像按钮和颜色拾取器那样窗口小部件,到像数据网格,可折叠面板,丰富文本编辑器那样的高级控制。开发者可 以使用这些内建组件构造程序的用户界面,把它们作为子类以修改其行为,或是使用组件的 API 生成全新的组件。和其它用户界面开发环境一样,Flex 允许开发者利用预定义互动,比如数据网格中可拖拽的列,或将一些明确定义的事件定义为有特殊用途的行为。

开发者展 示了带MXML的 Flex 组件,MXML是一个基于 XML 的语言,提供控制程序视觉外观说明方式。使用 MXML,开发者能定位组件,指定约束以获得一个更“透明”的用户界面,使用视图状态和切换控制程序对不同的用户动作和程序事件应该如何反应。为了定制程 序的感觉和外观,开发者可以通过层叠样式表 (CSS) 设置内置风格属性,或者使用9格切分缩放方式内置的支持,附加本地视觉效果。

Flex 应用程序通过一组内置的服务组件访问数据和服务。开发者可通过 HTTP 和网络服务访问 XML 数据,同样,也可访问利用 Flex Data Services 提供的额外服务,包括连接的远程 Java 对象,发布/订阅的信息,和新的 Flex Data Services。为了促进数据处理,Flex 提供了丰富的数据粘合底层构造,当数据返回时它会自动更新用户界面,当等待服务器返回结果时它允许程序保持响应。

更深入了解产品的增强信息请看 Flex 框架

Flex Charting 2

Adobe 为 Flex 提供了灵活的图表插件。开发者可以很容易把这些数据形象化组件加到任何程序中去。图表组件在客户程序上动态演示,你可以很容易的加入向下钻取,翻转等互动 效果,使你的图表比以前更富有洞察力。图表组件有着完全公开的 API,你可以很容易的定制或者新建自己的组件。

图表工具包完全结合在框架的常规底层构造中,这样效果,风格,数据建立,和拖放就会和 Flex Data Services 无疑集成工作(看下面)。

Flex Builder 2

Flex Builder 2 是一个全新的工具,被重新定义为提供给开发者构建富互联网应用难以置信的生产力环境。它提供一个艺术级的编码和调试环境;特征为直观的布局,风格,和互动性的设计工具;并且促进良好的,可维护的编码实践。基于 Eclipse 平台构建,Flex Builder 表现得既熟悉又具有完全扩展功能。

使用 Flex Builder 2 的开发者会发现这个工具显著的加快了他们编码速度。“Content Assist”功能允许 MXML 和 ActionScript 的代码提示。代码导航功能帮助你快速的找到方法或类的定义。一个自动在你保存文件增量编译程序的选项,加快了编辑-运行-调试的循环。内置错误报告使寻找 和修正错误变得很容易。上下文关联使系统迅速的找到文档。先进的调试方式使 Flash 程序的调试更有效率,并且那些使用 Eclipse 的用户可以在同一个 IDE 中调试客户端和服务器代码。最后,它和源代码控制系统(比如 CVS)和编译工具(比如 Ant)的结合,使团队开发变得容易。

开发者会发现通过绝对位置,相对位置,或者预定义布局设计规则(比如垂直,平铺,等等),定线控制有着灵活的视觉支持。"View States"的视觉设计支持是一个创新的特性,你只需通过一小段代码,就可以直观的定义对某些事件控制的外观或整个程序如何改变。CSS 编辑器加快了新样式表的创建或与现有样式表的融合,而且将“设计”视图中所编辑的样式和外观显示为您的代码的能力缩短了更新和测试周期。它还支持手工编辑的代码和“设计”视图生成的代码之间的无缝巡回,这样,开发者团队可以没有代码冲突的协作。

开 发者使用 Flex Builder 2 可以导入用 Flash Professional 8 制作的多媒体和视频。我们的目标是为交互式设计人员、录像师、多媒体制作者和应用程序开发人员团队提供全世界最好的工具。 他们可以使用 Flash Professional 创建最精确、最强大和最有表现力的交互内容和媒体。他们可以使用 Flex Builder 创建最吸引人的应用体验。过一段时间,我们打算加强这些工具之间的工作流,从而使协同工作更容易更有效。

Flex Builder 2 将作为一个带标准工具定价模型的独立产品发布。更多信息参见 Flex Builder 2

Flex Data Services 2

在 Flex 1.0 我们提供了一组运行时库服务以帮助数据传输和结合现有的服务器底层构造。Flex Data Services 2 向前跨了重大的一步,它提供一组基于信息的服务,支持联接企业架构和不同层间透明同步数据的能力。这显著的提升了开发者的生产力,不用花时间在编写,调 试,和维护往往容易出错的,要求在客户端,程序,和数据库不同层间移动数据的代码上。

Flex Data Services 还展示了在客户端和服务器间转移数据的健壮的消息基础架构,并允许开发者轻松创建有效利用实时数据、偶尔可用的服务以及非常大的数据集合。 Data Services 功能无缝扩展该框架,允许开发者花很少开销实现收益。 例如,客户端消息架构为事件以及数据排队与同步提供了最佳模型,从而允许组织花费最小的精力产生偶发性连接应用。

此外,Flex Data Services 还增强了我们有效的、用于数据传输 (AMF) 的二进制协议,并且继续支持与 Web 服务和 Java 对象的 RPC 样式交互。 更多详细信息,请参见Flex 开发中心的 Flex 2 产品信息Data 服务和融合 段落。

Flash 平台: 扩展富互联网应用

Flash  总是走在用户体验的最前端,感谢技术和有难以置信创造力的社区的能力,他们突破了传统设计惯例的封锁。通常 Flex 开发者可以立即使用用户体验设计中的先进功能。例如,最近 Flash Player 在线音频和视频的爆炸性使用。

Flash Player 是市场上最广泛部署的音频和视频播放器。它使视频成分无缝结合到周围的内容或程序中,比如在 RIA 中触发视频信号点。它支持短格式视频文件的渐进式下载并与 Flash Media Server 2.0 集成,可以流式传输更多互动的,更高质量的长视频。

社区已经利用这些功能创建了 Rich Internet Application,这些应用程序破坏了当前存在于应用和富媒体之间的平衡。不是使用分离的媒体播放器装载他们的程度-这会产生不连续的体验-Flex 开发者真正的将视频结合到他们程序的用户界面和工作流程之中去了。例如,培训视频可以导航并在你的程序中高亮提示特定的用户界面元素,并且基于用户操作可以播放视频特定的部分。通过使用Flash Media Server 2Flash Video Streaming Service,它是预先 CDN(内容传送网络)和 Adobe 共同开发一个传送大型 Flash Video 部署的托管服务,Flash 视频和音频流可以合并到 Flex 2 应用程序中去。

最终,Adobe 和 Macromedia 的合并现在已经完成,您会看到 Flex 系列产品中引入的创新。正如我们所期望的一样,我们正在调查的一些领域包括对实时协作支持、改进的设计者-开发者工作流程,以及对脱机应用程序和文档更大支持。在Adobe 实验室中了解更多有关未来几个月中我们的研究方向。

从 Flex 小组来的感谢

到现在为止你已经看到了 Flex 2 产品线的的高层概述,包括 Flash Player 9, Flex 框架, Flex Builder, 和 Flex Data Services。我们推出 Flex 2 产线的目的是,为开发者社区提供一个出色的平台,为用户输送最好的应用体验。

我们制作 Flex 2 预览版的目的是,使开发者社区普遍有机会对我们的方向有一个早期看法,并且向我们反馈。在 Flex 产品小组方面,感谢你们浏览 Adobe 实验室,下载公开测试版,参与测试。如果你是 ColdFusion 开发者,请确定下载了附加的 ColdFusion 7.0.2,它包含了对 Flex 的连接。

浏览 Flex 开发中心flex.org 保持最新,在 Adobe Flex 论坛和其它开发者讨论你的想法和问题。为了为了使您使用 Flex 2 的初始体验更有效,我们提供了你可以浏览的一系列样本程序,教程,和其它资源,避免你“越野”冒险。

当你看到 Flex 2 所拥有的功能时,请告诉我们你是怎么想的。我们期待和你协作构建一组能改变网络应用程序的产品。

Flex 2 资源

有关作者

David Wadhwani 是 Adobe Flex 产品开发部的副总裁。在2002年加入 Macromedia 之前,他是 iHarvest 公司产品开发部的创建者和副总裁。在 iHarvest 公司时,David 领导开发和部署一个基于网络的知识管理和协作系统,完成之后卖给了 Interwoven, Inc. 公司。 在90 年代初期 ,他在甲骨文公司呆了大约四年时间,在那里他作为构思,设计和执行甲骨文第一个商业分析软件核心小组中的一员。David 是Brown University(布朗大学)的毕业生,The Indus Entrepreneurs 的会员,在过去 5 年内许多软件公司是他建议创建的。

链接

阅读
发现
翻译