|
|
||
|
|
||
|
|
||
Macromedia Flex is an alternative means of creating Flash applications. It is a presentation server that is installed on a web server. At the time of writing, Flex was only available for Suns Java 2 Enterprise Edition (J2EE) application servers.
Flex includes a library of components and uses
Macromedias Maximum Experience Markup Language
(MXML), an XML-based language to describe the interface for an
application with ActionScript. MXML lays out the visual components
and defines aspects like data sources and data bindings. You can
also extend MXML with custom
You write the MXML in XML files using a text or XML editor. You can also use Macromedias Flex Builder. Each MXML file must end with the file extension .mxml . Learning about XML will help you to use Flex to create applications.
I havent covered Flex in this book as it could be an entire book in its own right. You can find out more about it at www.macromedia.com/software/flex/.
|
|
||
|
|
||
|
|
||
In this chapter, I covered a brief introduction to Flash and
XML. I
In the
|
|
||
|
|
||
|
|
||
If you work in the web design or development area,
youve probably
XML is
This chapter introduces you to XML. It explains some of the
basic concepts, including the rules
Ill expand on the concepts covered here in Chapter 3, where well look at using an XML editor and creating XML content with Office 2003. Ill also look at some related topicsdefining XML document rules with schemas and changing the appearance of XML documents with transformations.
|
|
||
|
|
||
|
|
||
Lets start by answering the most basic question: What is XML?
The World Wide Web Consortium (W3C) provides the following definition for XML in their glossary at www.w3.org/TR/DOM-Level-2-Core/glossary.html:
Extensible Markup Language (XML) is an extremely simple
dialect of SGML. The goal is to enable generic SGML to beserved , received, andprocessed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.
As you can see from this definition, its
very difficult to explain XML in a single
XML is not a markup language like HTML. It is a
Groups have created their own languages based on XML. This allows them to share information specific to their industry or area of expertise using a common set of markup tags and structures.
One example, Chemical Markup Language (CML), allows scientists to share molecular information in a standardized way. There are specific rules for structuring CML documents and referring to molecular information. MathML is another example of a standard language using XML. XML documents can use MathML to describe mathematical operations.
Extensible HTML (XHTML) is an example that is probably more familiar to you. XHTML was created when HTML was rewritten according to XML rules.
Think about the tags you use in XHTML <p></p> , <h1></h1> . These tags mark up information on a web page, and you use them in a specific way, according to some predefined rules. For instance, one rule says that you cant include <p></p> tags in the <head> section of a web page.
Being familiar with these rules means that you can
By itself, XML doesnt do anything other than
store information. Its not a programming
language in its own right. XML documents need
XML documents work best with structured information such as
This concept is a little easier to explore with an example. Most
of us have a phone book that we use to store contact information
for our
Your phone book contains many different names but you store the
same information about each contact their
Transferring the information to a new software program is likely to be difficult. Youd have to export it from the first package, rearrange the contents to suit the second package, and then import the data. Most software applications dont share a standard format for contact data, although some can talk to each other. You have to rely on the standards created by each company.
As an alternative, you can use XML to store the information. You create your own tag names to describe the data; tags like <contact> , <phone> , and <address> provide clear descriptions for your information. Anyone else who looks at the file will be able to understand what information you are storing.
Because your phone book XML document is in a standard format, you can display the details on a web page. Web browsers contain an XML parser to process the XML content. You can also print out your contacts or even build a Flash movie to display and manage your contacts.
Your friends could agree on which tags to use and share their
address books with each other. You can all save your contacts in
the same place and use tags to determine who has