Ooa-ood-oop Introduction

Source: Internet
Author: User
Tags access properties

Ooa-ood-oop Introduction I. OOA
    1. OOA: (object-oriented Analysis, object-oriented parsing method).
    • is to analyze the problem according to the object-oriented thought after conducting the system business investigation in a system development process. There is a big difference between OOA and structural analysis. OOA emphasizes the analysis and collation of the material for the OO method based on the systematic investigation data, rather than the analysis of the management business status and methods.
    • The OOA (object-oriented analysis) model consists of 5 levels (subject layer, object class layer, structure layer, attribute layer, and service layer) and 5 activities (identifying object classes, identifying structures, defining topics, defining attributes, and defining services). In this method, we define the structure between two kinds of object classes, which is called the classification structure, which is called the assembly structure. The classification structure is the so-called general and special relationship. The assembly structure reflects the relationship between the whole and the part of the object.
    • Ooa to identify the instance connection while defining the attribute. An instance connection is a mapping between an instance and another instance.
    • OOA to identify the message connection while defining the service. When an object needs to send a message to another object, there is a message connection between them.
    • The 5 levels and 5 activities in the OOA continue throughout the Ood (drawing to object design) process. The Ood model consists of 4 parts. They are the design problem domain part, design the human-computer interaction part, the design task management part and the design data management part.
    1. The main principles of OOA
  • (1) Abstract

    • First, there is no need to understand and describe all of them, only to analyze the things and their essential characteristics which are related to system goals.
    • Second, by abandoning individual things in the details of the differences, extracting their common characteristics and get a group of things abstract concept.
    • Abstraction is the most widely used principle in object-oriented methods. Abstract principles include two aspects of process abstraction and data abstraction.

      • Process abstraction means that any sequence of operations that completes a deterministic function can be viewed by the user as a single entity, although it may actually be done by a series of lower-level operations.
      • Data abstraction defines data types based on actions applied to the data, and limits the value of the data to be modified and observed only by these operations. Data abstraction is the core principle of OOA. It emphasizes the combination of data (attributes) and operations (services) into an irreducible system unit (that is, an object), and the outside of the object simply needs to know what it does without knowing what it does.
  • (2) Encapsulation is the combination of the object's properties and services into an irreducible system unit, and as far as possible to conceal the internal details of the object.
  • (3) Inheritance: The object of a particular class possesses all the properties and services of its general class, called the inheritance of a special class to a generic class.
  • (4) Classification: is to classify objects with the same attributes and services into a class, using classes as an abstract description of these objects. The classification principle is actually a form of representation when an abstract principle is applied to an object description.
  • (5) Aggregation: Also known as Assembly, the principle is that a complex thing as a number of relatively simple assembly of things, thus simplifying the description of complex things.
  • (6) Association: It is the method of thinking that people often use when they think about a problem: associating it with something else. The reason that people can be associative is that there is indeed some connection between things.
  • (7) Message communication: This principle requires that objects communicate with each other only through messages, and not directly outside the object to access properties inside the object. Communication through messages is caused by the encapsulation principle. In OOA, a message connection is required to represent a dynamic relationship between objects.
  • (8) Granular control: In general, people in the face of a complex problem domain, can not be at the same time to look at the overall situation, but also insight autumn hair. Therefore, it is necessary to control its own field of view: When considering the overall situation, pay attention to its large components, temporarily unknown to each part of the specific details, consider a part of the details of the rest of the temporary aside. This is the principle of granularity control.
  • (9) Behavioral analysis: The behavior of things in the real world is complex. The various behaviors in the problem domain consist of a large number of things, which are often interdependent and interwoven with each other.
    1. Key Benefits of OOA
    • (1) Improved understanding of the problem domain and system responsibilities;
    • (2) Improve the communication between the various types of personnel involved in the analysis;
    • (3) have a strong adaptability to the change of demand;
    • (4) Support for software reuse.
    • (5) Consistent throughout the whole process of software life cycle.
    • (6) Practicality;
    • (7) Facilitate user participation.
    1. Basic steps of the Ooa method
    • When using OOA to specifically analyze a thing, the following five basic steps are generally followed:

      • The first step is to determine the objects and classes. The object here is an abstraction of the data and how it is handled, reflecting the ability of the system to preserve and process information about certain things in the real world. A class is a description of a common set of properties and methods for multiple objects, including a description of how to create a new object in a class.
      • The second step is to determine the structure (structure). Structure refers to the complexity of the problem domain and the connection relationship. The class member structure reflects the generalization-specialization relationship, and the whole-part structure reflects the relationship between the whole and the local.
      • The third step is to determine the subject (subject). The topic refers to the general picture of things and the overall analysis model.
      • Fourth step, determine the attribute (attribute). A property is a data element that can be used to describe an instance of an object or classification structure, given in the diagram, and specified in the object's storage.
      • The fifth step is to determine the method. Methods are some of the processing methods that must be made after a message is received: The method is defined in the diagram and specified in the object's storage. For each object and structure, the ones used to add, modify, delete, and select a method are inherently implicit (although they are defined in the object's storage, but not on the diagram), while others are displayed.
two. OOD
    1. OOD: (object-oriented design, object oriented). The

      • method is an intermediate transition in the Oo method. Its main role is to further standardize the results of OOA analysis so that it can be directly accepted by OOP.
      • Object-oriented design (OOD) is a software design approach and an engineering specification. There is no doubt about it.   According to Bjarne Stroustrup, the object-oriented programming paradigm (Paradigm) is Stroustrup:

        1 determines the class you want;

        2 provides a complete set of actions for each class;

      3 explicitly use inheritance to express common ground. 

      •   By this definition, we can see that Ood is "deciding on the requirements of the class, the operation of the class, and the process associated with the class." -Ood's goal is to manage the interdependence of parts within the program. In order to achieve this goal, Ood requires that the program be partitioned into chunks, each of which should be small to manageable, and then hide each block behind the interface (interface), allowing them to communicate with each other only through interfaces. For example, if you use Ood method to design a server-client (client-server) application, then the server and the client should not have a direct dependency, but should make the interface of the server and the interface of the client depend on each other. -This dependency transformation makes the parts of the system reusable. In the example above, the client does not have to rely on a particular server, so it can be reused in other environments. If you want to reuse a block, just implement the necessary interface. -Ood is a design paradigm for solving software problems (paradigm), an abstract paradigm. Using the design paradigm of ood, we can use objects (object) to represent the entities of the problem domain (problem domain), each with corresponding states and behaviors. We have just said that Ood is an abstract paradigm. Abstractions can be divided into layers, from very generalized to very special, and objects may be at any level of abstraction. In addition, objects that are different but interrelated can form an abstraction: As long as there is similarity between these objects, they can be treated as objects of the same class. What is the difference between  
    2. Ood and traditional methods?
  还记得结构化设计方法吗?程序被划分成许多个模块,这些模块被组织成一个树型结构。这棵树的根就是主模块,叶子就是工具模块和最低级的功能模块。同时,这棵树也表示调用结构:每个模块都调用自己的直接下级模块,并被自己的直接上级模块调用。  那么,哪个模块负责收集应用程序最重要的那些策略?当然是最顶端的那些。在底下的那些模块只管实现最小的细节,最顶端的模块关心规模最大的问题。所以,在这个体系结构中越靠上,概念的抽象层次就越高,也越接近问题领域;体系结构中位置越低,概念就越接近细节,与问题领域的关系就越少,而与解决方案领域的关系就越多。  但是,由于上方的模块需要调用下方的模块,所以这些上方的模块就依赖于下方的细节。换句话说,与问题领域相关的抽象要依赖于与问题领域无关的细节!这也就是说,当实现细节发生变化时,抽象也会受到影响。而且,如果我们想复用某一个抽象的话,就必须把它依赖的细节都一起拖过去。  而在OOD中,我们希望倒转这种依赖关系:我们创建的抽象不依赖于任何细节,而细节则高度依赖于上面的抽象。这种依赖关系的倒转正是OOD和传统技术之间根本的差异,也正是OOD思想的精华所在。
    1. Ood Steps

      • Refine the Reorganization class
      • Refine and implement inter-class relationships to clarify their visibility
      • Add property, specify the type and visibility of the property
      • Assign responsibilities, define how each responsibility is performed
      • For message-driven systems, clear message delivery methods
      • Partial Design using design pattern
      • Draw a detailed class diagram and a sequence diagram
    2. Several major tasks to be carried out during the design of Ood

      • (i) The refinement process of the object definition specification
  对于OOA所抽象出来的对象-&-类以及汇集的分析文档,OOD需要有一个根据设计要求整理和求精的过程,使之更能符合OOP的需要。这个整理和求精过程主要有两个方面:一是要根据面向对象的概念  模型整理分析所确定的对象结构、属性、方法等内容,改正错误的内容,删去不必要和重复的内容等。二是进行分类整理,以便于下一步数据库设计和程序处理模块设计的需要。整理的方法主要是进行归  类,对类一&一对象、属性、方法和结构、主题进行归类。
    • (ii) Data model and database design

The design of the data model needs to determine the content of the class-&-object properties, how the message is connected, the system access, the method of the data model, and so on. Finally, the data for each object instance must be implemented into the object-oriented library structure model.

    • (iii) Optimization

The optimal design process of ood is to summarize the analysis results and process business processes from another angle, and optimize the optimization, abstraction and integration of objects and structures.

The modular representation of objects and structures Ood provides a paradigm that supports modularity of classes and structures. This module conforms to all the characteristics required by the general modularization, such as good concealment of information, strong internal polymerization degree and weak coupling degree between modules.

Integration allows a single component to be organically combined to support each other.

    1. The characteristics and problems of OO methods
  OO方法以对象为基础,利用特定的软件工具直接完成从对象客体的描述到软件结构之间的转换。这是OO方法最主要的特点和成就。OO方法的应用解决了传统结构化开发方法中客观世界描述工具与软  件结构的不一致性问题,缩短了开发周期,解决了从分析和设计到软件模块结构之间多次转换映射的繁杂过程,是一种很有发展前途的系统开发方法。  但是同原型方法一样,OO方法需要一定的软件基础支持才可以应用,另外在大型的MIS开发中如果不经自顶向下的整体划分,而是一开始就自底向上的采用OO 方法开发系统,同样也会造成系统结构不合理、各部分关系失调等问题。所以OO方法和结构化方法目前仍是两种在系统开发领域相互依存的、不可替代的方法。

Seven, what can Ood bring to me?

  问这个问题的人,脑子里通常是在想“OOD能解决所有的设计问题吗?”没有银弹。OOD也不是解决一切设计问题、避免软件危机、捍卫世界和平……的银弹。OOD只是一种技术。但是,它是一种优秀的技术,它可以很好地解决目前的大多数软件设计问题——当然,这要求设计者有足够的能力。  OOD可能会让你头疼,因为要学会它、掌握它是很困难的;OOD甚至会让你失望,因为它也并不成熟、并不完美。OOD也会给你带来欣喜,它让你可以专注于设计,而不必操心那些细枝末节;OOD也会使你成为一个更好的设计师,它能提供给你很好的工具,让你能开发出更坚固、更可维护、更可复用的软件。
three. OOP
    1. OOP: (Object Oriented programming, OO programming).

      • is a computer programming architecture
    2. One of the basic tenets of OOP is that a computer program is composed of a single unit or object that can act as a subroutine. OOP achieves the three main goals of software engineering: reusability, flexibility, and extensibility. To achieve the overall operation, each object can receive information, process data, and send information to other objects. OOP mainly has the following concepts and components:

      • Components-data and functions in a running computer program formed in a unit, the component in the OOP computer program is a modular and structured basis.
      • Abstraction-The program has the ability to ignore certain aspects of the information being processed, namely the ability to focus on the main aspects of the information.
      • Encapsulation-also known as information encapsulation: Ensure that components do not change the internal state of other components in an unpredictable way, and that only those components that provide an internal state change method can access their internal state. Each type of component provides an interface that is associated with other components and specifies the method by which other components are called.
      • Polymorphism-component references and class sets involve many other components of different types, and the result of referencing a component depends on the type of actual invocation.
      • Inheritance-Allows child class components to be created on the basis of existing components, which unifies and enhances polymorphism and encapsulation. Typically, a class is used to group components, and it is possible to define a new class as an extension of an existing class, so that the class can be organized into a tree or mesh structure, which embodies the versatility of the action.
      • Component-based programming has become particularly popular in scripting languages due to the reasons for abstraction, encapsulation, reusability, and ease of use. Python and Ruby are recent languages that have been developed with the idea of OOP, and the popular Perl scripting language has slowly joined new object-oriented functional components starting with version 5. The use of components instead of "real" entities becomes a popular reason for JavaScript (ECMAScript), and there are arguments that the appropriate combination of components can replace the HTML and XML Document Object Model (DOM) on the Internet.

Ooa-ood-oop Introduction

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.