Chapter 1. Getting started

 

In this chapter, you’ll learn how to get Flex 4 and how to build a few basic Flex 4 apps. Your goal is to grasp the basic structure and syntax of a Flex 4 application. We’ll also explore a high-level picture of the Flex 4 ecosystem.

Why Flex 4?

Chances are you already know why you want to use Flex, so I won’t bore you. In case you don’t, what follows is the one-paragraph version.

Flex 4 is a sexy framework that lets you write code that feels more like coding a desktop application—except it runs inside the Flash Player. Because it targets the Flash Player, you can build new rich Internet applications (RIAs) without worrying about browser compatibility nonsense, JavaScript, CSS, and so on. Because Flex 4 targets one platform (Flash 10), you don’t have to worry about platform compatibility issues. The write once, run anywhere (WORA) dream that client-side Java programmers had—before it turned into write once, debug everywhere—can finally be realized, but with Flex. Flex achieves what previous technologies such as Java applets failed miserably in attempting: applications that feel like desktop applications but that run inside any modern web browser on Windows and Mac. We can use Flex 4 to build RIAs today that look and feel more like Web 3.0 than many of the “me too [point oh]” sites you see copying 37signals and each other today.

Flex 4 overview

Session 1. Hello! Flex

Session 2. Dispatching and listening for events

Session 3. The Bindable annotation and data binding

Session 4. Flex application structure overview

Session 5. Spark, Halo, and Flex 4 namespaces