Although some Flex applications use data more extensively than others, nearly all use data to some extent. The Flex SDK is a robust set of tools for working with data. This chapter examines how to work with data on the client side without an extensive discussion of client-server data communication, which is covered in Chapter 16. Rather, this chapter focuses primarily on the following topics: modeling data and data binding.
When working with data, you generally want to store it in some sort of data repository within memory. These repositories are known as data models. In the first section of this chapter, we'll look at each of the three basic ways to store data in data models.
You can use ActionScript for all your data management needs, but then you're not really using the power of the Flex framework. To simplify linking data from a data model to a control or from one control to another control or component, you can use a powerful feature called data binding.
Once you know the basics of working with data in a Flex application, you'll have a foundation for sending and receiving data. That topic is discussed further in Chapter 16.
You can work with data in many ways in Flex applications, including as low-level ActionScript solutions and high-level MXML solutions; this section looks at both techniques. You can use these data models as a repository for data retrieved from a remote procedure call (RPC) such as a web service method call. You ...