(B) Description of Thinkphp frame, OOP, MVC-TTLSA

PS: The following is an excerpt from Baidu Encyclopedia framework: by providing a Web program to develop the basic infrastructure, most are based on mvc architecture model, PHP development framework program development to PHPWeb placed on the assembly line. In other words, PHP frameworks help to promote the development of rapid software development (RAD), which saves you time, it helps to create a more stable program, and to reduce duplication of work to write code developers. The framework also correct database operations and programming the presentation layer only way to help beginners create a stable program by ensuring that. PHP development framework so that you can spend more time to create real Web applications, rather than writing repetitive code. OOP: Object Oriented Programming Object-oriented programming. The so-called "objects" in object-oriented language supports explicit, in general, refers to class instances loaded in memory, associated with the member variables and member functions (also known as: Method). Object-oriented programming is completely different from the traditional process-oriented programming, which greatly reduces the difficulty of software development, the program is as simple as building blocks, is the computer programming of an unstoppable trend. OOP reach the three main objectives of software engineering: reusability, flexibility and scalability. In order to achieve the overall operation, each object can receive information, process data and send information to other objects. OOP three main characteristics summarized from the above three main objectives: inheritance, polymorphism and encapsulation, the details of which: http: //www.cnblogs.com/forwardpower/archive/2010/05/01/1725787. html MVC: Model View Controller is a model (model) - view (view) - Abbreviation controller (Controller), and a software design model, the display method of separating an organization code and data in a service logic, business logic will be aggregated to a component inside the interface and user interaction can be improved and customization of data around the same time without the need to re-write the business logic. MVC was developed a unique structure for a conventional mapping input, processing and output of the logic functions in a graphical user interface. The following excerpt know almost known, object-oriented programming language and for writing applications, is not suitable for the preparation of a system program (operating system kernel, a device driver, a communication protocol, a database, a virtual machine, etc.), not suitable for the preparation of science applications and algorithm library, have you ever thought why? This is where there is a pattern for object-oriented language with software and method development, demand usually have more of a textual representation of explanation, and less need to use mathematical symbols and formulas, less need to use graphics to assist expression, and such software often need to deal with a lot of human-computer interaction; those who are not suitable for object-oriented software development methods often require more math, graphics to assist express demand, otherwise it is difficult to explain, this type of software is often the man-machine less interface. This is so fundamental that is conducive to the use of object-oriented human knowledge of them, that part of the programming ideas and tools, language knowledge and logic can be expressed in the language can be more easily converted into object-oriented code. Object-oriented thinking, and knowledge of the language of human tissue thinking the same strain, in the era of the computer is not able to understand natural language, humans need an idea and method, the natural language knowledge is converted into a computer program. In this way, we are one of the most simple object-oriented programming is done to tell the truth, when I first came into contact with these things, I have some scratching their heads then we will use an example of a human life is an object: Class The class that people have tall, short, fat, thin, age, gender, etc.: property Function and people walking, running, jumping, singing, crying, laughing, etc.: action action ultimately, we converted into an object-oriented language that is: a class, he owns what property how is this class action, call this class to complete any task. This is where there is a pattern for object-oriented language with software and method development, demand usually have more of a textual representation of explanation, and less need to use mathematical symbols and formulas, less need to use graphics to assist expression, and such software often need to deal with a lot of human-computer interaction; those who are not suitable for object-oriented software development methods often require more math, graphics to assist express demand, otherwise it is difficult to explain, this type of software is often the man-machine less interface. This is so fundamental that is conducive to the use of object-oriented human knowledge of them, that part of the programming ideas and tools, language knowledge and logic can be expressed in the language can be more easily converted into object-oriented code. Object-oriented thinking, and knowledge of the language of human tissue thinking the same strain, in the era of the computer is not able to understand natural language, humans need an idea and method, the natural language knowledge is converted into a computer program. In this way, we are one of the most simple object-oriented programming is done to tell the truth, when I first came into contact with these things, I have some scratching their heads then we will use an example of a human life is an object: Class The class that people have tall, short, fat, thin, age, gender, etc.: property Function and people walking, running, jumping, singing, crying, laughing, etc.: action action ultimately, we converted into an object-oriented language that is: a class, he owns what property how is this class action, call this class to complete any task. This is where there is a pattern for object-oriented language with software and method development, demand usually have more of a textual representation of explanation, and less need to use mathematical symbols and formulas, less need to use graphics to assist expression, and such software often need to deal with a lot of human-computer interaction; those who are not suitable for object-oriented software development methods often require more math, graphics to assist express demand, otherwise it is difficult to explain, this type of software is often the man-machine less interface. This is so fundamental that is conducive to the use of object-oriented human knowledge of them, that part of the programming ideas and tools, language knowledge and logic can be expressed in the language can be more easily converted into object-oriented code. Object-oriented thinking, and knowledge of the language of human tissue thinking the same strain, in the era of the computer is not able to understand natural language, humans need an idea and method, the natural language knowledge is converted into a computer program. In this way, we are one of the most simple object-oriented programming is done to tell the truth, when I first came into contact with these things, I have some scratching their heads then we will use an example of a human life is an object: Class The class that people have tall, short, fat, thin, age, gender, etc.: property Function and people walking, running, jumping, singing, crying, laughing, etc.: action action ultimately, we converted into an object-oriented language that is: a class, he owns what property how is this class action, call this class to complete any task.
Class PeopleAction extends Action {
	public function sex() {
		if (sex=man) {
			echo "我是男人";
		} else {
			echo "我是女人";
		}
	}
}
For our above is a object-oriented programming, the most simple example, specific code, we need to slowly described in the subsequent examples. A preliminary understanding of object-oriented concepts in the next chapter, we will introduce thinkphp installation and operation process: (c) Thinkphp installation and operation procedures introduced -TTLSA

Reproduced in: https: //my.oschina.net/766/blog/211388

Guess you like

Origin blog.csdn.net/weixin_34336292/article/details/91493175