Cainiao 3D Geological Modeling System-design model (1)

Source: Internet
Author: User

Currently, many companies are engaged in 3D geological modeling systems. Mature foreign products include GOCAD, EarthVision, GemCom, and Surpac. They have high performance requirements, high costs, and different geological applications, many companies, such as hypergraphs, are doing this in China, but they can only perform simple application analysis on massive data. From this we can see that it is really difficult to compile this system! Now that I am a cainiao preparing to compile this system, I want to strengthen the basic skills first. Step 1: gain an in-depth understanding of the design model!

What is the design pattern? First of all, you must understand the essence of Object-Oriented Analysis and Design by understanding the design model. This tells us that, the design pattern is a fixed pattern for Object-Oriented Analysis and design that has been formed, most commonly used, and summarized in practice, it is equivalent to learning to write ancient poetry and learning the relationship between the first three hundred Tang poems. But then again, the 23 GoF models are the most commonly used and basic, but not all of them, the most important thing to learn about design patterns is to learn an idea. Thinking is everything that guides behavior. When you have this idea, you will form more of your own models, by the time you reach the highest level, you have no idea about the design pattern, but your analysis and design are completely in line with the design pattern. The so-called "no sword in the hands, no sword in the heart"

The design pattern pursues the analysis and design of the object-oriented system. There are two aspects: High Cohesion and low coupling. Why are we pursuing these two points? This can be used in one of China's Four Great Inventions: movable printing to explain why gunpowder, compass, and papermaking are all great inventions from the unknown to the discovery, the movable printing is only a technological progress from the engraving printing to the movable printing. Why is it not the evaluation of printing as one of the four great inventions? Before the invention of the live print, the use of rigid print, to modify a word, must be re-engraved, to add words, must be re-engraved, to re-arrange, must be re-engraved, printed after the book, this version has no value for reuse. It is good to use the movable words after printing. First, to modify the words, you only need to change them. This is maintained. Second, these words are not useless this time, it can be reused in later printing. Third, to add words, you only need to add other words. This is scalable. Fourth, the arrangement of words may actually be vertical or horizontal. At this time, you only need to move the words to meet the arrangement requirements, which is flexible. Live-print technology achieves the goal of "live" Only by achieving high cohesion and low coupling, and also by software development.

Which of the following aspects can we start to think about when we have no idea about the design model? The first step is to start with the characteristics of the object. The object consists of members and methods (that is, features and behaviors). The object can be created and deleted, and the object can be inherited, combined, and polymorphism. In this case, the design model must be related to the above!

In the era of structured language programming, there is no object concept. Functions and variables exist independently. global variables in programs are everywhere, and the entire program is highly coupled, A small piece of code may have to be modified in many places. When large software becomes more and more complex, the software engineering industry is in crisis and software cannot be handed over on schedule, as a result, some Masters put forward the idea of object-oriented programming. By observing the results of nature, everything in the universe exists in a dialectical way of independence and connection, both features and behaviors can affect each other:

Independence: Each object has its own descriptive features, which may remain static (such as a person's origin, blood type, birthday, etc ), it may also be a dynamically changeable State (such as a person's height or weight). Of course, the principle of relativity should also be used to change and remain unchanged depending on the specific situation. In addition, each kind of thing has its own behaviors, which may be dynamic changes of its own characteristics (such as a person's growth, fattening, weight loss, etc ), it may also be a process of acting on the outside world (for example, a person's charitable donation or volunteer work ).

Connection: Everything is related. From a philosophical point of view, we humans need to divide and abstract this connection from the perspective of solving problems, for example, Jupiter is of great quality, but it is far away from us, so we are mainly influenced by the gravity of the earth under our feet, there are four major forces in the universe (gravitation, electromagnetic force, force, and weak force), where gravitation counts as a global variable and the electromagnetic force takes a much smaller scope, the strong and weak forces can only be regarded as one local variable. The problem arises here. Isn't it necessary to reduce the coupling between objects? Now, everything is connected and there is still a decoupling of P! In this case, from different aspects, the dominant force is different. In the macro perspective of the universe, the dominant role is universal gravitation, the strong and weak electromagnetic force can be ignored. From the perspective of the Earth's natural world, the electromagnetic force plays a leading role. The growth of all things fades and the standing of human beings are all dependent on the electromagnetic force; at the microscopic level inside the atom, the strong and weak forces play a leading role. At this level, Newton's Law of mechanics has expired, and thus quantum mechanics has been born. Therefore, in different software requirements, extensive connectivity can be avoided and optimized.

From the above, we can conclude that an object has static and dynamic characteristics, as well as its own and external behavior, we will immediately find that if an object has behaviors targeting the outside world, it will improve the coupling between objects. Indeed, in object-based programming (VB, BCB, etc ), this is the response to events (such as mouse pressing, dragging, keyboard buttons, and bounce). However, this is not purely object-oriented programming, but object-based.

To reduce the coupling between objects, we should try our best not to place the interaction between objects inside the objects, but to add another control mechanism of the neural hub, for example, when you see a beauty in your eyes, you don't directly control your head and take a look back. Instead, you can send the visual information of the beauty to the brain for analysis and determination.

Next we will talk about inheritance, combination, and polymorphism.

(For some content in this article, refer to the book "big talk design mode")

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.