O'Reilly logo

Enterprise Development with Flex by Yakov Fain, Anatole Tartakovsky, Victor Rasputnis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Modules, Libraries, Applications, and Portals

Before software can be reusable, it first has to be usable.

Ralph Johnson

Flex Portals and Modularization

For many people, the word “portal” stands for content personalization, as in Yahoo! or iGoogle. In the enterprise world, portals are mainly about content aggregation. HTML portals consist of pieces wrapped into HTML tags; Flex portals aggregate Flex applications or modules into a bigger Flex application. Quite naturally, aggregation does not exist without modularization. After all, while developing any decent size application, we tend to break it into smaller, relatively independent parts.

Such intervening of aggregation and modularization determines the layout of this chapter. You’ll start with image loading as the nucleus of Flex modularization, and then progress to Flex modules and subapplications. You’ll learn how to use such classes as Loader and URLLoader and how they deal with style modules and code modules.

This chapter will suggest an approach of creating custom Flex portals that load and communicate with independently built and compiled subapplications: portlets. Finally, you will learn how to integrate existing Flex application as legacy portlets in a JSR 168 portal.

Basic Modularization: Image

The essence of Flex application modularization is dynamic loading of the byte code.

Consider the following two lines of code:

<mx:Image source="@Embed('assets/logo.png')"/>
<mx:Image source="assets/logo.png"/>

The first line illustrates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required