PHP Object Oriented thinking
1. Client sends HTTP request to server
2. The server responds with return data (Xml,json or other) arrives at the client
The difference between XML and JSON
1. Readability: XML wins
2. Generate Data: JSON wins
3. Transfer speed: JSON wins
Get data and submit data
1. Get the data: Get the data from the database or cache and return it to the client via the interface data
2. Submit data: Submit data through the interface to the server, and then the server storage processing or other processing
The general examples of interfaces are as follows:
<?PHPHeader("Content-type:text/html;charset=utf-8");/** * Defining an interface * provides a standard*/Interfacevideo{ Public functionGetvideos (); Public functionGetCount ();}classMovieImplementsvideo{ Public functionGetvideos () {Echo1; } Public functionGetCount () {Echo2; }}movie::Getvideos ();Echo' <br/> '; movie::GetCount ();?>
."". ."",
| | / /
| | / /
| | / /
| |/ ;-._
} ` _/ / ;
| /` ) / /
| / /_/\_/\
|/ / |
(' \ '-|
\ `. /
| |
| |
App Interface Basics Learning One