
23
CHAPTER 2
Using MXML
MXML is an XML language that you use to lay out user-interface components for Macromedia
Flex applications. You also use MXML to declaratively define nonvisual aspects of an application,
such as access to server-side data sources and data bindings between user-interface components
and server-side data sources. This chapter describes MXML and how you use MXML to develop
Flex applications.
Contents
About MXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Basic MXML syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
How MXML relates to standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
About MXML
You use two languages to write Flex applications: MXML and ActionScript. MXML is an XML
markup language that you use to lay out user-interface components. You also use MXML to
declaratively define nonvisual aspects of an application, such as access to data sources on the
server and data bindings between user-interface components and data sources on the server.
ActionScript is an object-oriented programming language, based on the ECMAScript Edition 4
proposal, which you use to write programmatic logic for responding to both user-initiated and
system-initiated events at runtime.
Like HTML, MXML provides tags that define user interfaces. MXML will seem very familiar if
you have worked with HTML. However, MXML is more structured than HTML, and it provides
a much richer tag set. For example, MXML includes tags for visual components such as data
grids, trees, tab navigators, accordions, and menus, as well as nonvisual components that provide
web service connections, data binding, and animation effects. You can also extend MXML with
custom components that you reference as MXML tags.
One of the biggest differences between MXML and HTML is that MXML-defined applications
are compiled into SWF files and rendered by Macromedia Flash Player, providing a richer and
more dynamic user interface than page-based HTML applications do.
MXML does not use concepts specific to Flash, such as the timeline. However, you can use the
Flash authoring environment to create or modify components for use in Flex.
Содержание FLEX-GETTING STARTED WITH FLEX
Страница 1: ...Getting Started with Flex...
Страница 4: ...4 Contents...
Страница 22: ...22 Chapter 1 Introducing Flex...