How PHP programmers can break through growth bottlenecks (PHP development for 3-4 years)

Source: Internet
Author: User
Tags php and mysql

As one of the most widely used languages in web development, PHP has a lot of fans, so are you a good programmer? At the same time of self-cultivation, do you want to face all kinds of problems, how can I break the bottleneck in order to better development?

PHP Engineers face growing bottlenecks

First of all, the PHP engineer referred to here refers to the development of web systems primarily in PHP, and does not work in its language. 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).

Knowledge is narrower (in the face of demand, except the use of PHP and MySQL, do not know 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?

You can definitely answer the questions listed here, stating that 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 the exam, 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 only because you may need to write PHP extensions, but also because, in the application of C, there is a moment of concern for performance, memory control, variable life cycle, data structure and algorithm environment;

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 to study effectively is a big problem. "Architecture-centric, use-case-driven, iterative development", borrowing this idea, on effective learning methods, can be expressed as follows: the principle, model or mechanism-centric, 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:

How do I find through IP? Ordered data, binary lookup is the fastest.

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)? You will learn by driving these questions.

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.

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. 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. The first thing to understand is that JavaScript is a dynamic language in the Web, primarily addressing the dynamic interaction of web pages. The key points to learn are as follows:

How JavaScript interacts with HTML (mechanism)

Where is the dynamic nature of JavaScript, and how does it differ from other dynamic languages? (Language model)

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.


Original: http://www.imop.us/welcome/categoryview/MTU4NA==.html

How PHP programmers can break through growth bottlenecks (PHP development for 3-4 years)

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.