Home > php教程 > php手册 > body text

Web development learning accumulation 20161018

WBOY
Release: 2016-10-19 10:19:34
Original
944 people have browsed it

Project

1. What does the project do

 Business logic -> Add, delete, modify and check

2. What is object-oriented programming and what are its benefits?

 oop:object oriented programming

 <>Core idea: Use the way humans think and solve problems to program.

 <>Three major features of oop

  Encapsulation: The first level of meaning is to encapsulate properties and methods together to form an object.

   The second meaning is to hide the internal implementation details and provide an operable interface (public) to the outside world

 Inheritance: Subclasses can directly use the properties and methods (non-private) defined by the parent class through inheritance. The extend code can be reused.

  Polymorphism: In different contexts (contexts), its manifestations are different. Php itself is polymorphic.

 <>Why is PHP polymorphic

  PHP is a weakly typed language

  $a='php';$a is a string type data

  $a=100;$a is an integer data

 <>Benefits of oop

  Reusable

 Maintainable

  Expandable

  Relatively high flexibility

3. MVC pattern

 Combined with a single entrance  index.php?p=admin&c=goods&a=insert  (Complete the product addition in the background, C corresponds to the controller (class), a corresponds to the method)

4. My knowledge and understanding of MVC

 <>What is MVC?

  It is a design pattern

 M: model, model, completes specific business logic

  V: view, view, responsible for displaying information

  C: controller, controller, is responsible for issuing orders and plays the role of traffic police

 <>The core idea of ​​MVC

  Separate business logic and display

 <>Specific description of the details of MVC

  

 Note: There are two ways to describe the understanding of the model

  1. Model in a broad sense: database model and tool model

   2. Model in a narrow sense: database model

 <>Advantages and Disadvantages of MVC

Advantages: clear layering, easy communication, easy team development, easy maintenance

Disadvantages: High learning cost, more troublesome for small projects

 <>What is the direct relationship between oop and MVC

  There is no direct relationship, but using oop to implement MVC is the perfect solution

4. Project structure description

 Every excellent project has a good project structure.

5. Construction process

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template