- 浏览: 257593 次
- 性别:
- 来自: 大连
-
文章分类
最新评论
-
红小豆:
Criteria和Detachedcriteria的区别及应用 -
fjjiaboming:
那就稍微翻译一下 啊....
Mysql autoReconnect 的问题 -
woyaowenzi:
非常感谢,我正想做一个画线的控件,就和windows的画图板一 ...
一个简单的FLEX画图demo -
guzen:
可以用一下flash builder 4,现在支持绝对定位了, ...
how to use flex layouts -
suifeng:
好!
一个简单的FLEX画图demo
zz from http://www.infoq.com/news/2008/04/top-10-flex-mistakes
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:
- Using an RIA framework to build Web 1.0 applications (aka. New technology same old stuff).
- Breaking standard browser experiences.
- Slowing the application down with the use of too many containers.
- Slowing the application down by using XML for data transfer over optimized protocols.
- Trying to hire Flex developers.
- Over use of animations
- Not setting up an enterprise ecosystem.
- Not using the entire framework.
- Slowing the DataGrid down with complex renderers.
- Not Preparing for Offline Applications.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
发表评论
-
flex lcds 的日志配置
2009-06-16 17:26 1773Server-side logging <!-- ... -
PopUpManager--createPopUp与addPopUp区别
2009-06-07 00:38 2085Java代码 <?xml vers ... -
how to use flex layouts
2009-06-06 21:27 2030当 我们新建一个flex应 ... -
Flex 3:Feature Introductions: Runtime Localization
2009-02-08 15:41 3940Runtime Localization Gordon Smi ... -
flex 装载多个module出现的问题
2009-02-02 23:24 3415TypeError: Error #1034: 强制转换类型失 ... -
Flash trace panel
2009-01-15 22:50 1584今天晚上下载了flash trace panel,调试flas ... -
一个简单的FLEX画图demo
2009-01-14 08:42 7518虽然只能画简单的矩形和线段,不过还是很有意思的。 http ... -
43 Hot Flex and ActionScript 3.0 APIs, tips
2009-01-14 08:21 2369Autumn is here again and it’s t ... -
flex与java集成开发及遇到问题的解决办法
2009-01-14 08:07 2783一、开发环境:eclipse3 ... -
Flex与Spring集成中遇到的问题
2009-01-11 21:36 9051.前几天的项目都搭在公司的机器上, flex build p ... -
一些Flex开源项目的整理
2009-01-06 09:03 947Adobe APIs 主要包含corelib, mappr, ... -
FLEX HTTPService vs RemoteObject
2009-01-06 08:38 4184zz from xxxx 仅供参考!!! 1.Remot ... -
使用Flash,Flex Builder和AS3创建自适应的用户界
2009-01-04 20:24 3105一、概述 1.1 关于作者 J ... -
Stop using mx.transitions.Tween
2009-01-04 20:07 1505zz from:http://www.psyked.co.uk ... -
FLEX 点点滴滴
2008-12-28 12:01 969ViewStack: A ViewStack naviga ... -
flex urls
2008-12-28 00:32 1200http://blog.csdn.net/Baijinwen ... -
初试FLEX Store中遇到的问题
2008-12-28 00:22 1476剛開始研究了一下Flex,看到FlexStore,感覺不錯 ...
相关推荐
python学习资源
jfinal-undertow 用于开发、部署由 jfinal 开发的 web 项目
基于Andorid的音乐播放器项目设计(国外开源)实现源码,主要针对计算机相关专业的正在做毕设的学生和需要项目实战练习的学习者,也可作为课程设计、期末大作业。
python学习资源
python学习资源
python学习一些项目和资源
【毕业设计】java-springboot+vue家具销售平台实现源码(完整前后端+mysql+说明文档+LunW).zip
HTML+CSS+JavaScarip开发的前端网页源代码
python学习资源
【毕业设计】java-springboot-vue健身房信息管理系统源码(完整前后端+mysql+说明文档+LunW).zip
成绩管理系统C/Go。大学生期末小作业,指针实现,C语言版本(ANSI C)和Go语言版本
1_基于大数据的智能菜品个性化推荐与点餐系统的设计与实现.docx
【毕业设计】java-springboot-vue交流互动平台实现源码(完整前后端+mysql+说明文档+LunW).zip
内容概要:本文主要探讨了在高并发情况下如何设计并优化火车票秒杀系统,确保系统的高性能与稳定性。通过对比分析三种库存管理模式(下单减库存、支付减库存、预扣库存),强调了预扣库存结合本地缓存及远程Redis统一库存的优势,同时介绍了如何利用Nginx的加权轮询策略、MQ消息队列异步处理等方式降低系统压力,保障交易完整性和数据一致性,防止超卖现象。 适用人群:具有一定互联网应用开发经验的研发人员和技术管理人员。 使用场景及目标:适用于电商、票务等行业需要处理大量瞬时并发请求的业务场景。其目标在于通过合理的架构规划,实现在高峰期保持平台的稳定运行,保证用户体验的同时最大化销售额。 其他说明:文中提及的技术细节如Epoll I/O多路复用模型以及分布式系统中的容错措施等内容,对于深入理解大规模并发系统的构建有着重要指导意义。
基于 OpenCV 和 PyTorch 的深度车牌识别
【毕业设计-java】springboot-vue教学资料管理系统实现源码(完整前后端+mysql+说明文档+LunW).zip
此数据集包含有关出租车行程的详细信息,包括乘客人数、行程距离、付款类型、车费金额和行程时长。它可用于各种数据分析和机器学习应用程序,例如票价预测和乘车模式分析。
把代码放到Word中,通过开发工具——Visual Basic——插入模块,粘贴在里在,把在硅基流动中申请的API放到VBA代码中。在Word中,选择一个问题,运行这个DeepSeekV3的宏就可以实现在线问答
【毕业设计】java-springboot+vue机动车号牌管理系统实现源码(完整前后端+mysql+说明文档+LunW).zip
【毕业设计】java-springboot-vue交通管理在线服务系统的开发源码(完整前后端+mysql+说明文档+LunW).zip