Review and Prospect of software ideas

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. No one 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 it is different from others, making it hard to avoid arguments.

Truth is like a limit. We can only approach her, but cannot possess her. Maybe this is the real reason why she is always beautiful and charming. The development of software thinking is also a process of constantly approaching truth. In this process, we will see the collision of different thoughts and trends, and the beautiful waves.

At the beginning, there was a computer program that was "algorithm-oriented". In order to make full use of limited hardware resources, people designed various classical algorithms. "Computer" is the machine used for computing. However, with the improvement of hardware capabilities and the increase of Program Complexity, people find that complicated code is difficult 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 begin to propose the "Data Structure" idea, they really start 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, and the code is only for data services. Since then, the data-centric world view has gradually formed. Of course, "Data Structure" is developed along with the idea of "structured programs". Such cooperation greatly improves program efficiency and software productivity.

However, this idea is to separate "data" from "code. In fact, prior to the maturity of the "Object-Oriented" idea, experienced programmers have already felt that "data" and "code" should be integrated. They are used to dividing complex problems into several relatively independent structures and writing a bunch of sub-processes that serve this structure around each structure, the first parameter in the process is a structure pointer, which is a well-known "handle" and is called handle in English. When the idea of "Object-Oriented" is put forward, I believe they are the first people to understand this idea.

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 refers to the basic models of human thinking (such as "classification" and "abstraction ", "universality and particularity") applied to software design. This idea is reflected in programming. "data" and "code" are unified into an "object", and "object" becomes the main method to implement software. 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 a new height. 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. The hierarchy of classes is like a beautiful Christmas tree, which is really intuitive. Even many programming languages sacrifice the multi-inheritance feature to build this beautiful Christmas tree. However, the problem is that once such an inheritance structure is fixed, the system's growth pattern is defined: only new branches can grow! Although the system designed in the class inheritance mode has good scalability, such expansion is unidirectional. If you want to expand something on the foundation, you will find that such expansion may 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 expand a base class, you will face different levels of sub-points, where should I cut the branches to graft the branches of this new breed?

To this end, a software idea called "interface" was born. The "interface" idea advocates respect for the privacy of objects and never look up 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. The programming idea of "interface" 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 just an interface, no longer facing complicated branches and hierarchies.

In fact, "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 theoretical Summary of "interface" programming. It breaks down all problems in the real world into all the basic aspects to be solved, that is, the so-called "horizontal concerns ". These fundamental problems are solved relatively independently, and they can be combined to solve all the problems. If you find that some problems still need to be further solved, you can solve them in some regions. When the problem is found to be solved, another basic interface can be added to all objects, but it will not affect all other aspects that have been solved.

However, some people have different opinions on the idea of "aspect orientation. The main reason is that the technical means to achieve "Aspect-Oriented" are still quite primitive. At present, all "Aspect-Oriented" implementations are extended by third-party manufacturers beyond the existing programming languages, rather than the programming languages themselves. Therefore, it is quite troublesome to use, even difficult to understand, and not easy to debug code. Because it is not supported by the language itself, most of the existing "aspect-oriented" implementation results are not even different from the "object-oriented" virtual functions, and it turns into a large circle. Therefore, the perfect "Aspect-Oriented" implementation is to expand the Aspect-Oriented semantics in the syntax category of the programming language, and the compiler directly supports compilation. The debugging tool can be directly debugged.

Therefore, it is better to have a view on the existing "aspect-oriented" implementation technology than to have a view on the idea of "aspect-oriented. However, "aspect orientation" brings us a new idea. Learning the world view of such ideas and understanding their positions and opinions will bring us closer to the true meaning of software thinking.

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

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 by multiplying a number of prime numbers. 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 most basic knowledge of number 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...

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.