PHP Results of 2012: PHP 5.4, Zend Framework 2, Yii Framework, PSR-1, PSR-2 Standards, Phalcon, Composer. PHP News, Training Materials
The digest contains overview of the evolution of the most popular PHP frameworks during 2012. It was prepared by Zfort Group development team. Here we go!
Results of 2012 for PHP World:
No doubt, the most important news in the world of PHP for 2012 was the long-awaited release of a new major version. Almost 3 years have passed since the release of the latest version 5.3, however, the new version has not become a revolutionary one, and the most of the changes in PHP 5.4.x will not affect the existing code. There are somebackward incompatible changes and a number of new features, including Traits, embedded web server, the new syntax of arrays and others. Vastly increased performance has also pleased developers a lot.
Another long-awaited release of the previous year. Zend Framework 2 is the new framework, which is incompatible with the Zend Framework 1. More than 5 years have passed since ZF 1.0.0 release! And it was certainly the right decision to give up the backward compatibility.
It is recommended to read the relevant wiki page before starting to work with ZF2. Also be sure to read the design patterns used in ZF2. There is an excellent detailed post for those who wish to take part in the development of ZF2.
The main event of the previous year in the Yii community could be the announcement of Yii2 release date, or, for example, a public beta, but neither had happened. However, the number of the framework users is growing rapidly, and the core-team together with the community did a great amount of work during the year.
And, of course, there is a good news that the support period of Yii 1.1 has been extended and the current version will be supported not till the end of the current year, as planned before, but till the end of 2015.
A long time ago (in 2009) far-far away in Chicago the group of PHP developers met at php|tek conference and started to discuss the ways to make the work with their projects better and for users to choose solutions for their tasks easier. The result was the foundation of PHP Framework Interoperability Group, known as PHP-FIG. The first result of the group activities was the publication of PSR-0 standard, which governs the naming of classes, files, namespaces, directories’ structure.
After a long discussion, in the beginning of 2012, two new standards were adopted:
A new standard PSR-3 on logging interfaces is approaching. Also, anyone can participate in the discussion and propose his ideas here.
Launched in the beginning of the current year, the framework immediately attracted attention being developed as an extension for PHP. By the end of 2012 Phalcon has matured to version 0.8. In addition to outstanding performance, even when compared with micro-frameworks, Phalcon bribes by excellent documentation, detailed tutorials and even by the sample of the ready-made application.
This year can be truly named the year of Composer! Although this great tool to manage dependencies in PHP appeared in 2011, it experienced a real boom in 2012. The number of posts, articles and other materials is through the roof: 1, 2, 3. Certainly, the growth of universal prevalence of this tool was a huge step for the entire PHP-community.
- Multiple inheritance with PHP and Traits — A new mechanism for code re-use, called Traits, has been introduced in PHP version 5.4. Although PHP does not allow the implementation of multiple inheritance of classes, Traits can simulate it. And the author demonstrates it on simple examples in his post.
- Cooperative multitasking using coroutines in PHP — An excellent post, in which the author talks about new opportunities that will be available in PHP 5.5, namely about coroutines and generators. And if the generators have been said about a lot, there is really a lack of information about coroutines. Solving this issue the author talks both about the coroutines concept and their implementation in PHP, and what is even more important, gives the example of their actual use.
- PHP: Variables — a wonderful post that discloses details of the internal structure of variables in PHP.
- PHP: Arrays — one more excellent post that describes main types of arrays in PHP.
- Create REST applications with the Slim micro-framework — a great step-by-step tutorial on IBM developerWorks to create an application that implements REST API on the popular micro framework Slim.
- Seven Ways To Screw Up BCrypt — If you develop a system of users in the project, you may have heard that the use of bcrypt for hashing passwords increases security. The Internet is full of articles about the proper use of bcrypt in PHP. The author in his article focused on the typical mistakes, made when using bcrypt and able to nullify all the efforts to improve safety. Among them are the following: using a non-random salt, using an incorrect random source for salt generation and others.
- On Libraries and Dependencies — It is believed that fewer dependencies of the tool means less coupling. In the post the author argues the fact that the existence of dependencies is not negative, and their presence reduces the cohesion and improves coupling.
- Future of PHP: ZF2 — Podcast where lead experts and Zend Framework developeres: Evan Coury,Ralph Chindler, Matthew O’Phinney, Rob Allen answer questions about the future of the framework. The following topics are discovered: Roadmap for 2.1, Frequent releases, PHP 5.4 and 5.5 with ZF2, Targets for the next year, How ZF2 compares to other frameworks, A new ZF2 announcement.
- Micro-Optimizations in PHP — The post in which the author debunks some myths on micro-optimization. The article is a part of set of posts on how to become a better PHP developer, and is written in response to this post.
- Timezones, the Right Way — A good tutorial on the use of time zones with examples in PHP and MySQL. For those who are faced with a similar task for the first time, this post can be a good starting point.
- Programming with Anthony — logic, adaptive web design — A series of videos by known PHP-developer Anthony Ferarra. This time on Boolean logic and Adaptive Web Design. The other videos are here.
- How Do We Read Code? — The post is not directly related to PHP, but it will be interesting for everyone, because it deals with the unusual psychological experiment, in which the developer is proposed to look at the light source and to understand what it does, tracking the movement of the developer’s eyes through the code. The video is attached.
- So You Want to Write Tests — Chris Hartjes, better known as Grumpy Programmer, the author of“Guide to building testable applications in PHP”, wrote the article, which provides answers to the most frequently asked questions how to start testing your applications and to develop better code. He gives a number of recommendations and tips: how to recognize non-testable code, why you should cease to use tools without tests and others.
- What Is Wrong With PHP’s Semaphore Extension — In his post, the author writes about the issues detected in the Semaphore extension.
- Effective Refactoring Strategies — In the post, the author has collected few recommendations on PHP code refactoring. In general, the tips are rather simple, but may be of use.
- Introducing Bullet: the functional Php micro-framework — Bullet is a new PHP micro-framework with a functional approach to routing that in author’s opinion allows developers to avoid significant duplication of code. The post outlines the basic principles and advantages of the framework with short examples. However, the functional approach to PHP, is not unique, we recommend you to learn about Bluz micro-framework.
- How to Become a Web Developer — The notorious Larry Ullman has made a compilation of resources how to become a web developer, certainly, PHP-oriented.
- Introduction to Design Patterns — The screen cast, where the author reviews the basic design patterns. Also, the author has written a few posts revealing in details the essence of the Decoratorand the Deputy (Proxy) patterns.
- Shared Interfaces — The idea of describing some standard interfaces is put forward as a part of PSR standards development. The idea is simple: the use of individual components in different frameworks and libraries without necessity to write any shells or layers. The author, one of the founders of PHP-FIG, writes in his post about a number of problems associated with this approach. Another post was written in response.
- S-expressions, 2, 3, 4, 5, 6 — A set of excellent articles in which the author reveals the essence of lexical analysis and describes how to create LISP interpreter on PHP.
- PHP non alpha numeric 7 and 6 char code — In the latest issue of the digest there was a link to an interesting experiment, in which the author writes PHP script without using any numeric or alphabetic characters. The author has got a successor who shows an example of code that outputs «log (12)” written using only characters: $ _ = + (), Bravo!
Source: PHP Digest - Zfort Group Blog