How to solve the bottleneck of learning PHP in depth

Source: Internet
Author: User
Tags learn php php framework
php.cn/"target=" _blank ">php to the learner's feeling is: Beginner's time is very easy, but the study 2-3 years, on the deep feeling met the bottleneck, it is difficult to go deep, give up and pity. The so-called "chicken ribs, food tasteless discard" feeling is very appropriate.

Often there is this feeling: do not learn, seemingly do not retreat, learning, as if there is no progress; if...else, looping these you also know, even remember some other people do not function, but when the project comes, the head is big. In spite of thousands of words in the mouth, but in fact there is no policy. Encounter any problems are confused, fear, not to be ...

At this point, first of all congratulate you have been in the entry, and then congratulate you encountered in-depth study of PHP bottlenecks.

But once you pass this level, your level of awareness will be higher. But this level is not easy to pass. Because it's not PHP stuff that's blocking you, it's a lot of non-php stuff ...

How to solve this bottleneck? How to learn php in depth?

1: In-depth understanding of programming ideas

The programming ideas involved in PHP development projects are: process-oriented programming implementation, object-oriented programming, and aspect-oriented programming.

Not only is familiar, but to be proficient;

PHP starts with variables, branch statements, loop statements, and then functions, so this is the programming idea you'll encounter at the outset: process-oriented programming ideas. It is a processing idea that encapsulates the code that causes duplication into functions, in the form of functions. Can use this kind of thought to develop the project directly, also can develop out. But you will encounter a lot of repetitive code, you will create a lot of files, so only with process-oriented programming ideas to develop projects, the biggest feature is: The number of files in the project is too many ... Too many files will cause the distribution of folders difficult to control, also not conducive to project maintenance and upgrade, difficult to large projects, usually do a business station almost.

You should reduce the number of files, then you need new ideas: object-oriented programming ideas. Its main features are: encapsulation, abstraction, inheritance, polymorphism, interface.

Do not memorize these, to fully use the truth to understand it, at least to convince yourself. For example: ask you, why should have inheritance, why should have polymorphic? For what reason did they arise? Why are their looks like that?

This is the focus, but also the difficulty. Difficult on, you seem to have seen, but also read a lot of books, but the use of the time seems to be wildest. Because you didn't thoroughly understand it. This will at least hinder your understanding of the PHP framework, such as a lot of people using TP development projects, with laravel development projects, but you have been in-depth study of TP source code? Laravel's source code? What is composer? Why are you doing this?

At this point you should be "thin book read thick" stage, you have to find the answers to these questions, ask why, and then go to find the answer, in the process of looking for answers, you unconsciously raised the level ...

Using object-oriented thinking to develop projects, you can greatly reduce the number of files, so that your project is very compact, streamlined, but functional and powerful, and good extensibility. However, when your project is getting bigger and larger, you will find that there are still a lot of repetitive code, they are the inevitable duplication between files and files, this is not an object-oriented flaw, but the problem of the project itself, object-oriented is just not strong enough to solve it (the process is not much more). At this point you are going to upgrade your new ideas: Facing the aspect programming idea. Maybe this thought you feel very vague. But if I say "get the data label in a template", you should be clear.

Shaped like:

5 "order=" ID ASC "limit=" >

{$title}---{$author}

{$add _time}

This is the way to get dynamic data that you often use when you set up a template. But can you explain why you're doing this? And why did it grow this way?

In fact, to answer these questions, you have entered the area of aspect-oriented programming thinking, because you have to understand the template parsing engine profoundly ... It is a code redundancy problem that is brought about to solve large projects but object-oriented is not yet solved. This will make your project more and more big ...

2:MVC, single entry, regular expression, etc.

MVC does not remember these words, it is to understand it profoundly. Understand why there are controllers, Model,view, and what their respective content should be ...

Regular expressions also need to be very skilled.

3: Database in depth

For the database of sub-Library, table, partition, database cluster to start learning.

Database optimization, such as: index optimization, SQL statement optimization and so on.

4: Processing of various caches

Such as: File cache, database cache, memory cache and so on.

This will involve a lot of things, such as: configuration file writing and operation, database Cache table, cache fields and so on. The introduction of NoSQL, such as: Memcache,redis,mongodb, ....

5: Server

Mainly Linux server, it has more content on the above, the first to bring out the Apache,nginx and other web monitoring programs.

There are ssh,ftp, and other commonly used procedures.

Go into a bit more shell programming, and shell programming to develop a server management system, such as: AMP,WDCP, .... These things seem to do php work you have nothing to do, but if your site can not access, you know where there is a problem? So it's not about it, it's about it, so don't keep that limited sense of narrowness.

6: Load Balancing, website anti-pressure, etc.

These are the necessary elements for a project with a potential for development, how much do you know? It's about PHP.

7: Deep Learning data structure

Believe that when you are a freshman, you learn the data structure, the inside of the pointers, lists, queues, stacks and so on, you will listen to the foggy, and you do not use it. But at this stage you can learn in depth, it will help to understand the principles of Apache, of course, it will make it easier and easier for you to use Apache. This is actually in the intangible to help you solve the bottleneck problem.

8: Need to learn the underlying language

Mainly: C language, C + +; visible C and C + + are very important base languages. The PHP interpreter is written by C + + and the browser is written by them, which of course is associated with your PHP application.

9: Strengthening learning at the application level

Such as: development, the use of various 3rd party plug-ins, such as: Jquery,layer,bootstrap,uploadify. Even write your own plug-in required.

Don't just limit PHP, but start with the front end, because the front-end stuff will give you a deeper understanding of PHP. For example: Home page of the article extraction, if the number is 1,2,3,4,5 these, you can solve from the front, but also from the PHP side to solve ... What if a more perverted message is asked to show? It is possible to solve the problem in PHP or even on the database side ...

Expanding your knowledge will help you learn php in depth ...

In short, when you learn PHP has a certain foundation, you will not easily say that PHP is easy, very simple, two weeks to learn such childish words. You may even feel that you are getting smaller, you need to learn a lot of things, so fortunately, at least you really are in this line, but more and more will encounter the bottleneck of the deep learning PHP. The things that hinder your progress are those of many non-PHP. You have to use open-minded mentality to dabble in those encountered, do not choosers, pick, abandon this dislike that, but all day and complain ....

As long as persist, solve a new why, your bottleneck will have the past day, then you are the real learning has become, a mastery and comprehensive problem-solving ability of Daniel.

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.