After you have captured the application requirements, you design (in the object-oriented sense of the term) and implement your application in the same way you would using another object-oriented programming (OOP) language.You build a Flex application, like any other object-oriented application, by assembling classes. An important task at this stage of the development life cycle is to identify the classes in your system. In this process, it’s a good idea to embrace proven design patterns—such as the MVC architecture —to promote the overall maintainability of your application and the reusability of your classes. Using the MVC architecture, partition your system into three categories of classes:
Figure 2 shows a high-level UML class diagram for the Flex Store application. In this diagram, the Model classes are yellow, the View classes are green, and the controller classes are orange.
Figure 2. The UML class diagram for the Flex Store application.
One of the traditional advantages of application partitioning is that you avoid duplicating code and you increase the reusability of application components. For example, ThumbnailView and GridView provide two different ways to look at the same data without duplicating code in the Model logic. Similarly, the CartView class represents one way to display the contents of a shopping cart. You could easily create another view of the shopping cart data without duplicating the shopping cart Model logic.