Software ideology Review and Outlook

Source: Internet
Author: User

Philosophers said: What kind of world view is there as a methodology!

The debater said: the position determines the viewpoint!

The reason why there is a debate between technical thoughts and opinions in the world is exactly the same as that in the blind world. There is only one truth, but it is very profound and profound.
I can see all of her. Everyone who pursues the truth can feel her existence, because after all, she can touch a part of her. As a result, people will find that the part they touch is real, and naturally they are connected to others.
Different, the debate is inevitable. Truth is like a limit. We can always be close to her, not possess her. The development of software thinking is also a process of constantly approaching truth.

There was a computer at the beginning.ProgramIt is always "orientedAlgorithmIn order to make full use of limited hardware resources, people have designed various classic algorithms.
A computer is a computer used for computing. However, with the improvement of hardware capabilities and the increase of Program Complexity, people find thatCodeDifficult to read and maintain. As a result, the idea of "structured" Programs began to develop and mature.
"Breaking down big problems into small problems to solve" is a habit of human thinking. Lengthy code is divided into several sub-processes, each of which is easy to understand. On this basis, the entire program is understood.

In fact, "algorithm-oriented" and "structured programs" are both code-centric world views, or on the "computer" standpoint. When people start to raise
When I came out of the "Data Structure" idea, I really started to think about the problem to be solved! People are increasingly aware that using data structures to describe the problem domain model is the key to solving the problem.
It only serves data. Since then, the data-centric world view has gradually formed. Of course, "Data Structure" is developed along with the idea of "structured programs". The combination of this idea greatly improves programming.
Efficiency also improves software productivity.

However, this idea is to separate "data" from "code. In fact, prior to the maturity of the "object-oriented" idea, experienced programmers already
We feel that "data" and "code" should be integrated. They are used to dividing complex problems into several relatively independent data structures and writing a bunch of sub-processes that serve this structure around each data structure.
The first parameter of the process is a structure pointer. This pointer is a well-known "handle", and handle is called in English. In fact, this is the original object model. The idea of "object-oriented"
I believe they are the first people to understand this concept.

It should be said that the idea of "object orientation" is the first time that we can look at problems from the standpoint of the real world. This idea sets the basic model of human thinking about problems (such
Class "," abstract "," universality and particularity ") is applied to software design. This idea is reflected in programming, that is, the "data" and "code" are unified into an "object", and "object" becomes the main implementation software
Method. The idea of software has evolved into a sense of Simplicity: You can use this simple way of thinking to consider complex software problems!

However, with the deep application of this idea, new arguments have started, but all arguments are at another level. I think the most confusing thing about software is the competition between inheritance and combination.

Because people are too accustomed to the "object-oriented" method, the basic class is used to implement the commonly needed functions, and the subclass is derived to implement special things. Class hierarchy
It looks like a beautiful Christmas tree. Even, manyProgramming LanguageIn order to construct this beautiful Christmas tree, the characteristics of Multi-inheritance are sacrificed. But the problem is that once such an inheritance structure is fixed
Defined the system growth model: only new branches and leaves can be grown! Although the system designed in the class inheritance mode has good scalability, such expansion is unidirectional. When you want to expand something on the Foundation,
This could shake the entire tree! Some programmers try to use multi-inheritance to solve this problem, but not to mention that many languages do not support multi-inheritance. If you can really expand a base class, you will face different layers.
Which branches should be split?

To this end, a software idea called "interface" was born. The "interface" idea advocates respect for the privacy of objects and never checks the three generations of an object's ancestor,
As long as you can do things. Everything that can be done is defined as an "interface". The external capability of an object is composed of its "interfaces". It does not matter how it is implemented. Programming ideology of "interface"
It is to look at the problem from the standpoint of "function combination", rather than from the "function inheritance" of the parent class ". Therefore, for the "interface" idea, whether it is the addition of basic functions or the expansion of new functions, it is to expand
Interface, no longer facing complicated branches and hierarchies.

"Inheritance" and "Combination" are only two ways to look at the problem. If you like to see the world vertically, you will find that the world is "inherited. If you like to look at it, you will find that the world is a "Combination.

In fact, the idea of "aspect-oriented" is to see the world. "Aspect orientation" is a continuation of "object orientation" and a programming method for "interface ".
Theoretical Summary. It breaks down all problems in the real world into all the basic aspects to be solved, that is, the so-called "horizontal concerns ". Solving these fundamental problems is relatively independent, and the combination of these fundamental problems can solve all problems.
Question. If you find that some problems still need to be further solved, you can solve them in some regions. When we find that the common problem is to be solved, we can also add another basic interface surface to all objects.
But it will not affect other aspects that have been solved.

Will there be a software idea that can unify "inheritance" and "Combination" in the future? I think so! New ideas and theories will certainly be easily understood by people, and people will find that the world is so simple and should have been so simple!

Here is an interesting question for you:

The inherited viewpoint holds that the ancestor of all natural numbers is 1; then, 2 and 3 are inherited by 1; but 2 and 3 are different; 4 has the characteristics of 2, is inherited from 2; 5 has neither 2 nor 3 features, but directly inherits from 1; obviously 6 inherits the features of 2 and 3...

In the view of the combination, any natural number contains a component of 1. Prime Numbers 2, 3, 5, and 7 constitute the basic aspect of a natural number. Other natural numbers are composed of prime numbers, so it is called the sum.

As we all know, any natural number can be decomposed into 1 and multiplied by several prime numbers. Therefore, we can regard 1 and prime numbers as atomic features of natural numbers. If
If the natural number B can be divisible by another natural number, it indicates that B must have all the features of a (inherited ), the set of quality factors that constitute a must be a subset of the set of quality factors that constitute B (combination idea ). This is the number
The most basic knowledge of the theory. From here, the first two ideas are unified.

It is worth noting that both views acknowledge the importance of 1, and 1 is the object that exists in almost all advanced object-oriented languages, whether you want it or not. This is the philosophical basis for object existence!

I hope all software ideas will be so easy to understand in the future...

Today is the first day of work in 2005. Before starting the new year's program life, we only use this document to give it to all programmers like me.

Leadzen. Shenzhen-1-4

Related Article

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.