Then the previous article, "From the guard's way of thinking-object-oriented." Last time we talked about the object-oriented context, but the conversation was rather coarse. This time, add a little bit more slowly to refine the architecture.
How did you get here?
The story begins with a structured appearance ...
Long long ago ..., the world of software development is still a piece of chaos, the code is flooded with goto statements, regardless of the development of what the software is faced with complex difficult to understand the problem, too flexible goto statement to let the process of the program arbitrarily jump, unable to control ..., a time can be confused like a clump ah. This time the software field appeared a mysterious character! He is the "Structural Man" (structured programming Idea), his appearance to the entire software industry has brought hope!
In particular, he invented the trick " Three control Structure" (order, selection, circulation) is playing all the invincible hand! One of his other killer's is: function
( Narrator : The basic idea of structured programming is to control the process in an orderly manner, that is, to limit the sequence of execution of the program to three of sequences, branches, and loops; the common processing is attributed to a routine (function).)
The benefits of structured programming are:
1, three major limitations: greatly reduced the degree of freedom of the program, reducing the various combinations, so that the program is not too complex. For this, the sequential, branching, and looping of structured programming can implement all algorithms, although it reduces the complexity and flexibility of the program, but the implementation of the program is not reduced.
2, routines (functions): We only need to know the name of the process (function), without needing to know the internal details of the process, that is, "Black-box")
But...... Not long ago ..., and soon as people became more demanding and more complex about the software, doer (data to be processed) began to bully the software industry! Their numbers are growing exponentially, and our "Structural man" is already in the process of getting overwhelmed! The program is becoming more and more complex, the structure man is getting old, the software industry is in jeopardy, and the new heroes are needed ... At this time, the object-oriented Mr. was born!
In a pitch day,"structural man" wife difficult to produce a boy, just gave birth to the baby's wife body is very weak, but the face of a happy smile, said: "Wanderers his father, give me Wanderers to take a name " structural man " looked at the children, Also looked at the wife, said: "Call him" object-oriented!
Object-oriented The boy was amazed and gifted with the true line of "structural man" from childhood. 18 years later, the object-oriented has learned all the family unique knowledge of the "Structure Man" .
One day,the "structural Man" lay on the bed and summoned the object, instructing, "Boy, you are grown up, and some things should be known." Your father, my life, I struggle with the program, management program processing and data objects that gang doer not good to deal with Ah! in order to ensure the correctness of the program, you have to maintain the consistency of processing and data . To wipe out this group of doer, you must learn the best martial arts skills on the cheats. "Then, I saw the" structural Man " from the pillow to take out a cheat book" Data Abstraction Technology "," children, this is my life and big and small program to combat the experience of the summary, It's all daddy's work! You must ... The amount ... " The structural man just hung up ... Object-oriented cry ... Object-oriented began to retreat to practice, after 7,749 days, finally became a peerless martial arts "data abstraction technology." Finally, he went down the mountain ...
Where to?
(Want to know how the funeral, and listen to tell ... )
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Object-oriented Mr. and his brothers and sisters--a brief discussion on "OOP, COP, AOP, SOP"