Study Notes on design patterns (II)-limitations of traditional OO design

Source: Internet
Author: User

Study Notes on design patterns (2)------TraditionalOoDesign limitations

Chapter 3An urgent need for flexibilityCodeProblems

What is an expert system:

The expert system is a special computer system that uses the rules of human experts to automatically make decisions. Creating an expert system involves two steps. First, obtain the rules used by experts to make decisions and complete tasks, and model these rules. Second, implement these rules in the computer; this step usually uses some commercial Expert System Tools. For analysts, the first step is much more difficult.

In this chapter, the author tells a story aboutCAD/CAMSystem.

The same method must be used from differentCAD/CAMInformation is extracted from the system. This allows the company to continue working on a costly expert system.

Chapter 4A standardOoSolution

In the previous chapter, we made a solution. The problem was solved using huge inheritance. However, implementation relies heavily on inheritance, which leads to a higher maintenance cost. In addition, this method has several disadvantages: high redundancy, low cohesion, and class explosion.

According to this design and implementation, it is definitely an abuse system and needs to be re-designed.

The authors of these two chapters guide readers through practical examplesOoTo solve the problem. Using a traditionalOoAfter the method, the system can be used, but there are many defects, which will lead to difficulties in maintenance and expansion in the future. Maybe the design pattern can provide better solutions.

Trackback: Postid = 559056


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: 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.