[Chatting with PHP] The beauty of Loli in the programming field -- PHP, -- php

Source: Internet
Author: User
Tags learn php php server php programming language php web development

[Chatting with PHP] The beauty of Loli in the programming field -- PHP, -- php

Address of this Article

 

01 Preface -- boarding a thief ship

I don't know when I got on the PHP thief ship and started web development. I remember I was a person in the traditional electronics industry almost two years ago, and I am an embedded company, at that time, I had to play with the phone in Tianjin, the phone in the Coal Kiln, or the sphygmomanometer in the Medical Electronics. At last, I couldn't help it, and the money was too little!

One of my friends told me, kid, don't cry. Let's learn PHP. You can stand up and quit...


PHP · beautiful young girl

 

In my eyes, I followed suit. I asked why I didn't choose the popular Wang Dao Java. kiyou's words are much harder than PHP. I am focusing on the Internet field. I came to the portal of the cosmic center and started the PHP practice. This is an Internet education institution. I am very happy to study and work here. I have done a lot of projects, I have made many friends, and the beautiful pictures of the imperial capital are like a beautiful woman. I am very happy.

Later, I came to the current medical Internet company. PHP uses its own framework, which has deep traces of Java and uses many web components. I learned a lot. Such as the underlying ORM, domain-driven model, business data splitting, asynchronous MQ, cache Memcache, redis, and so on.

From January to February, I think it is time for me to have a good chat about PHP. I hope you will not give a round of applause or praise. If you say something bad, you will make a brick and point it out for me to correct it. Thank you.

02 web development language-PHP

PHP is a scripting language dedicated to web development. It has simple syntax and is very easy to use, but it is not easy to do very well. Just like everyone can write, but writing very beautiful articles is not something that most people can do. PHP development is also widely used, and all aspects of web development are designed. The prime combination of technology LAMP/LNMP also refers to the Linux operating system, Apache/Nginx web server, and mysql database, and PHP programming language.


Powerful PHP Web development tool

 

03 object-oriented and data structure-PHP

In the past few years, PHP is still process-oriented programming and has recently become object-oriented. In a single sentence, PHP is simple, customizable, and the program is quite free and flexible, with any variables, you can print var_dump to see what it is, which is much better than Java. To print different variables in Java, different methods of different classes are required for implementation, which is complicated. In addition, the main data structures of PHP are mainly strings and arrays, which basically include the PHP % 80 programming volume. The PHP array is particularly powerful and almost implements a set in Java, hash and other structures are so simple and quick.


PHP · Object-Oriented Programming ~

 

04 MVC, framework and Design Pattern

PHP development also follows the MVC pattern. The data layer Model, View layer View, and control layer Controller. This low-coupling and high cohesion design method has also become the backbone of the industry. Many excellent PHP frameworks, such as CI and ThinkPHP, follow MVC. Of course, you are happy to be able to implement the so-called common design patterns in PHP, such as Singleton mode and observer mode.

05 LAMP/LNMP-a free and open-source gold combination

The Linux system is really awesome. The command is concise and efficient, and the black and white characters are elegant. The stable and powerful performance is fascinating! PHP server code runs on Linux, a free and efficient system. Many O & M personnel keep chatting with Linux in other languages such as shell or Python. VIM is also the god editor in Linux. Every day, we will learn and grow.


Php lnmp prime combination

 

Apache and Nginx are common web servers in PHP. They mainly solve routing and request forwarding problems, as well as load balancing and reverse proxy. Clusters to build highly available web applications, which are enterprise-level applications. This part is also the part that I want to improve. If I have time, I have to take the source code and study it carefully. The design is exquisite and all in it.

The MySQL database is also small and cute. It is a perfect match with PHP. It supports addition, deletion, modification, and query. It supports the Innodb Engine of transactions and optimizes query statements, you and I have to worry about it.

PHP itself is the core here. After all, it is a programming language. This is the best programming language in the world. It runs on a Linux system and accepts requests forwarded by Apache or Nginx to process the displayed data in the Mysql database. This is the charm of PHP. It is so awesome to render html pages together with the front end and JavaScript, haha ~

06 High-Performance web applications-PHP Architecture

To ensure the high performance and high availability of the website, you can enter the website address in your browser and display it on a gorgeous page, although it takes only a few seconds, there are too many things in the middle. Now let's unlock the secrets here.

Enter the URL, and the browser client initiates an http request to resolve the IP address corresponding to the URL to the CDN data center. Kaige routes all the way forward, and the speed is of course the speed of light. Optical fiber or cable. At the web server layer of the website, Server Load balancer routes data to servers in a server cluster. It is possible that data is taken directly from the cache server, or PHP code may be requested, continue to the MySql database. After the service is processed, output the data to the web server, return the data along the original path, go to the client browser, and render the page together with JS. Complete all the work. Is it amazing.


PHP · build high-performance websites

 

There are many technologies used in it, such as DNS, CDN, Server Load balancer, reverse proxy, cache server cluster, application server cluster, routing algorithm, and database cluster waiting, it's enough for you to learn.

07 written at the end

There is no end to it. Learn more. You can do better.

PHP is a pretty girl, you deserve it ~


PHP · girl you deserve

 

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.