WEBDEV Concepts
Part 4: Advanced concepts 121 UML models in practice 1 Overview The main objective of a development team is to create optimized applications, capable of satisfying the ever-changing needs of their users. Modeling an application defines the structure and the expected behavior of a system. It helps understand its organization and detect simplification and reuse opportunities as well as manage potential risks. A model is a simplification of reality. It allows you to better understand the system to develop. A diagram is the graphical representation of a set of elements that build a system. To view the system from different perspectives, the Unified Modeling Language (UML) defines nine different diagrams. Each diagram represents a system state. WINDEV, WEBDEV and WINDEV Mobile allow you to create the following nine types of UML models: • Class diagram, • Use case diagram, • Object diagram, • Component diagram, • Activity diagram, • Sequence diagram, • Collaboration diagram, • State-transition diagram, • Deployment diagram. This chapter only provides an overview of UML. For more information about UML, see the specific documentation. 2 Types of UML diagrams 2.1 Class diagram A class diagram describes the structure of a system via classes and the relationships among them. Class diagrams are the most common diagrams in object-oriented systems modeling. For example, the following diagram presents the management of stocks: A class diagram includes the following elements: • Class : represents the application structures. Each class is divided into three compartments: • the name of the class indicates what the class is, not what it does. • the attributes of the class determine the class characteristics. • the class operations represent the actions the class can execute. For example, the Inventory class contains the ProductList attribute. This class also groups the AddProduct andDeleteProduct operations. These operations can be applied to the class instances. Remark : UML provides three visibility levels for attributes and operations: • Public : the element is visible to all other classes. • Protected : the element is visible to the class and its subclasses. • Private : the element is visible to the class only.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==