In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you what you need to pay attention to when developing Flex. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Summary of Flex Development experience
Compared with the development environment of Flash, the component library provided by Flex development is indeed very attractive, but the function is too comprehensive, resulting in the large size of the program, sometimes improper use, which may affect the efficiency of the program.
In the Flex help manual, there is a special chapter on program optimization. Here are some Flex development summaries I made with help:
1. Avoid multi-level nesting of containers and reduce the use of relative size and relative positioning.
When the percentage is used to size the components in the container, once the position and size of any component in the container changes, it will cause the container to relocate all its children. If the level of nesting is very deep, the amount of computation will be very large.
2. Try to use lightweight containers
Canvas is the smallest container and only supports absolute positioning. In many cases, you can use it instead of HBOx and VBox. In addition, Canvas is also a * for us to write custom container-based components. It has the basic functions of a container and is conducive to expansion.
3. Avoid using large components, such as DataGrid and AdvancedDataGrid
Large subcomponents are powerful, but they are also very expensive. Because of the complexity of function, the implementation of skin, style and itemRenderer is particularly complex.
4. Use paging when dealing with data
When using data type controls, minimize the amount of data displayed at one time. TileList, for example, creates all the data at once, whether it needs to be displayed or not, which is a waste of resources. When dealing with components, ViewStack, TabNavigator, etc., are not created at once, as long as the components are displayed * * times, so as to avoid unnecessary overhead.
5. SetStyle and styleName
The skins of Flex development components are visual components, and when the component initializes itself, it will use the current style such as styleName to complete the drawing of all skin components. If we modify the style of the component through setStyle during the run time, the size and location of the component will be adjusted accordingly. When it comes to the * * section, there will also be a large amount of computation if the component is located in a deep container.
Thank you for reading! This is the end of this article on "what problems you need to pay attention to when developing Flex". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.