The digest of interesting news and materials from the world of PHP for the last two weeks No. 15 (04/08/2013 - 04/22/2013)



    We bring to your attention the next selection with links to news and materials.

    Enjoy reading!


    News and Releases




    Php


    • Traits are static code - Traits that appeared in PHP 5.4 have been written more than once, but opinions about the justification for their use differ . The author of the post writes that traits have the same disadvantages as using static code, as well as some others.
    • Features of logical comparison in PHP - The digests mentioned excellent StackOverflow answers from PHP core developer Nikita Popov. The link Habra-translation of interesting information on comparison operators in PHP.
    • Is microoptimization worth the time spent on it? - The issue discussed more than once resulted in a more specific form: which is faster is_array($array)or $array === (array) $array ? Click here for a detailed answer with implementation details.


    Learning Materials


    • Composer primer - Great composer tutorial great. If you haven’t yet used this great tool for dependency management, then it’s time to start by reading this detailed guide.
    • Deploying PHP Applications with Phing - How many steps do you need to complete to deploy your application? The author of the post believes that if more than 2, then you should think about automating the process, for example using Phing . The link is a good tutorial on this tool, which is based on Apache Ant .
    • Is the PSR-0 shortsighted, or maybe you? - There really was a lot of controversy around the PSR standards, and very often you can watch posts criticizing the PSR. After another such post, “PSR-0 short-sighted” , one of the main participants and ideologist of the PHP-FIG group, Phil Sturgeon, wrote a post in which he answered all sore questions about PSR-0, without hiding that the standard has a couple of unresolved issues , but, nevertheless, he copes with the task. It is worth paying attention to the comments, some of them are even larger than the post in terms of text and information.
    • PHPUnit vs. Cheat Sheet Phake - The author compares two popular unit testing tools with small examples.
    • Studying Rails (and Ruby) - An experienced PHP developer, a member of the PHP community, and a speaker, was forced to learn and use Ruby on Rails for one of the projects. In his post, he, as a PHP developer, shares his experience and impressions of the new language and framework, pointing out the differences and superiorities of one or the other.
    • About the stability of Symfony - In his post, the creator of Symfony and the head of SensioLabs - Fabien Potencier, writes about the principle that developers of the framework should follow. He urges focusing on improving stability (fixing bugs, writing tests and documentation), and not on implementing new features, as this will not only improve the framework, but also attract new users.
    • Tips and tricks for passing Zend PHP Certification - If you are going to pass PHP certification from Zend, be sure to check out this interview, as well as the two previous ones: one , two .
    • Interview with the creator of PHPClasses.org - Manuel Lemos. - The representative of the Brazilian PHP community and the creator of PHPClasses.org - Manuel, answers questions about his experience in the PHP world and gives useful tips to developers.
    • Automated backup to Google Drive using PHP - Using the official API client , the author implemented a small console script to copy files to Google Drive. The post contains some general information on using the Google Drive API.
    • Extending Twig Templates - A small tutorial on expanding the basic capabilities of a popular template engine using inheritance, filters and functions.
    • Conversation with a PHP expert - As an expert, Lorna Jane Mitchell answered questions , mainly giving useful tips for beginners. The link contains the full content of the conversation with links to materials.
    • PSR-Duh! - A small tutorial on code refactoring, in order to bring to a view that meets PSR standards.
    • Do we need a framework for this? Or hurry up, PHP-FIG - In his post, the author writes that the use of frameworks is not always justified, and you can often do without using a set of libraries that solve specific problems. In this regard, the author encourages PHP-FIG to engage in standardization of interfaces. In this case, it will be much easier to combine libraries and implement dependencies.
    • Generation of one-time links - A small tutorial that describes one of the ways to solve the problem of generating links, available for use only once and having a limited time. Such links can be useful for all kinds of verification.
    • HTTP - a protocol that a web developer must know - Post is recommended to everyone who has gaps in knowledge of the HTTP protocol. Basic information, work pattern, query structure, response codes, the main headers are considered. Examples and reference study tools are included.
    • Immerse yourself in Behat - A little personal experience and experience using an excellent BDD tool.
    • We use Dice to implement dependencies in PHP - A small tutorial that shows how you can quickly implement a DI container for managing dependencies in your PHP application. A minimalistic but powerful Dice tool comes to the rescue .
    • 6 things to consider when choosing a framework - The abundance of quality solutions among PHP frameworks is certainly pleasing, but on the other hand makes it difficult to choose. Of course, first of all I want to give preference to the one with which I worked most, but first consider the arguments presented by the author. Perhaps, to solve the following problem, you should choose a different framework.
    • I was a bad PHP developer - A little personal experience and self-improvement tips as a developer.
    • Failed side project - Many developers, in addition to the main work, are engaged in their personal or team side projects. Having failed one such project, the author, nevertheless, gained valuable experience, which he shared in a note.
    • Work in PHP with Tokenizer - Excellent hubrapost in which examples of use of a lexer (tokenizer) are resulted.
    • Reflection in PHP - A tutorial that describes the basic principles and shows examples of the use of reflection in PHP.
    • PHP Commandments - The author has compiled and described several things you should never do in PHP. But, as old Obi-Wan said: “Only the Sith elevate everything to absolute,” so there is something to argue about with the author.
    • We use SimplePie to read from news channels - Why not write your aggregator in connection with the closure of Google Reader? Here is a short tutorial on using the SimplePie library , thanks to which it becomes obscene to work with RSS feeds.
    • 15 Tips for MySQL Users - Slides with some very useful tips.
    • Using Yii's ActiveRecord in a game time manager - A good hubpost in which the author shares his experience of expanding the Yii framework to reduce the number of database queries.
    • Laravel 4 Screencast Archive - A great new resource with compiling screencasts on the Laravel framework. Those who wish can record and send their own screencast.
    • Aspect Oriented PHP Programming with Go! - Author of the wonderful Go library! AOP has already published several posts on the hub: We get rid of duplication of end-to-end code in PHP ; We get acquainted with aspect-oriented programming in PHP ; Programming template "Fluid interface" in PHP . This time an English-language tutorial with examples of using this useful tool.


    Link to the previous issue.

    Also popular now: