`
txf2004
  • 浏览: 7028539 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

创建RIA程序最容易犯的10大错误

阅读更多

Top 10 Mistakes when building Flex Applications

In this post, Adobe’s James Ward teams up with InfoQ.com to bring you another Flex Top 10 (our most recent Flex Top 10). Flex is an open source application development framework for building rich Internet applications that run in the web with Flash Player, or on the desktop with Adobe AIR. Overall, Flex is a powerful framework that is easy to use, but today let's focus on some of the common mistakes that are made when building Flex applications.

For those new to Flex, check out InfoQ’s recent Adobe Flex Basics to get a quick introduction to the framework. Here is the list:
  1. Using an RIA framework to build Web 1.0 applications (aka. New technology same old stuff)使用RIA框架创建WEB1.0的的东东
  2. One of the largest challenges when moving from Web 1.0 applications to the RIA's development paradigm is learning to think differently. Flex gives developers an advanced component library that allows for doing things that simply weren’t possible only a few years ago. Often, the power of Flex is missed, and the framework is used to implement more traditional Web 1.0 applications.

    Building Web 2.0 applications is more than partial page refresh and rounded corners. For example, Flex developers should be using vectors to provide users a visual understanding of data, and advanced controls for a rich application flow. Stephan Janssen discusses this struggle recently with InfoQ.com:
    As a Java developer, learning Object Oriented ActionScript and the UI markup language is really a walk in the park. The challenge however for (Java) developers is that we're not designers, and with RIA technologies these two skills are very much needed.
  3. Breaking standard browser experiences.打破传统的浏览习惯

  4. While Flex does provide an excellent platform for improving the user experience, it still important to maintain familiarity of things like the back button, book marking, and auto complete.

    Flex 3 includes new Deep Linking features for back button support and book marketing. You can learn more at labs.adobe.com. There are number of components out there for implementing auto-complete. From the Adobe Exchange, you can use the AutoComplete Input component.

  5. Slowing the application down with the use of too many containers.使用太多的容器导致效率下降

  6. Flash Player uses a hieratical display object graph, similar to the HTML Document Object Model (DOM). The deeper containers are nested the longer the rendering takes. Adobe’s Flex Developer Center has an article that covers best practices related to Flex performance, including the use of containers in detail:
    The biggest Flex performance danger is yielding to the temptation to use containers randomly. Deeply nesting too many containers hinders the performance of your application. This is the number one performance danger that Flex developers succumb to—and luckily it is 100 percent avoidable.

  7. Slowing the application down by using XML for data transfer over optimized protocols.在优化过的协议上使用XML传输数据降低效率

  8. Flex offers developers a number of options for data transfer between the Flex client application and the server, including AMF3, XML, SOAP, and straight HTTP requests. Ward demonstrates the use of these technologies and performance benchmarks in his Census application.

    BlazeDS should be considered for Greenfield projects using Java on the backend. BlazeDS is Adobe’s recently open sourced Data Services product that uses the AMF3 protocol. AMF is a binary transfer protocol that is easy to integrate with Java, and offer significant performance benefits over XML. There are open source implementations of AMF for every major backend technology.

    If BlazeDS is not an option, Hessian could be an option. Hessian offers ActionScript/Flex support for their binary web services protocol.

  9. Trying to hire Flex developers.尝试雇佣FLEX开发者

  10. Experienced Flex developers are very hard to find right now. Flex is at the point in the adoption curve which Java was at in the late nineties. The demand for Flex developers is exceeding the supply. This makes finding experienced Flex developers difficult. This, however, creates a huge opportunity for Java developers to expand their skill sets and work with a fun emerging technology. Many companies looking for Flex developers have great success training Java or other web application developers for only a few weeks on Flex. Flex’s language and APIs are easily learnable by developers who are familiar with Web and GUI programming.

  11. Over use of animations过多的动画

  12. Using Flash as the runtime enables developers to easily add animations and effects. However, developers should make sure that the animations have meaning and provide context. Otherwise, they will annoy users. The timing of animations is also important. Interaction designers can help make recommendations on when animations should and should not be used. Interaction designers can also recommend the best type of animations, the duration, and the best easing function.

    There is good a post on the use of animations at laair.org:
    Most animations are simply TOO LONG. They are long, and slow, and boring, and excessive. Tone it down. If there is one thing I have found, its that I hate waiting for stupid animations to finish so I can do something else.

    Don’t get me wrong I am not bashing animations. I am simply bashing animations that are simply too long or too extravagant for their purpose. Every animation can be broken down to having a purpose. Figure out the purpose of your animation and apply accordingly.
  13. Not setting up an enterprise ecosystem.为设置整个企业生态系统

  14. As with other software projects, it is important to setup an enterprise ecosystem for your Flex applications.

    Test Driven Development (TDD) is a staple of most any enterprise project in this day-and-age. For Flex, the FlexUnit framework is available for coding unit tests. On Adobe’s Developer Connection, Neil Webb discusses TDD for Flex developers and using FlexUnit. In addition, Flexcover is available for code coverage reporting.

    Continuous Integration (CI) is a proven practice for building cohesive applications when multiple developers are contributing. Similar to Java applications, both Ant and Maven plug-ins are available for CI builds of your Flex applications.

  15. Not using the entire framework.没有使用整个框架

  16. There are a number of optional features available in Adobe Flex that you should consider using in your applications. For example, Runtime Shared Libraries (RSL) is available for reducing the size of your applications:
    You can shrink the size of your application's resulting SWF file by externalizing shared assets into standalone files that you can separately download and cache on the client. Multiple Flex applications can load these shared assets at runtime, but each client need only to download them once. These shared files are called Runtime Shared Libraries.
    Another under used feature of the framework is the built in accessibility features. You can read more about the accessibility features of Flex in Adobe’s livedocs. In addition to built in accessibility, the framework provides built in features for localization. For the latest Flex 3 framework features, checkout Adobe’s Getting Started introduction page.

  17. Slowing the DataGrid down with complex renderers.采用了复杂的呈现使得DG速度下降

  18. The out-of-the-box itemRenderer for the DataGrid is very optimized. Mistake #3 discussed the performance impacts of deeply nested containers. One of the places in Flex where containers can easily get deeply nested is in the DataGrid’s item renderers. The number of item renderers which are rendered by the DataGrid is the number of visible rows times the number of visible columns. Custom DataGrid and List item renderers should be very optimized. When complex layout logic is needed in an item renderer, it is best to use UIComponent (or other more low-level classes) and position the contents for that cell manually.

  19. Not Preparing for Offline Applications.没有准备程序的下线部分

  20. The traditional model for RIAs is in the browser. However technologies like Adobe AIR and Google Gears is allowing those applications to run offline. By not preparing for a potential offline architecture when users demand it, changing your applications to support offline features may be very difficult. Typically, in web applications business logic lives on the server. In offline RIAs, business logic must transition to the client. This makes it nessecary to architect ahead of time where certain business logic will need to live in order for applications to work both offline and online.

Check out other Flex content on InfoQ.com to learn more.


Top 10 Mistakes when building Flex Applications

Posted by Jon Rose on Apr 17, 2008 01:06 AM

Community
Java
Topics
Rich Internet Apps,
Web 2.0,
Rich Client / Desktop,
Web Frameworks
Tags
Adobe Integrated Runtime,
Apollo,
Flex,
Flash,
Adobe
In this post, Adobe’s James Ward teams up with InfoQ.com to bring you another Flex Top 10 (our most recent Flex Top 10). Flex is an open source application development framework for building rich Internet applications that run in the web with Flash Player, or on the desktop with Adobe AIR. Overall, Flex is a powerful framework that is easy to use, but today let's focus on some of the common mistakes that are made when building Flex applications.

For those new to Flex, check out InfoQ’s recent Adobe Flex Basics to get a quick introduction to the framework. Here is the list:
  1. Using an RIA framework to build Web 1.0 applications (aka. New technology same old stuff).

  2. One of the largest challenges when moving from Web 1.0 applications to the RIA's development paradigm is learning to think differently. Flex gives developers an advanced component library that allows for doing things that simply weren’t possible only a few years ago. Often, the power of Flex is missed, and the framework is used to implement more traditional Web 1.0 applications.

    Building Web 2.0 applications is more than partial page refresh and rounded corners. For example, Flex developers should be using vectors to provide users a visual understanding of data, and advanced controls for a rich application flow. Stephan Janssen discusses this struggle recently with InfoQ.com:
    As a Java developer, learning Object Oriented ActionScript and the UI markup language is really a walk in the park. The challenge however for (Java) developers is that we're not designers, and with RIA technologies these two skills are very much needed.
  3. Breaking standard browser experiences.

  4. While Flex does provide an excellent platform for improving the user experience, it still important to maintain familiarity of things like the back button, book marking, and auto complete.

    Flex 3 includes new Deep Linking features for back button support and book marketing. You can learn more at labs.adobe.com. There are number of components out there for implementing auto-complete. From the Adobe Exchange, you can use the AutoComplete Input component.

  5. Slowing the application down with the use of too many containers.

  6. Flash Player uses a hieratical display object graph, similar to the HTML Document Object Model (DOM). The deeper containers are nested the longer the rendering takes. Adobe’s Flex Developer Center has an article that covers best practices related to Flex performance, including the use of containers in detail:
    The biggest Flex performance danger is yielding to the temptation to use containers randomly. Deeply nesting too many containers hinders the performance of your application. This is the number one performance danger that Flex developers succumb to—and luckily it is 100 percent avoidable.

  7. Slowing the application down by using XML for data transfer over optimized protocols.

  8. Flex offers developers a number of options for data transfer between the Flex client application and the server, including AMF3, XML, SOAP, and straight HTTP requests. Ward demonstrates the use of these technologies and performance benchmarks in his Census application.

    BlazeDS should be considered for Greenfield projects using Java on the backend. BlazeDS is Adobe’s recently open sourced Data Services product that uses the AMF3 protocol. AMF is a binary transfer protocol that is easy to integrate with Java, and offer significant performance benefits over XML. There are open source implementations of AMF for every major backend technology.

    If BlazeDS is not an option, Hessian could be an option. Hessian offers ActionScript/Flex support for their binary web services protocol.

  9. Trying to hire Flex developers.

  10. Experienced Flex developers are very hard to find right now. Flex is at the point in the adoption curve which Java was at in the late nineties. The demand for Flex developers is exceeding the supply. This makes finding experienced Flex developers difficult. This, however, creates a huge opportunity for Java developers to expand their skill sets and work with a fun emerging technology. Many companies looking for Flex developers have great success training Java or other web application developers for only a few weeks on Flex. Flex’s language and APIs are easily learnable by developers who are familiar with Web and GUI programming.

  11. Over use of animations

  12. Using Flash as the runtime enables developers to easily add animations and effects. However, developers should make sure that the animations have meaning and provide context. Otherwise, they will annoy users. The timing of animations is also important. Interaction designers can help make recommendations on when animations should and should not be used. Interaction designers can also recommend the best type of animations, the duration, and the best easing function.

    There is good a post on the use of animations at laair.org:
    Most animations are simply TOO LONG. They are long, and slow, and boring, and excessive. Tone it down. If there is one thing I have found, its that I hate waiting for stupid animations to finish so I can do something else.

    Don’t get me wrong I am not bashing animations. I am simply bashing animations that are simply too long or too extravagant for their purpose. Every animation can be broken down to having a purpose. Figure out the purpose of your animation and apply accordingly.
  13. Not setting up an enterprise ecosystem.

  14. As with other software projects, it is important to setup an enterprise ecosystem for your Flex applications.

    Test Driven Development (TDD) is a staple of most any enterprise project in this day-and-age. For Flex, the FlexUnit framework is available for coding unit tests. On Adobe’s Developer Connection, Neil Webb discusses TDD for Flex developers and using FlexUnit. In addition, Flexcover is available for code coverage reporting.

    Continuous Integration (CI) is a proven practice for building cohesive applications when multiple developers are contributing. Similar to Java applications, both Ant and Maven plug-ins are available for CI builds of your Flex applications.

  15. Not using the entire framework.

  16. There are a number of optional features available in Adobe Flex that you should consider using in your applications. For example, Runtime Shared Libraries (RSL) is available for reducing the size of your applications:
    You can shrink the size of your application's resulting SWF file by externalizing shared assets into standalone files that you can separately download and cache on the client. Multiple Flex applications can load these shared assets at runtime, but each client need only to download them once. These shared files are called Runtime Shared Libraries.
    Another under used feature of the framework is the built in accessibility features. You can read more about the accessibility features of Flex in Adobe’s livedocs. In addition to built in accessibility, the framework provides built in features for localization. For the latest Flex 3 framework features, checkout Adobe’s Getting Started introduction page.

  17. Slowing the DataGrid down with complex renderers.

  18. The out-of-the-box itemRenderer for the DataGrid is very optimized. Mistake #3 discussed the performance impacts of deeply nested containers. One of the places in Flex where containers can easily get deeply nested is in the DataGrid’s item renderers. The number of item renderers which are rendered by the DataGrid is the number of visible rows times the number of visible columns. Custom DataGrid and List item renderers should be very optimized. When complex layout logic is needed in an item renderer, it is best to use UIComponent (or other more low-level classes) and position the contents for that cell manually.

  19. Not Preparing for Offline Applications.

  20. The traditional model for RIAs is in the browser. However technologies like Adobe AIR and Google Gears is allowing those applications to run offline. By not preparing for a potential offline architecture when users demand it, changing your applications to support offline features may be very difficult. Typically, in web applications business logic lives on the server. In offline RIAs, business logic must transition to the client. This makes it nessecary to architect ahead of time where certain business logic will need to live in order for applications to work both offline and online.

Check out other Flex content on InfoQ.com to learn more.
分享到:
评论

相关推荐

    《Flash MX 2004 ActionScript 2.0 与 RIA 应用程序开发》

    《Flash MX 2004 ActionScript 2.0 与 RIA 应用程序开发》这本书深入探讨了使用Adobe Flash MX 2004进行富互联网应用(Rich Internet Application,简称RIA)开发的核心技术——ActionScript 2.0。ActionScript是...

    Flash MX 2004 ActionScript 2.0 与 RIA 应用程序开发光盘

    《Flash MX 2004 ActionScript 2.0 与 RIA 应用程序开发》是一本专注于探讨如何利用Adobe Flash MX 2004的ActionScript 2.0语言来构建富互联网应用程序(RIA)的专业教程。该光盘包含了相关教材、示例代码、练习项目...

    从wpf ria程序中访问wcf web服务

    WPF RIA是Silverlight的一个扩展,主要用于创建具有丰富用户界面的桌面应用。RIA项目通常使用Entity Framework进行数据模型的建立,通过Domain Service Class与服务器端的业务逻辑和服务进行交互。 **WCF Web服务...

    Flex4开发RIA应用程序.pdf

    ### Flex4:开发RIA应用程序 #### 一、课程概述与目标 《Flex4:开发RIA应用程序》是一门针对Adobe Flex4技术的专业培训课程。该课程旨在帮助开发者掌握使用Flex4来构建高质量、交互性强的RIA(Rich Internet ...

    Flex4:开发RIA应用程序 pdf

    Flex4是Adobe公司推出的一种强大的富互联网应用(Rich Internet Application, RIA)开发框架,它主要基于ActionScript和MXML,用于构建具有丰富图形界面和交互功能的Web应用程序。本书《Flex4:开发RIA应用程序》...

    silverlight与WCF RIA Service数据库操作相关

    在IT领域,Silverlight是一种由微软开发的富互联网应用程序(RIA)平台,它允许开发者创建交互性强、用户体验丰富的网络应用。而WCF RIA Services(Windows Communication Foundation Rich Internet Application ...

    我的博客中 Silverlight WCF RIA服务 (三)创建一个RIA Services Solution 源代码

    在本篇中,我们将深入探讨如何利用Silverlight WCF RIA(Rich Internet Application Services)服务创建一个解决方案。Silverlight,作为Microsoft开发的一款富客户端技术,主要用于构建交互性强、视觉效果丰富的Web...

    Flex_4:开发RIA_应用程序(中文版)

    - **Adobe RIA开发技术认证**:是Adobe公司为开发者提供的专业认证,旨在帮助开发者掌握创建丰富的互联网应用程序(RIA)所需的技术技能。认证考试通常涵盖多个方面,如Flex框架、组件库、数据绑定、事件处理等。 - ...

    Flex_4:开发RIA_应用程序

    Flex 4,全称为Adobe Flex 4,是Adobe公司推出的一种用于构建富互联网应用程序(Rich Internet Applications,简称RIA)的框架。它基于ActionScript 3.0编程语言和Flash Player或Adobe AIR运行环境,旨在帮助开发者...

    Flex_4:开发RIA_应用程序.pdf

    ### Flex 4:开发RIA应用程序知识点总结 #### 一、Adobe Flex 4 简介与平台背景 **Adobe Flash Platform 简介** - **技术简介:** Adobe Flash Platform 是一套用于创建交互式内容的技术栈,其中包括了Adobe Flex...

    RIA应用开发:7-创建Ajax应用.ppt

    RIA(Rich Internet ...jQuery进一步封装了这些功能,提供了更简洁的API,使得开发者能更容易地创建富互联网应用程序。通过Ajax,我们可以构建响应迅速、用户体验优秀的Web应用,而无需每次交互都刷新整个页面。

    Flex_3_RIA开发详解与精深实践.pdf

    Flex是Adobe公司推出的一种用于构建富互联网应用(RIA)的开源框架,它基于ActionScript编程语言和Flash Player或Adobe AIR运行环境,能够创建交互性强、图形丰富的Web应用程序。 在Flex 3中,开发者可以利用MXML和...

    siverlight wcf ria案例下载

    通过深入研究"Nicholas.SilverlightSellThrough"这个案例,开发者可以学习到如何将Silverlight的富媒体特性与WCF RIA服务的强大功能相结合,创建出功能强大且用户体验优秀的Web应用程序。同时,对于理解和掌握.NET ...

    SilverLight 4 调用RIA Service例程

    在IT行业中,Silverlight是一种由微软开发的富互联网应用程序(RIA)平台,它允许开发者创建交互性强、用户体验丰富的网络应用。Silverlight 4是该技术的一个版本,它提供了更多的功能和改进,使得开发者能构建更加...

    WCF RIA Service Silverlight 商业应用

    5. **错误处理**:处理服务器端和客户端可能出现的异常,确保程序的健壮性。 总的来说,"WCF RIA Service Silverlight 商业应用"是一个利用微软技术栈构建的Web应用程序示例,它展示了如何通过WCF RIA Services与...

    《Flex 3 RIA开发详解与精深实践》

    ria开发的核心在于提供更丰富的用户体验,而Flex 3通过其强大的组件库、灵活的数据绑定和强大的图形渲染能力,使得开发者能够创建出功能丰富、界面美观的应用程序。书中首先会讲解Flex的基础概念,包括MXML语言、...

    RIA service 模板

    RIA(Rich Internet Applications)服务模板是为开发富互联网应用程序(RIA)特别设计的工具,它旨在简化RIA服务的创建和管理过程,以提高开发效率。RIA服务通常指的是那些提供复杂交互性、动态数据更新和离线功能的...

    Silverlight3 ria services文档

    RIA 是指利用现代 Web 技术构建的交互式应用程序,它能够提供类似于桌面应用程序的用户体验。Silverlight 作为微软推出的一款跨浏览器、跨平台的框架,旨在为 Web 应用程序带来丰富的多媒体体验和强大的用户界面设计...

    Flex_4.0_RIA开发详解讲义.rar

    Flex 4.0是Adobe公司推出的富互联网应用(RIA)开发框架,主要应用于构建具有高度交互性和动态用户体验的Web应用程序。这份"Flex_4.0_RIA开发详解讲义"显然是一个详细的教程,旨在帮助开发者深入理解Flex 4.0平台的...

    Microsoft .NET RIA Services Overview

    通过上述详细解析,我们可以看出,Microsoft .NET RIA Services 不仅提供了一套全面的数据访问解决方案,还极大地提升了开发效率和应用性能,尤其是在构建复杂的Silverlight应用时,它无疑是开发者不可或缺的强大...

Global site tag (gtag.js) - Google Analytics