
Following the tradition, we decided to take stock of the outgoing year and highlight the most significant events in the PHP world, which, fortunately, were many. And, of course, a selection with links to fresh materials.
Enjoy reading!
')
Results of 2012
Of course, 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 version 5.3, however, the new version has not become revolutionary, and most of the changes in PHP 5.4.x will not affect the existing code. There are
several incompatibilities and a
number of new features , among which are
traits , an embedded web server, a new syntax of arrays, and others. Also especially pleased developers significantly
increased performance .
In addition, the news that PHP 5.5 will be released in 2013, and the
alpha version has already been released earlier this year (
what to expect from a future release).
Another long-awaited release of the year. Zend Framework 2 is a completely new framework, incompatible with Zend Framework 1. Of course, more than 5 years have passed since the release of ZF 1.0.0! And to refuse the load of backward compatibility was undoubtedly the right decision.
Getting started with ZF2 is recommended by reading the corresponding wiki page. Also be sure to familiarize yourself with the
design patterns used in ZF2 . There is a good selection of materials on ZF2
here and
here . For those who want to take part in the development of ZF2, an excellent detailed
post has been written.
The main event of the outgoing year in the Yii community could be the announcement of the release date of Yii2, or, for example, a public beta, but neither the first nor the second happened. Nevertheless, the number of users of the framework is growing incredibly fast, and the community and the core team have done a lot of work over the year.
Issued
3 large updates , the project code was ported to
GitHub . The first
conference dedicated to Yii was held in Kiev, and
new books on Yii were published.
And, of course, the
good news that the support period for Yii 1.1 has been extended, and the current version will not be supported until the end of this year, as planned, but by the end of 2015.
A long time ago (in 2009) in a distant galaxy (in Chicago), a group of PHP developers gathered at php | tek conference started a discussion about what to do to make work with their projects better, and for users to make a choice of a solution for their tasks easier. This is how the
PHP Framework Interoperability Group , known as PHP-FIG, was formed. And the first result of the group’s work was the publication of the
PSR-0 standard, which governs the naming of classes, files, namespaces, directory structure.
And after a long discussion in early 2012, two new standards were adopted at once:
PSR-1 and
PSR-2 , both related to code formatting.
A new standard PSR-3 about logging interfaces is on the way. Also, anyone can participate in the discussion and offer their ideas
here .
Appearing at the beginning of the year, this framework immediately attracted attention because it was developed as an extension for PHP. By the end of 2012, Phalcon had already reached
version 0.8 . In addition to the
highest performance, even compared to
micro-frameworks , Phalcon impresses with excellent
documentation , the presence of detailed tutorials and even an
example of the whole application .
This year can rightly be called the year Composer! And although this wonderful PHP dependency management tool appeared in 2011, it experienced a real boom this year. The number of posts, articles and materials just rolls over:
1 ,
2 ,
3 ,
4 . Of course, the rise in the overall prevalence of this tool was a huge step for the entire PHP community.
Php
- PHP Multiple Inheritance with Traits - In PHP 5.4, a new code reuse mechanism, called trait, was introduced . And while PHP does not allow the implementation of multiple class inheritance, traits allow you to simulate it. As the author demonstrates in his post on simple examples.
- Collaborative multitasking in PHP using coroutines - An excellent article in which the author talks about new features that will be available in PHP 5.5, namely, coroutines and generators. And if much has already been said about the generators, there is very little information about coroutines. The author solves this problem, telling both about the concept of coroutines, and about their implementation in PHP and, importantly, gives an example of real use. The translation of this article in Shabre arrived in time.
- Russian in PHP Core Team: “Language grows like coral” - Post-interviews with Russian developers from the PHP team. Questions are answered by Andrei Zmievski, Stas Malyshev and Ilia Alshanetsky. For the interview, a special thank you to Pleshner.
Study materials
- How variables are arranged in PHP - A remarkable habrapost, which details the internal structure of variables in PHP.
- How are arrays in PHP - Another great post from the author of the previous article. This time about arrays.
- Create a REST application using the Slim microframe — An excellent step-by-step tutorial on IBM developerWorks to create an application that implements the REST API on the popular Slim micframe.
- 7 ways to mess up BCrypt - If you are developing a user system in a project, then you have probably heard that using bcrypt to hash passwords increases security. The Internet is full of articles on the proper use of bcrypt in PHP. The author, in his article, focused on typical mistakes made when using bcrypt and able to negate all efforts to improve security. Among them: the use of non-random salt, the use of the wrong source for random salt, and others.
- About libraries and dependencies - There is an opinion that a smaller number of dependencies of an instrument means less coherence. The author in his post argues in favor of the fact that the mere existence of dependencies is not at all bad, and their presence reduces connectivity and increases connectivity .
- Future ZF2 - A podcast in which leading Zend Framework experts and developers answer questions about the future of the framework: Evan Coury , Ralph chindler , Matthew O'Phinney , Rob Allen . The following topics are covered: plans for branch 2.1; PHP 5.4 and 5.5 with ZF2: goals for 2013: ZF2 in comparison with other frameworks.
- Micro-Optimization for PHP - Post, in which the author debunks some myths about micro-optimization. It is part of a series of posts about how a PHP developer can become better, and is written in response to this post.
- Time zones, the right way - A good tutorial on using time zones with examples in PHP and MySQL. For those who are faced with a similar task for the first time, this article will be a good starting point.
- Programming with Anthony - logic , responsive web design - Continuation of a series of video clips from the well-known PHP-activist Anthony Ferarra. This time about boolean logic and responsive web design. The rest of the video is here .
- How do we read the code? - The post, though not directly related to PHP, will be interesting to everyone, as it deals with an unusual psychological experiment in which the developer was offered to look at a small source and understand what he was doing, while tracking the developer’s eye movement along the code . Video attached.
- So you want to test - Chris Hartjes, better known as Grumpy Programmer, author of the Guide to Developing Testing Applications for PHP , wrote an article that answers the most frequently asked questions about how to start testing your applications and develop more quality code. He gives a number of recommendations and tips: how to recognize untestable code, why you should stop using tools without tests and others.
- What is wrong with the PHP extension Semaphore - In his post, the author writes about the problems found in the extension Semaphore .
- Effective refactoring - In the post, the author has collected several recommendations on refactoring PHP code. In general, the tips are quite commonplace, but it will not be superfluous.
- Introduction to Bullet: a functional microframe for PHP - Bullet is a new PHP microframe that implements a functional approach to routing, which, according to the author, allows to avoid significant duplication of code. The post sets out the basic principles and advantages of the framework, gives small examples. The functional approach for PHP, however, is not unique, we recommend that you familiarize yourself with, for example, the Bluz microframe .
- How to become a web developer - The notorious Larry Ullman made a selection of resources on the topic of how to become a web developer, of course, PHP-oriented.
- Introduction to Design Patterns - Screencast, in which the author gives an overview of the basic design patterns. Also, after the author wrote posts, in more detail reveals the essence of the patterns Decorator and Deputy (Proxy) .
- Shared Interfaces - As part of the creation of PSR standards, the idea of describing some standard interfaces has been put forward. The idea is simple: use separate components in different libraries and frameworks without the need to write any shells or layers. The author, one of the founders of PHP-FIG , in his post writes about a number of problems associated with this approach. In response, another post was written.
- S-expressions in PHP , 2 , 3 , 4 , 5 , 6 - A series of excellent articles in which the author reveals the essence of lexical analysis and describes the creation of a LISP interpreter in PHP .
- PHP non alpha numeric 7 and 6 char code - In the last issue of the digest there was a link to an interesting experiment in which the author writes a PHP script without using numeric and alphabetic characters. The author has a follower who demonstrates an example of the output code “log (12)” and written using only characters: $ _ = + (); Bravo!
Link to the previous release.
Material prepared
dbritan ,
nesttor and
pronskiyCongratulations to all the upcoming New Year! See you in 2013!