There are a few people around to do PHP development, because the interview, also exposed to a lot of PHP engineers, they often doubt their future in the technical growth and development, I often give them some advice, I hope they can break themselves, have better development.
PHP Engineers face growing bottlenecks
The first clear I refer to the PHP project, refers to the graduation work, mainly in PHP web system development, no other language work. Work experience in about 3-4 years, ordinary Web system (millions access, level 1000 data or business logic is not particularly complex) development of basic handy, no problem. But they're going to do something like this:
In addition to PHP's non-use of other languages, a shell script may be ordered.
The mastery of PHP is not fine (many PHP manuals are not read, except the library)
Narrow knowledge (in the face of demand, except the use of PHP and MySQL, do not know the other solutions)
The PHP code takes the process as the main idea, the object-oriented implementation is too round, can not understand
These phper are a lack of thought when it comes to the complexity of projects or business logic that requires high performance, high concurrency, and large amounts of data (systems need to address multi-domain business issues). Can not analyze the nature of the problem, technical judgment is poor, the problem can find a temporary solution, but often in the temporary solution, the system and their own step by step toward collapse. So how do you improve yourself? How can you challenge a more demanding system?
Where is the higher challenge?
In combination with my own experience, I have listed some specific challenges so that we can first have a perceptual understanding.
Where are the challenges of high-performance systems?
How do I select a Web server? Do you want to use fast-cgi mode
Do you want to use the reverse proxy service? Select Full memory cache or hard disk cache?
Do you need load balancing? Is it based on the application layer or the network layer? How to guarantee high reliability?
How is your PHP code performing, and what happens after you use the optimizer tool? Where are the performance bottlenecks? Do you need to write a C extension?
What are the characteristics of user access, read more or write more? Do you need read/write separations?
How is data stored? What is the write speed and readout speed? How does data increase access speed read change?
How do I use caching? How to consider failure? How is data consistency guaranteed?
Where are the challenges of high complexity systems?
Can you identify the areas that your business corresponds to? Is it one or more?
Can the business be reasonably abstracted, and the changes in business rules can be achieved at a very small cost?
Data consistency, security can be guaranteed?
Does it hold the method of object-oriented analysis and design?
When I list the questions you are sure to answer, I think technically you may have become an architect. How you can not yet answer, you need to strengthen in the following several directions.
How to improve and break through the bottleneck
How you can not yet answer, you need to strengthen in the following several directions:
Analyze the principle of the technology you use and the mechanism behind it, so that you can improve your technical judgment and improve the correctness of your technical options.
Learn important knowledge during college, operating system principles, data structures and algorithms. Know that you used to study for exams, but now you need to learn for yourself, let yourself know why.
Start learning C again, although you've already learned it in college. This is not just because you may need to write a PHP extension, but also because, in the application of C, there is an environment that is concerned with performance, memory control, variable life cycles, data structures, and algorithms.
Learning object-oriented analysis and design, it is an effective way to solve complex problems. Learning abstraction is the only way to solve complex problems.
"How long will it take to learn so much stuff?"
If you work hard, there is better planning, estimated to take 1-2 years, how to learn the problem, we follow up again.
(Note: The following are the learning methods shared by the original author Zuo Wenjian)
Learning Advice
How to study effectively is a big problem. Some of their own practice but very fragmented, not good summary. Before going to bed last night, I suddenly thought of the core of RUP, "architecture-centric, use-case-driven, iterative development", to borrow this idea, about effective learning methods, can be expressed as:
Focus on principles, models or mechanisms, task-driven, iterative learning
A little abstract, for example, to illustrate how to learn.
Objective: To learn how to improve processing performance.
An iterative-driven task: Locate the region by IP.
This is a common task for Web applications, and the IP database is a record of around 10 mangyo.
First iteration: Implementing functionality without regard to performance (implemented via PHP)
Because it is not possible to find a region directly through key (IP), it is not easy to put it directly into the data or through an associative array. The idea is to sort the data before you look for it.
1. How do I find through IP? Ordered data, binary lookup is the fastest.
2. How to sort? Using the library function sort of course is OK, but that is learning, it is to achieve a quick sort of it yourself.
Learning Goals: Sorting algorithms, finding algorithms
Phper data structure and algorithm foundation is poor, usually do not have this task, oneself also do not study, therefore this aspect of knowledge is very lack. However, the problem of programming solves eventually comes down to the data structure and algorithms for manipulating this data structure. If the data structure algorithm is often in the mind, then the problem can be clearly recognized its internal structure, the solution will naturally arise.
Second iteration: Optimizing the loading and sequencing of data
If you do the first step, it's basically not available because the data needs to be loaded and sorted every time, so it's too time-consuming. The idea is that once the data is loaded and sorted, it is placed in a place where every PHP process can access it.
Put it in memcache it's easy for everyone to think of. In fact, in the shared memory (EA and other accelerators are supported) is a faster way, because memcache more network operations. How do you test performance when the data is put into shared memory or chunked? How to analyze the bottleneck (xdebug)? Driven by these problems, you will learn
Learning Goal: The method of detecting, locating and optimizing PHP performance; The impact of PHP implementation structure on performance.
Third iteration: Writing PHP extensions
Performance or not to go, have to enter the world of C + +, but you will not just phper and service end of the all-round engineer, of course, this has not done the C + + students challenge is huge. I can't simply say how to learn C/C + +, you can see PHP programmer learning
Learning Goals: Learning from C + +, writing PHP extensions
How do you determine the mechanisms and principles that you need to learn? How to find the driving learning task?
I have no concept of what needs to be learned, how to answer the above two questions?
From the positioning of this technology to find out the need to learn the focus, that is how it does (mechanism) and why it can do so (model or principle)
List the most common applications of this technology, as a learning task, from simple to difficult to practice.
If I need to learn JavaScript, I have some perceptual knowledge about html,css.
First of all, I understand that JS is the dynamic language of the web domain, mainly to solve the dynamic interaction of web pages.
The main points I want to learn are as follows:
If you are fully self-taught, find the key points (mechanisms, models, principles) that you need to learn to set up a learning task is really not that easy to grasp. If you find an experienced person to guide you or add a learning team, the speed of learning will certainly be greatly improved.
Finally, I want to say is: PHP because of the simple and use, but not because of its simplicity and limit our growth!
PHP Engineer Breakthrough