Before software can be reusable, it first has to be usable.
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
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.
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 ...