Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What technology should middle and senior PHP programmers master?

2024-07-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you what technology middle and senior PHP programmers should master, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Intermediate PHP programmer

1.Linux

Can fluently use Shell scripts to do a lot of automated work; awk/sed/perl also operates well, can do a lot of text processing and data statistics, etc.; basically can install most non-special Linux programs (including various libraries, packages, third-party dependencies, etc., such as MongoDB/Redis/Sphinx/Luncene/SVN, etc.) Understand the basic Linux service, know how to view Linux performance metrics data, know the basic Linux problem tracking, etc.

2. Nginx:

On the basis of the first stage, understand more complex Nginx configuration; including multicore configuration, events, proxy_pass,sendfile/tcp_* configuration, know timeout and other related configuration and performance impact; know that nginx in addition to web server, but also can undertake proxy server, reverse static server and other configurations; know basic nginx configuration tuning; know how to configure permissions, compile a nginx to extend to nginx Know the basic nginx operation principle (master/worker mechanism, epoll), know why nginx performance is better than apache performance, etc.

3. MySQL/MongoDB:

On the basis of the first stage, I have mastered a lot of tips in MySQL development, including conventional SQL optimization (group by/order by/rand optimization, etc.) In addition to being able to build MySQL, you can also back up MySQL data hot and cold, know the configuration options that affect innodb/myisam performance (such as key_buffer/query_cache / sort_buffer/innodb_buffer_pool_size/innodb_flush_log_at_trx_commit, etc.), and know how many values are appropriate for these options. In addition, we also know some special configuration options, such as how to build a master-slave synchronization environment of mysql, know the division of each binlog_format, know the performance tracking of MySQL, including slow_log/explain, and be able to know the basic indexing processing, etc.; in principle, we know the basic MySQL architecture (Server+ storage engine), basic InnoDB/MyISAM index storage structure and differences (clustered index, B-tree). Know the basic InnoDB transaction mechanism; know how to handle most MySQL exceptions (or know where to find a solution). If conditions permit, it is recommended to learn about the representative MongoDB database of NoSQL. By the way, compared with MySQL, colleagues can safely and cautiously use MongoDB in appropriate application scenarios and know the combination of basic PHP and MongoDB development.

4. Redis/Memcached:

Cache processing must be involved in most medium-sized systems, so be sure to understand basic caching; know the similarities and differences and application scenarios between Memcached and Redis, be able to install Redis/Memcached independently, understand some basic features and limitations of Memcahed, such as the maximum value, and know that PHP is combined with their use Redis understands basic working principles and usage, general data types, what types are applied in what scenarios, Redis transactions, and so on. In the principle part, you can have a general understanding of the memory structure of Memcached (slab mechanism), and redis will understand the underlying implementation storage structure of common data types (SDS/ linked list / SkipList/HashTable). By the way, it is better to understand the transaction, RDB, AOF and other mechanisms of Redis.

5. PHP:

In addition to the first phase of the ability, the installation configuration can install PHP and various third-party extensions of the compiler installation configuration; understand most of the configuration options and meaning of php-fpm (such as max_requests/max_children/request_terminate_timeout configuration that affects performance), know the difference between mod_php / fastcgi Have been proficient in various basic technologies in PHP, including a variety of in-depth PHP, including a deep understanding of PHP object-oriented / special features of SPL/ syntax, such as reflection; in the framework, I have read the code of at least one conventional PHP MVC framework, and know the internal implementation mechanism and design ideas of the basic PHP framework. Have been proficient in using conventional design patterns in PHP development (Abstract Factory / Singleton / Observer / Command chain / Strategy / Adapter, etc.); it is suggested to develop your own PHP MVC framework to fully liberalize the development, give yourself an in-depth understanding of MVC patterns, and enable you to quickly upgrade in business project development. Familiar with various code optimization methods of PHP, familiar with the solution of most PHP security problems; familiar with the basic mechanism of PHP execution (Zend engine / extension basic working mechanism)

6. System design:

Be able to design the website architecture, database, selection of basic PHP framework of most medium-sized systems, perform performance testing and troubleshooting, etc.; be able to complete basic design, development and maintenance of websites with similar browsers-> CDN (Squid)-> Nginx+PHP-> cache-> database structure; can support the development and maintenance of basic websites with millions to tens of millions of traffic every day.

Senior PHP programmer

Important: in addition to the basic LNMP program, you can also have in-depth study in a certain direction or field. (development of depth dimension)

Goal: in addition to being able to complete the basic PHP business development, it can also solve most in-depth and complex technical problems, and can independently design and complete medium-and large-scale system design and development work; I can independently hold deep into a certain technical direction, more professional in this area. (for example, in-depth research in any direction of MySQL, Nginx, PHP, Redis, etc.)

1. Linux:

In addition to the capabilities of the second phase, in Linux, in addition to regular operations and performance monitoring tracking, you can also use many advanced and complex commands (watch/tcpdump/starce / ldd/ar, etc.); in terms of shell scripts, you have been able to write more complex shell scripts (more than 500 lines) to assist in completing a lot of shell, including backup, automated processing, monitoring, etc. Awk/sed/perl and other applications are already perfect, and can operate and control text statistics and analyze data in various complex formats at will; have some understanding of the internal mechanism of Linux, basic handling of kernel module loading, startup error handling, etc.; at the same time, they also know some other related things, such as NFS, disk management, etc.

2. Nginx:

On the basis of the second stage, we have been able to operate Nginx very skillfully, and can carry out more in-depth operation and maintenance of Nginx, such as monitoring, performance optimization, complex problem handling, and so on. If you look at your personal interests, you can consider focusing on the in-depth study of how Nginx works, mainly at the beginning of reading the source code, such as specific master/worker working mechanism, Nginx internal event handling, memory management, etc. At the same time, you can learn the development of Nginx extensions 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 it can be combined with the application of a better model; the requirement of this stage is an in-depth understanding of the principles of Nginx, you can consider becoming an in-depth professional in the direction of Nginx.

3. MySQL/MongoDB:

On the basis of the second stage, in MySQL applications, in addition to the previous basic SQL optimization, we can also complete some complex operations, such as import and export of large quantities of data, changing table structure of online large quantities of data, adding and deleting index fields, and other high-risk operations. In addition to the installation and configuration, it has been able to handle more complex MySQL problems, such as tracing various problems, including the solution of synchronization delay, data synchronization across computer rooms, MySQL high availability architecture, etc.; at the application level of MySQL, I am familiar with the core key technologies of MySQL, such as transaction mechanism (isolation level, lock, etc.), trigger, partition, etc. In terms of MySQL performance, there are 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, etc.), connection pooling software selection applications, and in-depth understanding of show * (show status/show profile) operation statements. Be able to trace most of the performance problems In-depth knowledge of MySQL backup technology, including disaster recovery, in-depth understanding of Binlog, hot and cold backup, multi-IDC backup, etc. Learn more about the principle of MySQL, such as starting to read part of the source code about the working mechanism of MySQL, such as learning the source code of master-slave synchronization (replication) technology, or learning and understanding the source code of a storage engine (MyISAM/Innodb/TokuDB). If conditions permit, you can refer to CSV engine to develop your own simple storage engine to save some data and enhance your 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, to start using MongoDB online when writing less and reading more, or to do some online data analysis and processing operations. Specific scenarios can be done according to the work, but the core is to better understand the applications under 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 apply and learn more deeply. Because Memcached is not particularly complex, it is recommended to read the source code, especially the memory management part, to facilitate in-depth understanding; in the Redis part, you can do more applications with complex data structures (zset to do ranking operations / transaction processing to ensure atomicity in scenarios such as second kill scenarios); more learning applications involving synchronization mechanisms such as aof, to design a highly available Redis application architecture and cluster It is suggested that you can take an in-depth study of the Redis source code, the knowledge accumulated in the second phase can be applied, especially you can read, including core event management, memory management, internal core data structure and so on. If your interest permits, you can become a very professional user of Redis.

5. PHP:

As the basic core skills, we need to have more in-depth study and application on the basis of the second stage. From the perspective of basic code application, it can solve 95% of the problems encountered in PHP development and understand most of the PHP skills; most PHP frameworks can be used quickly in one day, and understand the advantages and disadvantages of various mainstream PHP frameworks, which can quickly and easily make technology selection in project development. In terms of configuration, in addition to the general knowledge of the second phase, you will learn about some partial configuration options (php auto_prepend_file/auto_append_file), including some complex advanced configurations and principles in extensions (such as memcache.hash_strategy in memcached extension configuration, apc.mmap_file_mask/apc.slam_defense/apc.file_update_protection in apc extension configuration, etc.) Have a good understanding of the working mechanism of php, including the working mechanism of php-fpm (such as the calculation and principle of the number of processes started by php-fpm under different configuration machines), basic familiarity with zend engine (vm/gc/stream processing), reading basic PHP kernel source code (or reading related articles), and understanding most of the core data structures (basic type / Array / Object) implementation of PHP internal mechanism. In-depth knowledge of core infrastructure (zval/hashtable/gc) Be able to develop basic PHP extensions, understand some intermediate and advanced knowledge of extension development (minit/rinit, etc.), and be familiar with the details of different communication and interaction between php and apache/nginx (mod_php/fastcgi); in addition to developing PHP extensions, you can consider learning to develop Zend extensions to understand PHP from a lower level.

6. C _ blank

On the basis of the second stage, we can have a more in-depth study and understanding of the language of Chammer Candle +, and be able to complete the development of small and medium-sized Cpicket + systems; in addition to the basic second stage of the basic syntax and data structure, we can also learn some special data structures (b-tree/rb-tree/skiplist/lsm-tree/trie-tree, etc.) to facilitate the needs of special work. In the aspect of system programming, be familiar with multi-process and multi-thread programming; understand the communication mode between most multi-processes under multi-process situation, and be able to choose communication mode flexibly (shared memory / semaphore / pipeline, etc.); multi-thread programming can solve the problem of lock conflict, and can carry out the development and debugging of multi-thread programs. At the same time, I am familiar with network programming, understand the differences and selection of multi-process model / multi-thread model / asynchronous network IO model, be familiar with the principles and differences of different asynchronous network IO models (select/poll/epoll/iocp, etc.), and be familiar with common asynchronous frameworks (ACE/ICE / libev/libevent/libuv/Boost.ASIO, etc.) and their use. If you have spare time, you can also take a look at some domestic libraries (such as muduo). At the same time, it can set up a high concurrency program architecture (leader-follow/master-worker, etc.); understand most of the problems in the development of Cmax CVM + back-end Server (memory management, log printing, high concurrency, front-end communication protocols, service monitoring), and know the RPC communication problems of various back-end services (struct/http/thirft/protobuf, etc.) Can be more familiar with the use of GCC and GDB to develop, compile and debug programs, and can quickly track and solve problems after the online program core is dropped; in general module development, you can accumulate or develop some general tools or libraries (such as asynchronous network framework, log library, memory pool, thread pool, etc.), but you should be careful about whether to use it after development to save the trap of chasing bug.

7. Front end:

In-depth understanding of the HTTP protocol (including the special protocol codes of various detailed protocols and the reasons behind them, such as 302 static files are cached, 502 is the failure of php behind nginx, etc.) In addition to the previous front-end application integration capabilities of various frameworks, front-end learning can be more in-depth if you are interested, in the form of developing some front-end frameworks like jQuery or developing a rich text editor to test JavaScript skills.

8. Other areas of language learning:

There is a basic accumulation in the basic PHP/C/C++ language. It is suggested that you can try to learn different programming languages at the current stage, depending on your personal interests, scripting languages can learn Python / Ruby and so on, functional programming languages can try Lisp/Haskell/Scala/Erlang, static languages can try Java / Golang, data statistical analysis can understand R language, if you want to do back-end business from a different perspective You can try Node.js and Nginx_Lua combined with Nginx mentioned earlier. Learning different languages is mainly to improve your horizons and differences in problem-solving methods, such as understanding that there are lightweight collaborations in addition to processes / threads; for example, in cross-machine communication scenarios, the Erlang solution is surprisingly simple; for example, if you do not want to choose C _ Erlang/Golang +, there are similar efficient Erlang/Golang available, etc.; mainly to improve your vision.

9. Study in other majors:

In this stage, in addition to the basic LNMP skills, will consider some other areas of knowledge learning, these are OK, depending on personal interests and long-term goal direction. At present, there are many areas to choose from, such as cloud computing (distributed storage, distributed computing, virtual machines, etc.), machine learning (data mining, pattern recognition, etc., applied to statistics, personalized recommendation). Natural language processing (Chinese word segmentation, etc.), search engine technology, graphics and images, speech recognition and so on. In addition to these high-end, there are also a lot of partial engineering aspects to learn, such as high-performance systems, mobile development (Android/IOS), computer security, embedded systems, hardware and so on.

10. System design:

On the basis of the second stage, the system design can apply the experience and skills mastered to design more complex medium-and large-scale systems, which can solve the problems of most of the complex systems online. Complete complex services such as browser-> CDN-> load balancer-> access layer-> Nginx+PHP-> Business Cache-> data Base-> complex backend RPC interactions (storage backend, logical backend, anti-cheating backend, external services)-> more backend services It can support the normal development and maintenance of tens of millions to hundreds of millions of traffic websites every day.

The above is all the contents of the article "what techniques should be mastered by middle and senior PHP programmers". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report