Chapter 9. Application Components

As the scope of your applications grows, sooner or later you will need a better way to organize all their different components. One principle that is known to be effective in this task is the component-based development principle.

This chapter focuses on application components. Application components are logically modular elements (not to be confused with Flex modules) within an application that you typically define using MXML and that behave in a manner similar to the components we have been exposed to throughout this book.

Component-based development allows a developer to divide an application into components. Doing so provides several benefits:

  • It helps to promote many object-oriented design principles, including code reuse, loose coupling, encapsulation, and reduced bugs.

  • It allows you to simplify a large problem into smaller ones.

  • It allows different team members to focus on their own components, which allows teams to be more efficient.

Traditionally when developers think of components, they think of prepackaged components that have been developed by a third party. In component-based development, third-party components are important, but so are user-developed components. Instead of allowing application development using just third-party components, an effective component-based development platform should allow you to mix third-party and user-developed components. In earlier chapters, we discussed how Flex and MXML allow rapid application development ...

Get Programming Flex 3 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.