In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shares with you the content of a sample analysis of Flex4beta architecture changes. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Overview of Flex4beta Architecture changes
One of the important themes of Flex4beta is "Design with heart". This goal involves creating a smoother workflow between designers and developers. To help achieve this, the framework clearly separates the visual part of the component from its remaining behavior. In Flex3, the code of a component includes logic centered on its behavior, layout, and visual changes. In Flex4beta, components are divided into classes, each of which is responsible for handling specific behaviors.
The instructions in the ◆ Gumbo schema document * are as follows:
"the main component class, that is, the class whose name matches the component's MXML signature, encapsulates the core behavior of the component. This includes defining the events scheduled by the component, the data represented by the component, connecting to any subcomponents that are part of the main component, and managing and tracking the state of the internal components (which we will discuss in more detail later).
The corresponding component class is an appearance class that manages everything related to the visual appearance of the component, including graphics, layout, presentation data, changing skins in different states, and transitioning from one state to another. In the Halo model, Flex component skins are resources that are only responsible for a graphical part of the component. Changing any other aspect of the component's appearance, such as layout or state visualization, requires subclassing the component and editing the ActionScript code directly. In the Gumbo model, all of this is defined declaratively in the appearance class, mainly through a new graphic tag called the FXG tag. "
To learn more about the new graphic labels in Flex4beta, you can read the FXG1.0 specification *.
As an example of the above architecture, you can refer to the code of the spark.components.Button class. This class contains only logic centered on the behavior of the component. Define all the visual parts of this evil component in the facade class spark.skins.default.ButtonSkin.
For performance reasons, Flex4beta provides building blocks for developers to choose functionality according to their needs. By default, turn off heavyweight features that are not required by all applications, such as scrolling and virtualization.
Namespaces and packages in ◆ Flex4beta
While leaving the Flex3 classes intact in the same mx.* package, Flex4beta introduced spark.* packages for components, core classes, effects, filters, layouts, primitives, skins, and utils.
Flex4beta provides a new set of components and effects that share many of the same class names as Flex3 components. To avoid name conflicts in MXML, Flex4beta comes with four unique namespaces: MXML2006, MXML2009, Spark, and Halo.
MXML2006:
The older MXML language namespace used in previous versions of Flex. Flex3 applications compiled with Flex4beta can continue to use this namespace.
URI: http://www.adobe.com/2006/mxml
Default prefix: mx
MXML2009:
The new MXML language namespace. This is purely a language namespace and does not contain component tags.
URI: http://ns.adobe.com/mxml/2009
Default prefix: fx
Spark:
This namespace contains all the new Spark components. It should be used with the MXML2009 language namespace.
URI:library://ns.adobe.com/flex/spark
Default prefix: s
Halo:
This namespace contains all the Halo components. It should be used with the MXML2009 language namespace.
URI:library://ns.adobe.com/flex/halo
Default prefix: mx
The following is a concise example of creating a simple Flex4beta application using the MXML2009, Spark, and Halo namespaces. It uses a HaloDateChooser and a SparkButton.
Flex4beta also adds multiple namespaces support to CSS. If you use MXML2009, Spark, and Halo namespaces with font selectors, you need to define a set of namespaces in the CSS definition to avoid name conflicts.
The following is an example of CSS that uses a font selector for Halo and Spark components:
@ namespaces "library://ns.adobe.com/flex/spark"; @ namespacemx "library://ns.adobe.com/flex/halo"; s | Button {color:#FF0000;} mx | DateChooser {color:#FF0000;}
◆ default Property and Declarations tags
Before the release of Flex4beta, the Flex language allowed the Application root tag to contain both visual and non-visual children. The visual child is added to the Application with addChild (), and the non-visual child is declared as an attribute. Subsequently, a non-visual child that represents a new property declaration cannot be a direct child of Application. You can add these non-visual children to the label. This includes non-visual children such as effects, validators, formatters, data declarations, and RPC classes. The following is a short example:
Thank you for reading! This is the end of this article on "sample Analysis of Flex4beta Architecture changes". 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.