The best PHP in the world for 2012 and a digest of interesting materials over the past two weeks No. 7 (12/15/2012 - 12/28/2012)



    Following the tradition, we decided to take stock of the outgoing year and highlight the most significant events in the world of PHP, which, fortunately, were many. And, of course, a selection with links to fresh materials.

    Enjoy reading!


    2012 Results


    PHP 5.4

    By far, 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 did 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 , including traits , an embedded web server, new array syntax, and others. The developers were also particularly pleased with the significantly increased productivity .
    In addition, the news that PHP 5.5 will be released in 2013 and the alpha version was released earlier this year ( what to expect from a future release) cannot but rejoice .

    Zend framework 2

    Another long-awaited release of the outgoing year. Zend Framework 2 is a completely new framework that is incompatible with Zend Framework 1. Indeed, more than 5 years have passed since the release of ZF 1.0.0! And to abandon the load of backward compatibility was undoubtedly the right decision.
    It is recommended to start working with ZF2 by reading the corresponding wiki page. You should also familiarize yourself with the design patterns used in ZF2 . There is a good selection of materials on ZF2 here and here . An excellent detailed post has been written for those who want to take part in the development of ZF2 .

    Yii framework

    The main event of the outgoing year in the Yii community could be the announcement of the Yii2 release date, 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 a lot of work has been done by the community and core-team in a year.
    Issued 3 large renovation project code moved to GitHub . The first Yii conference was held in Kiev , and new books on Yii were also published .
    And, of course, the good news is 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 until the end of 2015.

    PSR-1 and PSR-2 standards adopted

    A long time ago (in 2009) in one far-distant galaxy (in Chicago) a group of PHP developers gathered at the php | tek conference and began a discussion about what to do to make work with their projects better, and for users to choose a solution for their tasks are easier. So 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, and directory structure.
    And after a long discussion at the beginning of 2012, two new standards were adopted at once:
    PSR-1 and PSR-2 , both related to code formatting.
    The new PSR-3 standard on logging interfaces is on the way. Also, anyone can participate in the discussion and propose their ideas here .

    Phalcon

    Appearing at the beginning of the year, this framework immediately attracted attention because it was designed as an extension for PHP. By the end of 2012, Phalcon had already grown to version 0.8 . In addition to the highest performance, even compared to micro-frameworks , Phalcon captivates with excellent documentation , the presence of detailed tutorials and even an example of the whole application .

    Composer

    This year can rightfully be called the year of Composer! Although this wonderful PHP dependency management tool appeared in 2011, it experienced a real boom this year. The number of posts, articles and materials is just off scale: 1 , 2 , 3 , 4 . Undoubtedly, the growth of the general prevalence of this tool was a huge step for the entire PHP community.

    Php



    Learning Materials


    • How variables are arranged in PHP - A wonderful hubrapost, which details the details of the internal structure of variables in PHP.
    • How arrays are arranged in PHP - Another excellent post from the author of the previous article. This time about arrays.
    • Create REST applications using the Slim microframework - An excellent step-by-step tutorial on IBM developerWorks on creating an application that implements the REST API on the popular Slim microframework.
    • 7 Ways to Spoil BCrypt - If you are developing a user system in a project, then you must have 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 capable of nullifying all efforts to increase the level of 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 in a tool means less connectivity. The author in his post argues in favor of the fact that the presence of dependencies is not bad at all, and their presence reduces connectivity and increases connectivity .
    • Future ZF2 - A podcast in which leading experts and developers of the Zend Framework answer questions about the future of the framework: Evan Coury , Ralph chindler , Matthew O'Phinney , Rob Allen . The following topics are disclosed: plans for branch 2.1; PHP 5.4 and 5.5 with ZF2: goals for 2013: ZF2 compared to other frameworks.
    • Microoptimization in PHP - A post in which the author debunks some myths about microoptimization. It is part of a series of posts on how PHP developers can become better and 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 famous PHP-actor Anthony Ferarra. This time about Boolean logic and responsive web design. The rest of the videos are here .
    • How do we read the code? - Although the post is not directly related to PHP, it will be interesting to everyone, since it refers to an unusual psychological experiment in which the developer was asked to look at the small source code and understand what it was doing, while the developer’s eye movement was tracked by the code . The video is attached.
    • So, you want to test - Chris Hartjes, better known as Grumpy Programmer, author of the book Tested PHP Application Development Guide , wrote an article that answers the most frequently asked questions about how to start testing your applications and developing 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 Semaphore extension - In his post, the author writes about the discovered problems in the Semaphore extension .
    • Effective refactoring - In a post, the author collected several recommendations for refactoring PHP code. In general, the advice is quite commonplace, but it will not be superfluous to get acquainted.
    • Introduction to Bullet: a functional microframework in PHP - Bullet is a new PHP microframework that implements a functional approach to routing, which, according to the author, avoids significant code duplication. The post outlines the basic principles and advantages of the framework, provides small examples. The functional approach for PHP, however, is not unique, we recommend that you familiarize yourself with, for example, the Bluz microframework .
    • 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, naturally PHP-oriented.
    • Introduction to design patterns - Screencast, in which the author gives an overview of the main design patterns. Also, after the author wrote posts, in more detail revealing the essence of the Decorator and Deputy (Proxy) patterns .
    • Shared Interfaces - As part of the creation of PSR standards, the idea has been put forward to describe some standard interfaces. The essence of the idea is simple: use individual components in various libraries and frameworks without the need 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. 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 that demonstrates an example of code outputting “log (12)” and written using only characters: $ _ = + (); Bravo!


    Link to the previous issue.
    Material prepared by dbritan , nesttor and pronskiy

    Happy New Year to all! See you in 2013!

    Also popular now: