Primary knowledge Oriented object (II.)

Source: Internet
Author: User

Today's object-oriented thinking has been designed to all aspects of software development. For example, object-oriented analysis (Ooa,object oriented analyses), object-oriented designs (Ood,object oriented design), and the object-oriented programming implementations we often say (Oop,object oriented Programming).

The object-oriented approach arises when there are many problems in the structured design method. The basic strategy of solving the problem of structured design method is to examine the problem domain from the perspective of function. It sees the application as a functional module that implements certain tasks, where the sub-process is the underlying functional module that implements some specific operations. In each function module, the data structure is used to describe the organization form of the processing, and the algorithm is used to describe the specific operation process. Facing the increasingly complex application system, this kind of development idea gradually exposes some weaknesses in the following aspects.

1. Look at the perspective of the problem area

The object that exists in the display world is the protagonist in the problem domain, the so-called object refers to the objective entity and the subjective abstract concept, which is the main goal of human observation and problem solving. For example, for a school student management system, whether simple or complex, is always around the students and teachers to implement the two objects. In nature, each object has some properties and behavior, such as students have the student number, name, gender and other properties, as well as classes, examinations, do homework and other behaviors. Therefore, each individual can be described by attributes and behavior.

2. level of abstraction

Abstraction is the basic weapon to solve the problem of mankind. A good abstract strategy can control the complexity of the problem and enhance the universality and expansibility of the system. Abstraction mainly includes process abstraction and data abstraction, and the structure design method applies process abstraction. The so-called process abstraction is the extraction of an operation with a definite function definition in the problem domain and treats it as an entity. This level of abstraction is somewhat arbitrary in the design of the software system structure, and the stability is poor, which makes it difficult to design every operation link of the system accurately. Once the representation of an object attribute has changed, it is possible to involve many parts of the existing system, and data abstraction is a higher-level abstraction than the process abstraction, which binds the zodiac and behavior of the object together to achieve a unified abstraction, thus achieving a true simulation of the real world object.

3. Package Body

Encapsulation refers to the zodiac of an object that exists in the real world, and it is placed within a logical unit. The logical unit is responsible for hiding the properties described, and all access to the object's internal properties can only be achieved through the provided user interface. This can not only realize the protection of the object property, but also improve the maintainability of the software system. As long as the user interface does not change, any changes inside the package will not affect other parts of the software system. The structured design method does not achieve the overall encapsulation of the object, but encapsulates each function module, and each function module can arbitrarily carry on the operation to the object attribute without protection ability, and because the data and behavior of describing attribute are separated, so that once the expression of an object attribute has changed, Or a behavioral effect changes, it is possible to have an impact on the entire system.

4. reusability

Reusability identifies the reusable capability of a software product and is an important indicator of the success or absence of a software product. In today's software development industry, people are increasingly seeking to develop more and more universal reusable components, so that the software development process is completely improved, that is, from the past statement-level development to the present component assembly, so as to improve software development efficiency, and promote the rapid expansion of the application domain. However, the basic unit of the component-oriented programming method is the module, each module knowledge realizes the specific function process description, therefore, its reusable unit can only be the module. For example, a large number of standard functions are used when writing programs in the C language. But for today's software development, such reuse is trivial, and when some of the data types involved in the operation change, it is not possible to use those functions. Therefore, reusable components that aspire to greater strength are the new requirements for software development in today's application domain.

These weaknesses drive people to find a new method of program design to adapt to the higher requirements of the modern society for Software development, object-oriented resulting.

Primary knowledge Oriented object (II.)

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.