Accessibility
Flex 3 in Action

Tariq Ahmed et al.

manning.com/ahmed/

Created:
26 May 2009
User Level:
Intermediate
Products:
Flex

Flex 3 in Action book excerpt: Advanced reusability in Flex

What is reusability? We use the term loosely to mean ways you can reuse chunks of code either in the same application or across multiple applications. The concept of reusability isn't unique to Flex; each language provides mechanisms to achieve it. The more you're able to reuse, the faster you can develop new applications by leveraging existing code. From a maintenance perspective, you can achieve faster turnaround time when implementing changes. With Flex, reusability can also result in improved performance.

Previous chapters have covered common reusability techniques, including using custom classes and custom components. One of the advanced reusability features is the runtime shared library (RSL). By the end of this chapter, you'll have a strong starting point to understanding what RSLs are as well as Flex's additional reuse capabilities.

A Flex application (which is compiled to a SWF file) can include several kinds of advanced elements: SWC files, RSLs, and modules.

Leveraging these pieces will enable your applications to load quickly and will make them easy to maintain in the long run. You'll learn what each of these elements means for you and how to utilize them in your Flex 3 development.

Pros and cons of a module

Pros and cons of a module

This chapter covers the following topics:

  • Running shared libraries
  • Shared reusability
  • The Module API
  • Adding patches
  • Refactoring

This article is based on Flex 3 in Action, published January 2009. It is being reproduced here by permission from Manning Publications. Manning early access books and ebooks are sold exclusively through Manning. Visit the book's page for more information.

Prerequisites

Knowledge of Flex.

Requirements

In order to make the most of this article, you need the following software and files:

Flex Builder 3

Read the complete chapter

Chapter 18: Advanced reusabiltiy in Flex (PDF, 302KB)

About the author

Tariq Ahmed is an accomplished web application pioneer having introduced next generation web technologies to companies such as Bell Canada and REUTERS. He and Jon Hirschi were first to introduce eBay to Adobe Flex which later proliferated to other teams. As an Adobe Flex Community Expert, Tariq has been evangelizing the technology and supporting the community through various projects and is particularly known for his Community Flex (CFLEX.Net) site. Tariq is the Manager of Product Development at Amcom Technology.

Jon Hirschi has been innovating with Flex since its first version. As an Adobe Flex Community Expert, he's been sharing his expert-level knowledge through his personal blog, technology magazine articles, and user groups. Jon was also involved in not only the introduction of Flex at eBay, but also in the continuance of it via a cutting-edge command center that allows eBay to manage its servers.

Faisal Abid is a software engineering student in Toronto, Canada and runs his own RIA consulting company (G-uniX Technologies). He's written RIA solutions for various clients including internet startups Buzzspot and RazorCom. Faisal's community involvement includes numerous articles for magazines, and he is known for his experiments with technology.