Gaulo PHP Video Tutorial recommended

Source: Internet
Author: User
Tags php programming
PHP ("Hypertext Preprocessor") is a common open source scripting language. The grammar absorbs the C language, Java and Perl features, is conducive to learning, widely used, mainly for the field of web development. PHP's unique syntax mixes the syntax of C, Java, Perl, and PHP's own creation. "Gaulo detailed PHP video tutorial" in detail to introduce you to the HTML-based PHP all the basic points of knowledge.

Course Play Address: http://www.php.cn/course/511.html

The teacher's lecture style:

The teacher lively image, witty witty, witty, touching. A vivid image of the metaphor, like the finishing touch, to the students to open the door of wisdom, a proper sense of humor, attracting students to smile, such as drinking a cup of glycol wine, to the aftertaste and nostalgia, the philosopher's motto, culture of the proverbs from time and again interspersed in the middle, give people to think and alert.

The difficulty in this video is that PHP is object-oriented:

Object-oriented programming (OOP) is a fundamental skill of our programming, and PHP5 provides good support for OOP. How to use the idea of OOP for advanced programming of PHP is very meaningful for improving PHP programming ability and planning a good web development architecture. In this example, we illustrate the practical meaning and application of programming oop using PHP.

When we do a Web site with a database background, we will take into account that the program needs to be applied to different environments. Unlike other programming languages, in PHP, the operations database is a series of specific function functions (if you do not use the ODBC interface). This is highly efficient, but the package is not enough. If there is a unified database interface, then we can not make any changes to the program to apply to a variety of databases, so that the program's portability and cross-platform capabilities are greatly improved.

Class: An abstraction of the common denominator of all objects! (is a manufacturing manual)

Object: It is the specific object produced according to the specification

What is in the class? attributes (such as person: height, weight, name)

What can I do? function (say live, eat)

Using variables and functions to simulate properties and functions separately

In object-oriented, a method is a function; a property is a variable, but a method and a property that are generally said in a polygon object.

Encapsulation is one of the three characteristics of surface object programming, encapsulation is to combine the properties and services of an object into a separate unit, and to conceal the inner details of the object as much as possible, including two meanings:

1. Combine all the attributes of an object with all services to form an indivisible independent unit (i.e. object).

2. Information concealment, that is, as far as possible to conceal the internal details of the object, the external formation of a boundary (or form a barrier), only a limited external interface to make it contact with the outside.

The principle of encapsulation in the software reflects that the requirements of the object beyond the arbitrary access to the object's internal data (attributes), thereby effectively avoiding the external error on its "cross-infection", so that software errors can be localized, greatly reducing the difficulty of error-checking and debugging.

Use an example to illustrate, if a person's object has attributes such as age and wages, such as the nature of personal privacy is not to let others feel free to obtain, if you do not use encapsulation, then others want to know can be obtained, but if you package on the other people will not be able to obtain the attributes of encapsulation, unless you say it yourself , otherwise there is no way for others to get it.

For example, a personal computer has a password that does not allow others to log in and copy and paste it in your computer. There is a human object, height and age attributes, can only be to increase their own, can not let others arbitrarily assigned to the value and so on.

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.