Xinchen, who joined the official PHP language development Group as a core developer in August 2011, is currently the only Chinese person and one of the most influential PHP technologists in the country. Xinchen, the blogger of the famous PHP technology blog "The Wind and Snow" (http://www.laruence.com/), has focused on the research and sharing of PHP's underlying principles. One of the "in-depth understanding of PHP principles" series of articles are widely recommended to become the domestic PHP language deep use and customization of the classic introductory materials. His PHP framework, based on PHP extensions, YAF, is hailed as the fastest PHP development framework. He is also the author of Lua,taint and other PHP extensions. During the development of PHP 5.4, he contributed nearly 400 deliveries to PHP. This time we had an interview with Xinchen and asked him to share the knowledge of PHP frameworks and extensions, as well as the development of PHP.
InfoQ: Please briefly describe yourself and your current team.
xinchen: Hello everyone, I am xinchen, North Shaanxi People, PHP circle a lot of friends call me Brother Bird, taking advantage of this opportunity and everyone explained under, I am not "Linux private food" bird brother, I just im nickname called "Snow Migratory birds", and because in Baidu, I was an engineer in the elderly, That's why everyone started calling it that way.
I am currently working on the Sina Weibo application architecture team, and our application Architecture team focuses on the architecture optimization of Sina Weibo lamp to meet the needs of high performance and rapid development.
Micro-blog PV billions of per day, generate a number of T-level data, the processing of any one millisecond optimization, a byte reduction, is of great significance to us, the work is very interesting and challenging, so far, our team has been through a number of optimization methods that do not change the business logic, The response time of the microblog homepage has been lowered by 44%,tps by 78%. In addition, our team is also responsible for technology upgrading and sedimentation, which is also a very interesting job, because sharing can bring us more.
InfoQ: As the only person in the official PHP language development Group, please talk about some of the experiences that have been added to this organization.
Xinchen:The title "The only one" is certainly temporary, I believe that more domestic developers will join in the future. I joined the PHP development team last August, the development group is an open source organization, and, to be precise, we should be called commiters (submitter), and many students who are not in the development group provide patches for PHP.
After I joined, I had some new experiences on how to operate an open source project, and the most profound thing I felt was the various process specifications. Large to release a version of the process specification, small to a new feature added process specifications, these seemingly cumbersome specifications, although to a certain extent caused by slow response, but to ensure that PHP in the growth process, as far as possible no major accident.
Another experience is that English is really important to technical workers, I now particularly regret that I did not study English well, although I read the material is not a problem, but in the daily communication often fool, there is a joke, is the development team has a developer said, to understand what I said, need to be like reading regular expression.
InfoQ: Long-term attention to your blog people know that you have been committed to PHP promotion work, you personally also in the country's largest number of internet companies have worked, can you talk about the development of PHP in the domestic situation?
Xinchen: in my blog, I have also shared a number, that is, the world's top 1 million sites, more than 70% of the sites are developed using PHP. In my opinion, PHP easy to learn, easy to use, easy to expand is the main reason it can be so popular, easy to learn and easy to use I do not say, here I would like to mainly talk about PHP extensibility.
PHP provides a powerful set of extended build systems, using this extended build system, we can easily extend PHP functionality, in the PECL extension library, there are now more than 200 standard extensions.
When I started to do PHP extensions in 2008, there was hardly any Chinese material on the Internet, and now we see that the information on the web is very rich. More and more developers are trying to extend PHP to solve their problems, and PHP's Open source spirit, and more or less affect developers to open up these extensions to the community, which I think PHP can continue to develop the main power.
InfoQ: You are the author of the Open source framework Yaf, please briefly describe the features of the open source framework yaf.
Xinchen: for a long time, there is a lot of debate about whether PHP should use frames, and the more common paradox is that with frameworks, development is faster but performance is not guaranteed.
YAF is developed to address this paradox, which is an MVC framework that implements PHP in PHP extensions (c), which is characterized by high performance (compared to the framework traditionally implemented with PHP), low resource consumption, and rapid development.
Yaf mainly provides routing, distribution, auto-loading, plug-in mechanism, and a simple high-performance view engine, which is necessary for each MVC framework and has a certain immutability, so it is suitable to be implemented by extension.
InfoQ: What are your next development plans for the YAF framework?
Xinchen: My point is that the future of YAF should be in the direction of refinement, such as YAF 2.0 and YAF 1.0 compared to not adding new features, mainly architecture redesign and performance tuning. I don't want YAF to be a "super encyclopedia" that wants to cover everything, and I just hope it will provide a simple, efficient and scalable tool for developers seeking high performance to contribute to a "low carbon" life.
In addition, I would like to thank friends who like Yaf, Yaf at present in the community has a lot of users, this is my initial release yaf did not think of, some very enthusiastic friends for the YAF to provide the release of Windows, the establishment of the user Exchange Forum, QQ Group, these things I have heart but no energy to do, Their enthusiasm is driving me to constantly improve the power of YAF, thank these friends.
InfoQ: Can the Zend, Yii, cakephp the PHP framework for a simple analysis of the pros and cons?
Xinchen: These frameworks are excellent PHP frameworks, I have used Zend and Yii in previous projects, but unfortunately there is no chance to use cakephp to tell me my personal understanding.
The Zend framework is a PHP development framework developed by Zend, which is well-designed, powerful, has a wide range of users, documentation, and a community that is more active. Its code is well-written and well-suited for PHP developers to read and learn. The disadvantage is a slightly bloated, low performance.
My most impressive impression of Yii is AR, which is very convenient in practical development, and provides automatic generation tools for the system, and I personally like Yii very much. However, the shortcomings of AR is also obvious, the resource occupies a large, not suitable for large data volume applications.
InfoQ: Please recommend three PHP extensions you have developed, why do you recommend these three extensions?
xinchen: I write extension open source out of 4, in chronological order is yaf,lua,taint,couchbase. They have different problems to solve, let me briefly introduce some of these extensions.
Yaf was introduced before, and it is not repeated here.
Lua encapsulates the LUA engine in PHP extensions, supports running LUA scripts in PHP, and can exchange data with LUA scripts. Taint is a Xss,sql&shell injection detection extension that is primarily designed to compensate for the points that some static detection scripts cannot reach.
The couchbase is a couchbase client package, and Couchbase server is a high-performance, real-time k-v database. By the way, our Sina Weibo application Architecture team is also developing some extensions for Sina Weibo, which is to solve some practical problems for Weibo, and after the availability and stability of these extensions are verified, we will open source to give back to the community.
Brother Bird talk about the structure and future development of PHP