Component Diagrams in UML

Case Study—Courseware Management System

From our above discussion of the Component diagram, we will apply the criteria for identifying components to the Courseware Management System. In the first instance, the application may seem to be too simplistic to contain components. But wait! The Courseware Management System has its own share of components, some implicit in the design.

Before we move to identifying the components, let us recap a quick discussion that we had regarding the Model View Controller architecture in the UML Class Diagram Part II article. In this article we had mentioned that the different classes in the class diagram can be partitioned along the lines of the three layers of this architecture viz. Model, View, and Controller. This partitioning of the different classes of the application poses its own challenges, the primary one being how do the classes in one layer interact with the classes in the other layers. Let us elaborate this by reviewing the classes in the Courseware Management System.

Identifying Components in the Courseware Management System

The different classes that we have modeled for the Courseware Management System, such as CourseAdministrator, Course, Topic, CourseCalendar, and Student that fall in the Model layer need to provide a consistent interface to enable other classes and components to interact with them and utilize their services. We can as well define our own set of simple interface methods to access these services. But, to enable our application components to be used by external applications, we can consider basing the components on well-defined component standards.

Hence, based on the technology that you use, you would model these as, maybe Enterprise JavaBeans (EJBs) or Component Object Model/Distributed Component Object Model (COM/DCOM) components. EJB and COM/DCOM are nothing but industry-standard component models that you can base your application component design on. This becomes the "physical" implementation of the logical class diagram. An added advantage of basing your application components on these component models is that your components become "reusable!"

Component Diagram

Figure 2 shows the Component diagram for the Model layer of the Courseware Management System. The diagram shows the different components, such as CourseAdministrator, Course, Topic, Tutor, and so forth in the Model layer and how the Controller layer component interacts with these components. The diagram also depicts a database access component that represents a library component that the Model layer components will use to interact with a database.

Summary

In this article, we briefly discussed Component diagrams. In the next article, we will cover the last UML diagram—the Deployment diagram.

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.