Object-Oriented Design

Source: Internet
Author: User
Tags relational database table
The task of object-oriented design is to further standardize the results of object-oriented analysis, so that it can be accepted directly by object-oriented programming. ConceptObject-Oriented Design is a software design method and a project-based specification. There is no doubt. The main work of object-oriented design includes:-determining the required classes;-providing a complete set of operations for each class;-explicitly using inheritance to express commonalities. In summary, object-oriented design is "determining the operations of classes and classes as required, and the process of association between classes ". From Object-Oriented Analysis to object-oriented design is a process of gradually expanding the model. Object-Oriented Analysis is centered on actual problems, so that no matter what issues are related to software implementation, the main consideration is "what to do; object-oriented design is an actual development activity for software implementation. It mainly considers how to do it. The objective of object-oriented design is to manage the interdependencies between various components in the program. In order to achieve this goal, the object-oriented design requires that the program be divided into blocks. The size of each block should be smaller than the management level, and then each block is hidden behind the interface, allow them to communicate with each other only through interfaces. For example, if you use an object-oriented design method to design a client-server application, there should be no direct dependency between the server and client, instead, the server interface and client interface should be mutually dependent. Such dependency conversion makes all parts of the system reusable. In the above example, the client does not have to rely on a specific server, so it can be reused in other environments. To reuse a program block, you only need to implement the required interface. Object-oriented design is an abstract design paradigm that solves software problems. With the design paradigm such as Ood, we can use objects to express entities in the problem field. Each object has its own State and behavior. Object-oriented design is an abstract paradigm. abstraction can be divided into many layers, from very general to very special, and objects may be at no matter what abstraction level. In addition, objects that are different from each other but are associated with each other can form an Abstract: they can be processed as objects of the same class only if they are similar. PrinciplesThe main principles of object-oriented design are as follows. 1. ModularizationThe object-oriented development method naturally supports the design principle of decomposing the system into modules: the object is the module. It is a module that closely integrates the data structure and the methods used to operate the data. 2. AbstractionThe object-oriented method not only supports process abstraction, but also supports data abstraction. 3. Information HidingIn object-oriented methods, information hiding is achieved through object encapsulation. 4. Low CouplingObjects are the most important modules in object-oriented methods. Therefore, coupling mainly refers to the closeness of different objects. Low coupling is an important design standard, which helps minimize the impact of changes in a part of the system on other parts. 5. High Cohesion-Operation Cohesion. -Class cohesion. -General-detailed cohesion. TaskThe main tasks of object-oriented design are as follows. 1. refinement of object definition specificationsFor the objects and classes abstracted by Object Oriented Analysis and the collected analysis documents, object oriented design requires a process of arrangement and refinement according to the design requirements, it can better meet the needs of object-oriented programming. This sorting and refinement process mainly involves two aspects: first, we should organize and analyze the determined object structure, attributes, methods, and other content based on the object-oriented conceptual model to correct the incorrect content, delete unnecessary and repeated content. The second is to sort the data in order to facilitate the Needs of the database design and program processing module design in the next step. The sorting method is mainly to classify classes, objects, attributes, methods, structures, and themes. 2. Data Model and database designThe design of the data model requires determining the class, the content of the object attribute, the method of message connection, the system issue, and the method of data model. Finally, the data of each object instance must be implemented in the object-oriented database structure model. 3. OptimizationThe Optimization Design Process of object-oriented design is to organize and summarize the analysis results and processing business processes from another perspective, and optimize, abstract, and integrate objects and structures. The Modular Representation of objects and structures provides a paradigm for object-oriented design, which supports the modularization of classes and structures. Such a module meets all the features required by General modularization, such as good information concealment, strong degree of internal polymerization and weak coupling between modules. Integration enables the combination of individual components to support each other. PhaseObject-Oriented Design is divided into two stages: high-level design and low-level design. The structure of the development system in the high-level design stage, and the overall software model is constructed. In this phase, we should identify the concepts required to solve the problem in a detailed computer environment and add? A group of required classes, including those that can make the software system interact with the external world. The outputs at the high-level design stage are the relationships between classes and classes that are suitable for application software requirements, and view specifications of application subsystems. Figure 6-13 illustrates the general structure of the system for Object-Oriented Design and export. In the process of high-level design, the communication between the high-level components of the subsystem should be minimized, and classes with high interaction between subsystems should be divided into the same group. The lower-layer design focuses on the specific design stage of the class. The goal of class design is to form a model of a single concept (that is, a concept is represented by an independent class), and the design components should be reusable and reliable. In the design process of the class, it is necessary to use the design principles of information hiding, high cohesion and low coupling. Repeated use of existing classes is one of the main advantages of object-oriented technology. Figure 6-13 object-oriented design and Export System Structure Procedures and proceduresIn the design phase, Coad and Yourdon continue to use the five layers (objects and classes, structures, attributes, services, and themes) mentioned in the object-oriented analysis phase ), this facilitates the natural transition from analysis to design. Based on the object-oriented design methods of Coad and Yourdon, the main task in the design phase is to use these five layers to establish four components of the system, this is the problem area, user interface, task management, and data management. 1. problem areasThe problem field includes all the classes and objects that are directly related to the application problems we face. In fact, in the object-oriented analysis stage, we have started to analyze the problem field. At this time, you need to further refine it. The application-related conceptual model is obtained through object-oriented analysis. The conceptual model should be improved and supplemented by object-oriented design. The class and object, structure, attributes, and operations in the model generated in the object-oriented analysis stage are combined and decomposed based on the changes in requirements. Are they added based on the object-oriented design principles? Necessary classes, attributes, and relationships. The design of the problem domain includes:-reuse design-class in the associated problem domain-Tim? General classes to establish inter-class protocols-adjust the inherited support level-improve performance-add? Lower-layer components 2. User InterfaceUsually, the required attributes and operations are provided in the object-oriented analysis stage. In the object-oriented design stage, the interaction details must be added according to requirements? The user interface design includes the actual display and input required for effective human-computer interaction. The design of the user interface consists of the following aspects: -User Classification-script describing the narrator and its tasks-design command layer-design specific interactions-continue to expand User Interface prototype-design Human-Computer Interaction Class-design task management based on the graphic user interface partial Design 3. Task ManagementA task is a program that runs a series of activities. When there are many concurrent tasks in the system, various tasks need to be divided according to the coordination and communication relationships of various behaviors to simplify the design and coding of concurrent behaviors. Task management mainly includes task selection and adjustment. Its work includes:-identifying event-driven tasks. -Recognize clock-driven tasks. -Identify priorities and key tasks. -Identify the coordinator between tasks. -Review each task to ensure that it meets the Process criteria for selecting a task. -Define each task and describe what it is, how it coordinates and communicates with each other. 4. Data ManagementData Management provides the basic structure for storing and retrieving objects in the data management system, including asking and managing permanent data. There are three main methods for data management: file management, relational database management, and object-oriented database management. Data management design includes:-data storage design. The data storage design selects the data storage method (file storage, relational database table storage or object-oriented database storage ). -Design the corresponding operations. For each object and class to be stored, add? Attributes and Operations used for storage management are described in the definition of classes and objects. In each process, the basic operation steps of object-oriented design include:-refine the reorganization class. -Refine and implement the relationship between classes to understand their visibility. -Add? Attribute, specifying the type and visibility of the attribute. -Assign responsibilities and define how to run each responsibility. -The message-driven system understands the message transmission mode. -Use the design pattern for local design. -Draw a specific class diagram and sequence diagram.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.