PHP programmer's technical growth plan

Source: Internet
Author: User
Tags apc
According to the current mainstream technology, this article provides a basic explanation. The entire process is based on the assumption that PHP programmers are not very well-founded, and all the settings are very specific and clear, this may make people feel uncomfortable. please understand that it only represents the evolution of many PHP/LNMP programmers that we know in the words of the family. in combination with my personal experience, we can abstract many programmers who are confused about the future, especially blind and confused about technology learning, this simply sorts out the technical requirements of PHP programmers at each stage to help many PHP programs compare and set learning growth goals.

According to the current mainstream technology, this article provides a basic explanation. The entire process is based on the assumption that PHP programmers are not very well-founded, and all the settings are very specific and clear, it may make people feel uncomfortable. please understand that it only represents the words of the family. (Future technological changes will not be discussed)

Phase 1: Basic Stage (basic PHP programmer)

Focus: get familiar with LNMP (the core is the basic installation and configuration operations)
Objective: to install and maintain the basic LNMP system, develop PHP for the basic simple system, and support a certainDevelopment of PHP functional modules.
TIME: The time needed to complete this phase varies from person to person. some of them have grown over half a year, and some have grown slowly for two or three years.

1. Linux:
Basic commands, operations, startup, and basic service configurations (including rpm installation files and various service configurations); write simple shell scripts and awk/sed script commands.

2. Nginx:
Install and configure nginx + php, know the basic nginx core configuration options, and know the basic configurations such as server/fastcgi_pass/access_log. The goal is to make nginx + php_fpm work smoothly.

3. MySQL:
Will build mysql by yourself, know the basic mysql configuration options, know the differences between innodb and myisam, know the different configuration options for the InnoDB and MyISAM engines;
Know the differences between the two basic engines and select the above differences; be able to manually build a MySQL database and configure the encoding to run normally and stably; the core objective is to build a runable MySQL database.

4. PHP:
Basic syntax array, string, database, XML, Socket, GD/ImageMgk image processing, etc. familiar with various APIs connected to MySQL (mysql/mysqli/PDO ), know how to solve various coding problems; know the commonly used PHP frameworks (ThinkPHP, Zendframework, Yii, Yaf, etc );
Learn about the basic MVC running mechanism and why, and know the differences between different PHP frameworks. you can quickly learn an MVC framework. Be aware of the file directory organization in the development project, have a basic good code structure and style, and can complete the development of a small system and a module in a medium-sized system.

5. front-end:
If the condition time permits, you can learn relevant knowledge such as HTML, CSS, and JS, know what web standards are, and know the difference between HTML5 and HTML4 in the web/wap page mode of p + css; learn about some basic frontend and JS frameworks (such as jQuery );
Understand some basic JavaScript programming knowledge;

6. system design:
Able to complete the basic design of small systems, including simple database design, and complete the basic design and development of the browser-> Nginx + PHP-> database architecture; supporting the development and maintenance of hundreds of thousands to millions of websites each day;

Stage 2: improvement stage (intermediate PHP programmer)

Key points: improve LNMP-specific skills and be able to use LNMP more comprehensively.
Objective: to build an LNMP environment anytime, anywhere, and quickly complete routine configuration. it can trace and solve most of the problems encountered in development and online environments;
Can independently undertake the architecture and development of medium-sized systems; can undertake the development of a medium-sized module in large systems;

1. Linux:
On the basis of the first stage, we can smoothly use Shell scripts to complete a lot of automated work. awk/sed/perl is also well-operated and can complete a lot of text processing and data statistics;
Basically, you can install most non-special Linux programs (including various libraries, packages, and third-party dependencies, such as MongoDB/Redis/Sphinx/Luncene/SVN );
Learn about basic Linux services, how to view Linux performance indicator data, and how to track issues under basic Linux systems.

2. Nginx:
On the basis of the first stage, learn more about complicated Nginx configurations, including multi-core configurations, events, proxy_pass, sendfile/tcp _ * configurations, and related configurations and performance impact such as timeout;
Know that nginx not only supports web server, but also supports proxy server and reverse static server configurations, know basic nginx configuration optimization, know how to configure permissions, compile an nginx extension to nginx;
Know the basic operating principles of nginx (master/worker mechanism, epoll), and know why nginx has better performance than apache;

3. MySQL/MongoDB:
On the basis of the first stage, master many tips in MySQL development, including regular SQL optimization (group by/order by/rand optimization );
In addition to setting up MySQL, MySQL data can be backed up in hot and cold ways, and configuration options that affect innodb/myisam performance (such as key_buffer/query_cache/sort_buffer/innodb_buffer_pool_size/innodb_flush_log_at_trx_com ), you also know how many values these options are configured as appropriate;
In addition, we also know some special configuration options, such as how to set up the mysql master-slave synchronization environment and the differences between binlog_format;
Know MySQL Performance tracing, including slow_log/explain, and basic indexing and processing knowledge;
In terms of principles, understand the basic MySQL architecture (Server + storage engine) and the basic InnoDB/MyISAM index storage structure and differences (clustered index and B-tree ); understand the basic InnoDB transaction processing mechanism;
Understand how to handle most MySQL exceptions (or where to find the solution ).
If conditions permit, we recommend that you understand the MongoDB database represented by NoSQL. By the way, you can compare the differences with MySQL. at the same time, you can use MongoDB safely and cautiously in appropriate application scenarios, understand the basic development of PHP and MongoDB.

4. Redis/Memcached:
Cache processing is required in most medium-sized systems, so you must understand the basic cache;
Knowing the similarities and differences between Memcached and Redis, installing Redis/Memcached independently, understanding some basic features and restrictions of Memcahed, such as the maximum value, and understanding how PHP works with them;
Redis understands basic working principles and usage, common data types, scenarios and types of applications, and Redis transactions. In principle, we can get a rough idea of Memcached's memory structure (slab mechanism), and redis will understand the underlying storage structure (SDS/linked list/SkipList/HashTable) of common data types, by the way, it is better to understand Redis's transaction, RDB, AOF, and other mechanisms.

5. PHP:
In addition to the capabilities of the first stage, PHP and various third-party extensions can be installed at will in terms of installation configuration;
Understand most of the configuration options and meanings of php-fpm (such as max_requests/max_children/request_terminate_timeout and other factors that affect performance), and know the differences between mod_php and fastcgi;
I have already been familiar with various basic technologies in PHP, as well as a variety of in-depth PHP, including in-depth understanding of PHP object-oriented/SPL/special features at the syntax level, such as reflection;
I have read at least one common PHP MVC framework code in the framework, and understand the internal implementation mechanism and design concept of the basic PHP framework;
In PHP development, you have been able to use regular design patterns for application development (Abstract factory/Singleton/Observer/command chain/policy/adapter );
We recommend that you develop your own php mvc framework to fully enable development liberalization, so that you can deeply understand the MVC model and quickly upgrade your business project development;
Familiar with various PHP code optimization methods, familiar with solving most PHP security problems, and familiar with basic PHP execution mechanism principles (Zend Engine/Basic Extension working mechanism );

6. C/C ++:
He started to explore certain C/C ++ languages and was able to write basic C/C ++ code, familiar with basic C/C ++ syntaxes (pointers, Array Operations, strings, and standard APIs) and data structures (linked list, tree, hash, and queue;
Have a basic understanding of the C language development concepts in Linux, write simple makefile files, and be able to compile and debug a simple GCC/GDB program;
Have a rough understanding of basic network programming. (This project aims to lay the foundation for a higher level)

7. front-end:
On the basis of the first stage, familiarize yourself with the basic HTTP protocol (protocol code 200/300/400/500, basic HTTP interaction header );
If conditions permit, you can write in depth a slightly elegant HTML + CSS + JavaScript, or you can simply use some front-end frameworks (such as jQuery/YUI/ExtJS/RequireJS/BootStrap );
If conditions permit, you can learn JavaScript programming in depth, such as the closure mechanism and DOM processing. you can also read jQuery source code for further study. (This project does not focus on learning unless you are interested in the frontend)

8. system design:
Ability to design the website architecture, database, and basic PHP framework selection for most medium-sized systems; performance testing and troubleshooting; ability to complete similar tasks: Browser-> CDN (Squid) -> Nginx + PHP-> cache-> basic design, development, and maintenance of database structure websites; supporting the development and maintenance of basic websites with millions to tens of millions of traffic per day;

Stage 3: Advanced (advanced PHP programmer)

Important: in addition to the basic LNMP program, you can also have in-depth learning in a certain direction or field. (In-depth development)
Objective: in addition to basic PHP business development, it can also solve most in-depth and complex technical problems and independently design medium and large system design and development;
I am able to independently hold a certain technical direction, which is relatively professional. (For example, in-depth research on MySQL, Nginx, PHP, Redis, etc)

1. Linux:
In addition to the capabilities of the second stage, in addition to routine operations and performance monitoring tracking in Linux, you can also use a lot of advanced and complex commands to complete the work (watch/tcpdump/starce/ldd/ar). in terms of shell scripts, it has been able to write more complex shell scripts (more than 500 lines) to assist with a lot of shells including backup, automated processing, monitoring, and other work;
Awk, sed, perl, and other applications have been widely used, allowing you to control and process data in various complex formats;
I have some knowledge about the internal mechanism of Linux and basic processing of kernel module loading and startup error handling. I also know some other related things, such as NFS and disk management;

2. Nginx:
On the basis of the second stage, we have been able to skillfully operate and maintain Nginx, such as monitoring, performance optimization, and complex problem handling;
If you look at your personal interests, you can focus on the in-depth study of the working principles of Nginx, mainly starting from reading the source code, such as the specific master/worker working mechanism, nginx internal event processing, memory management, and so on. you can also learn about Nginx extension development and customize some of your own private extensions;
At the same time, you can have a certain degree of understanding of Nginx + Lua to see if a better mode can be combined with the application. the requirement at this stage is an in-depth understanding of the Nginx principle, you can consider becoming an in-depth professional in Nginx.

3. MySQL/MongoDB:
On the basis of the second stage, in terms of MySQL applications, in addition to the basic SQL optimization, some complex operations can be completed, such as importing and exporting large volumes of data, high-risk operations such as modifying the table structure or adding or deleting index fields of a large volume of online data;
In addition to the installation configuration, you have been able to deal with more complex MySQL problems, such as tracing of various problems, master-slave synchronization latency, data synchronization across data centers, MySQL high-availability architecture, etc. familiar with MySQL applications and key MySQL technologies, for example, the transaction mechanism (isolation level, lock, etc.), the trigger, partition and other technologies have a certain understanding and application, MySQL performance, including disk optimization (SAS migration to SSD) server Optimization (memory, server configuration), other core performance optimization options (innodb_log_buffer_size/back_log/table_open_cache/thread_cache_size/innodb_lock_wait_timeout), and application selection for connection pool software, I have a deep understanding of the operation statements of the show * (show status/show profile) class to trace most performance problems;
Deep understanding of MySQL backup technology, including disaster recovery and recovery, deep understanding of Binlog, cold/hot backup, and multi-IDC backup;
Learn more about the principles of MySQL, for example, reading some source code about the working mechanism of MySQL, for example, learning the source code of the master-slave synchronization (replication) technology, you can also learn and understand the source code of a storage engine (MyISAM/Innodb/TokuDB). if conditions permit, you can refer to the CSV engine to develop your own simple storage engine to save some data, enhance understanding of MySQL. in this process, if you are interested, you can also consider developing towards DBA.
At the MongoDB level, you can consider, for example, starting to apply MongoDB online when writing less and reading more data, or performing online data analysis and processing operations. the specific scenarios can follow the work instructions, however, the core is to better understand the applications in different scenarios of RMDBS and NoSQL. if conditions or interests permit, you can start to learn more about the working mechanism of MongoDB.

4. Redis/Memcached:
On the basis of the second stage, we can further apply and learn. Because Memcached is not very complex, it is recommended that you read the source code, especially the memory management part, to facilitate in-depth understanding;
In Redis, you can do more complex data structures (zset is used for ranking/transaction processing to ensure atomic usage in scenarios such as seckilling );
Design a highly available Redis application architecture and cluster for learning applications that involve synchronization mechanisms such as aof;
We recommend that you thoroughly learn the Redis source code and apply the accumulated knowledge in the second stage, for more information, see core event management, memory management, and internal core data structure. If you are interested, you can become a very professional Redis user.

5. PHP:
As the basic core skills, we need to have more in-depth learning and application on the basis of the second stage. From the basic code application, it can solve 95% of PHP development problems and understand most PHP skills;
Most PHP frameworks can be used quickly within one day, and the advantages and disadvantages of various mainstream PHP frameworks can be understood, so as to quickly and conveniently select technical models during project development. in terms of configuration, in addition to the general knowledge in the second stage, we will learn some of the configuration options (php auto_prepend_file/auto_append_file), including some complex advanced configurations and principles of extensions (such as memcache in memcached extension configuration. apc in hash_strategy and apc extension configuration. mmap_file_mask/apc. slam_defense/apc. file_update_protection );
I have a better understanding of the working mechanism of php, including the working mechanism of php-fpm (for example, php-fpm enables process count calculation and the principle under different configuration machines ), familiar with the zend Engine (vm/gc/stream processing), read the basic PHP kernel source code (or read related articles ), understand most of the core data structures (basic type/Array/Object) of PHP internal mechanisms, and have an in-depth understanding of the core infrastructure (zval/hashtable/gc; be able to perform basic PHP extension development, learn about some advanced extension development knowledge (minit/rinit, etc.), and be familiar with the details of different communication and interaction modes between php and apache/nginx (mod_php/fastcgi );
In addition to developing PHP extensions, you can consider learning to develop Zend extensions to learn more about PHP at the lower layer.

6. C/C ++:
On the basis of the second stage, you can have a deeper understanding of the C/C ++ language and complete the development of small and medium C/C ++ systems;
In addition to the basic C/C ++ syntax and data structure of the second stage, you can also learn some special data structures (B-tree/rb-tree/skiplist/lsm-tree/trie-tree) to meet your needs in special work. in terms of system programming, familiar with multi-process and multi-thread programming;
In the multi-process scenario, we will learn about the communication methods among most of the multi-processes, and be able to flexibly select the communication modes (shared memory, semaphores, and pipelines). multi-thread programming can effectively solve the lock conflict problem, it is also able to develop and debug multi-threaded programs. at the same time, it is familiar with network programming and understands the differences and selection of multi-process, multi-thread, and asynchronous network I/O models, familiar with the principles and differences of different asynchronous network I/O models (select/poll/epoll/iocp), and familiar with common asynchronous frameworks (ACE/ICE/libev/libevent/libuv/Boost. ASIO) and usage. if you are free to use it, you can also look at some libraries developed by yourself in China (such as muduo ); at the same time, it can design a high-concurrency program architecture (such as leader-follow/master-worker );
Measure the test taker's understanding about most of the problems (memory management, log printing, high concurrency, frontend and backend communication protocols, and service monitoring) in C/C ++ backend Server development ), understand the RPC communication problems of various backend services (struct/http/thirft/protobuf, etc.); be familiar with using GCC and GDB to develop compilation and debugging programs, after the core of the online program is lost, it can quickly trace and solve the problem. in terms of general module development, you can accumulate or develop some common tools or libraries (such as asynchronous network framework, logstore, memory pool, thread pool, etc.). However, you should be cautious when using the tools or libraries after development, provincial traps to catch bugs;

7. front-end:
Gain an in-depth understanding of the HTTP protocol (including the code and the reasons behind the special protocols, such as 302 static file cache and 502 php suspension after nginx ); in addition to the various front-end Framework application integration capabilities, if you are interested in front-end learning, you can develop some front-end frameworks similar to jQuery, or develop a rich text editor and other trivial tests of JavaScript skill;

8. language learning in other fields:
It has a basic accumulation in the basic PHP/C ++ language. it is recommended that you try to learn different programming languages and look at your hobbies at the current stage, you can learn Python, Ruby, and other script languages. for functional programming languages, try Lisp, Haskell, Scala, and Erlang. for static languages, try Java or Golang, data statistics and analysis can help you understand the R language. if you want to use backend services from another perspective, try Node. js also includes Nginx_Lua, which is used with Nginx. To learn different languages, you can improve your horizons and solve the problems. for example, you can learn about the lightweight coroutine in addition to processes/threads. for example, in cross-machine communication scenarios, the Erlang solution is simple and amazing. for example, if you don't want to select C/C ++, there are also highly efficient Erlang/Golang availability and so on. The main purpose is to improve your vision.

9. other majors:
In this phase, apart from the basic LNMP skills, some other fields of knowledge will be considered for learning. these are all possible, depending on personal interests and long-term objectives. Currently, many fields can be selected, such as cloud computing (distributed storage, distributed computing, virtual machines, etc.), Machine Learning (data mining, pattern recognition, etc, applied to statistics and personalized recommendations, natural language processing (Chinese word segmentation, etc.), search engine technology, graphic images, speech recognition, and so on. In addition to these high-performance systems, there are also many engineering aspects to learn from, such as high-performance systems, mobile development (Android/IOS), computer security, embedded systems, hardware and other directions.

10. system design:
On the basis of the second stage, the system design can be applied to master experience and skills to design complicated medium and large systems, which can solve various online complex system problems, complete similar browser-> CDN-> server load balancer-> access layer-> Nginx + PHP-> service cache-> database-> various complex backend RPC interactions (storage backend, logical backend, anti-cheating) backend and external services) -> more complex backend services with soy sauce; support normal development and maintenance of websites with tens of millions to hundreds of millions of traffic per day.

Stage 4: Architecture (architect)
Stage 5: Expert stage (direction to field experts)
Stage 6: Scientist stage

Adapted from the "dark night passers-by" blog.

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.