Chapter 4. Understanding the Flex Application Development Process

IN THIS CHAPTER

  • Working with packages and classes

  • MXML and ActionScript

  • Understanding events in Flex

  • Data providers

  • Working with item renderers

  • Building a sample Flex application

In this chapter, you learn how to develop Flex applications by using Flex Builder. You learn how to set up and use classes and packages while also learning how to use a mixture of MXML and ActionScript.

The last part of the chapter takes you through the process of building a basic application to make sure that you understand the fundamentals before moving on to other chapters that involve the Flex development process.

Working with Packages and Classes

Unless this is your first time using Flex, you've probably worked with ActionScript classes at some point. However, you may not have built your own custom classes; this is explained in the following section.

Packages

A package is a bundle of classes that function in one easy-to-use container. Packages are common in class-based development because they add another level of separation for your code. Packages allow you to share pieces of classes without also exposing that content to foreign code.

The most common way to determine a path for a package definition is to use reverse domain format. Let's say you have a class Person located in your project. The reverse domain format takes your Web domain, and starting with the com, you define the package path, as in the following example:

com.example.people.Person ...

Get Java® and Flex® Integration Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.