Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the misunderstandings in building Flex applications

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you about the misunderstandings of building Flex applications, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

1. Use the RIA framework to build Web1.0 applications (new technologies change).

One of the challenges in the transition from Web 1. 0 to RIA comes from a shift in the way you think. Flex gives developers an advanced component library that allows them to accomplish many tasks that were previously impossible. But in many cases, this ability of Flex is overlooked, and it is only used to implement more traditional Web 1.0 applications.

Building Web 2.0 applications means more than just local refreshing and rotating rounded corners of the page. For example, Flex developers should use vector graphics to provide users with a visual representation of data and advanced control over the flow of rich applications. Stephan Janssen recently discussed the topic with InfoQ.com:

As a Java developer, learning object-oriented ActionScript and UI markup languages is a piece of cake. But the real challenge for (Java) developers is that we are not designers, and these two technologies are essential for RIA.

two。 Break the standard browser experience

While Flex does provide an excellent platform to improve the user experience, it is also important to maintain user habits such as back buttons, bookmarks, and autocompletion.

Flex 3 includes a new deep link feature to support back buttons and bookmarks. You can visit labs.adobe.com to learn more. There are many components that can be done automatically. You can use the AutoComplete Input component from Adobe Exchange.

3. Using too many containers causes Flex applications to slow down

Flash Player uses a hierarchical object graph, which is similar to HTML's document object Model (DOM). The deeper the nesting of the container, the longer it takes to render. There is an article in Adobe's Flex developer Center that discusses * practices on Flex performance, including details on the use of containers:

The performance risk of Flex*** comes from the misuse of containers. Nesting too many containers can affect the performance of the application. This is the most serious performance risk faced by Flex developers-but fortunately, it can be completely avoided.

4. Using XML instead of other more optimized protocols causes Flex applications to slow down

Flex provides developers with a variety of options for data transfer between Flex clients and servers, including AMF3, XML, SOAP, and direct HTTP requests. Ward describes the use and performance of these technologies in his census application.

For new projects that use Java at the back end, you should consider BlazeDS. BlazeDS is a recent open source data service product of Adobe, which uses the AMF3 protocol. AMF is a binary transport protocol, which is easy to integrate with Java, and its performance is better than XML. There are AMF open source implementations for all major back-end technologies.

If you do not choose BlazeDS, then you can also choose Hessian. Hessian provides ActionScript/Flex support for the binary web services protocol.

5. Trying to hire Flex developers

It's hard to find experienced Flex developers these days. Flex is now in the same position as Java in the 1990s. Flex developers are already in short supply. This makes it difficult to find experienced Flex developers. However, this creates a good opportunity for Java developers to expand their skills and work on an emerging and interesting technology. Many companies looking for Flex developers have conducted several weeks of Flex training for Java or other web developers directly, and have been very successful. For developers familiar with Web and GUI programming, learning the Flex language and APIs is easy.

6. Overuse of special effects

Developers can easily add special effects through Flash. But make sure the special effects are meaningful and match the context. Otherwise, they will only disgust users. The timing of special effects is also important. The interaction designer can help us decide when we should use special effects and when we should not. The interaction designer can also recommend special effects types, intervals, and the most simplified features for us.

There is a good article on the use of special effects on laair.org:

Most of the special effects are simply too long. They are not only long, but also slow and even offensive. turn it off. If something like this happens to me, I will turn around and leave, because I really hate this kind of waiting.

Don't get me wrong. I'm not against special effects. I just object to special effects that are too long or too much for the purpose. Each special effect can be broken down according to its purpose. Find the purpose of the special effect you want, and then use it.

7. There is no enterprise ecosystem.

Just like any other software project, it's important to build an enterprise ecosystem for your Flex application.

Test driven Development (TDD) is currently the solution for most enterprise projects. For Flex, the FlexUnit framework can be used to write unit tests. On Adobe's developer network, Neil Webb discussed the use of TDD and FlexUnit for Flex developers. In addition, Flexcover can be used to measure code coverage.

When multiple developers work together, continuous integration (Continuous Integration) has proved to be a good practice. Similar to Java applications, there are Ant and Maven plug-ins for continuous integration of your Flex applications.

8. Did not use the entire framework

There are a number of optional features in Adobe Flex, and you should consider using them in your Flex application. For example, the runtime shared library (Runtime Shared Libraries, or RSL) can be used to reduce the size of the application.

You can integrate shared resources into separate files so that they can be downloaded and cached separately on the client side, reducing the size of SWF files generated by the application. Many Flex applications can load these shared resources at run time, but each client only needs to download it once. These shared resources are called runtime shared libraries (Runtime Shared Libraries).

Another feature of the framework is built-in accessibility. You can learn more about the accessibility of Adobe through the Flex online documentation. In addition to built-in accessibility, the framework also provides built-in support for localization. Please visit the Adobe novice on the road to learn about the Flex3 framework features of *.

9. Using a complex renderer slows down DateGrid

ItemRenderer for DataGrid out of the box has been well optimized. Misunderstanding # 3 discusses the performance of containers that are too deeply nested. There is one local side in Flex that can easily lead to deep nesting of containers, and that is DataGrid's item renderer. The number of item renderers rendered by DataGrid is equal to the number of visible rows multiplied by the number of visible columns. The custom DataGrid and List item renderers should be very well optimized. When you need to use complex layout logic in the item renderer, * uses UIComponent (or other underlying classes) and manually locates the contents of the cell.

10. Not ready for offline application

The traditional model of RIAs is the browser. However, technologies like Adobe AIR and Google Gears allow applications to run offline. If users need to be able to pair applications offline and you are not ready, it will be extremely difficult to change your application to support offline features. Typically, in web applications, business logic exists on the server side. In an offline RIAs, the business logic must go to the client. In order to make the application support both offline and online, it is necessary to determine the location of some business logic in advance.

These are all the contents of this article entitled "what are the misunderstandings in building Flex applications?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report