PHPMaster.com has returned with the second part of their guide to code refactoring. In this second part they pick up where they left off and focus on code readability this time.In part one of this series I introduced what constitutes good code. As the series on code refactoring continues we'll dive into each of the three aspects and see how to refactor for each of them in order: readability, extensibility, and efficiency. In this part, the focus is on refactoring your code for better readability. Recall...
Lukas Smith has a new post sharing what he sees as a growing trend in the development of PHP applications (a good thing) - the decoupled mindset more developers seem to follow and the use of tools like Composer that help to promote it.As more and more projects adopt composer they will not only start using 3rd party code, they will also come to realize how easy it is for them to expose their code to 3rd parties. Obviously NIH syndrome will not be purged from the planet and maybe it should never get purged...
Gonzalo Ayuso has an interesting post showing how you can use a Gherkin file (used in tools like Behat) to generate a Silex-based application.Last days I've playing with Behat. Behat is a behavior driven development (BDD) framework based on Ruby's Cucumber. Basically with Behat we defenie features within one feature file. I'm not going to crate a Behat tutorial (you can read more about Behat here). Behat use Gherkin to write the features files. When I was playing with Behat I had one idea. The idea is...
Recent releases from the Packagist:phpunit/phpunit-selenium (1.2.10)
simplon/facebook (0.5.2, 0.5.1, 0.5.0)
simplon/core (0.5.1, 0.5.0)
simplon/db (0.5.1, 0.5.0)
simplon/helium (1.0.2, 1.0.1, 1.0.0)
Latest PEAR Releases:
Article originally from rooJSolutions blog
This week saw the release of the latest site developed by Roo J Solutions,A www.prettybooked.comA a Hong Kong based beauty booking service. While the site has gone through the usual last minute bug-fixes before going live, it all came together in the end.Developing a feature rich web site.While we where busy finishing off this site, We have had a few other projects and discussions going on, and what has been interesting lately has been the realization that far...
A new version of the php-excel extension, v0.9.7 was released and is now available for download at: https://github.com/downloads/iliaal/php_excel/php-excel-0.9.7.tar.bz2
This new version allow for compilation against latest version of LibXL 3.3.1 and provides wrappers for new functions available in LibXL 3.2.4+, which include the following:
- added ExcelSheet::getTopLeftView() and ExcelSheet::setTopLeftView() methods for getting/setting a view position in the sheet
- added ExcelSheet::addrToRowCol()...
Back when PHP5 came along in many ways it meant a new stepping stone for PHP. To some extend this was caused by the fact that it was impossible to write E_STRICT compliant code that also worked on PHP4, since initially using "var" for properties didn't pass strict mode. As a result many people used this as an excuse to start over and I think overall this led to higher quality code, since the community had evolved from the skill set, but was held back by the legacy baggage. Then when PHP 5.3 came around...
Mario Peshev has a new post with a reminder to all of those developing OOP-based software out there (not just PHP devs, really) - don't fall into the "over-abstractionism" trap.
There is a small number of developers who come from the higher language world (like Java or .NET) used to all design patterns for facades, decorators, bridges, abstract factories, DAO/DTO and so on, implementing them in PHP projects. It's usually cool and leads to a better control over the projects once you spend enough time...
Pablo Viquez has a new post to his site today showing you how to debug your PHP code with the help of JMeter (an Apache project) that tests functional behavior and performance and the Zend Debugger.Now, I think JMeter is awesome, no doubt about it, however what if I want to test something while developing a new API Endpoint? well I used to be accustom to the nasty var_dump(); exit; combination or if the API was already completed I used to do error_log() everywhere and figure out the results. [...] I love...
Returning with another part of his series on his concept of LUCID development, Scott Mattocks has this new post for the "U" about unit testing.Unit tests are like Google Maps for your code. When you zoom in and look at small pieces, you can only go so far. However, when you zoom out and take a look from a greater distance, you can see the full path from A to B. The idea of unit testing, as it relates to LUCID development, is that it maps out all the different ways to get from one end of your application...
Chris Hartjes, a big proponent of testing in web applications (mostly in the PHP realm so far) has a new post to his site with some of his thoughts about PHPSpec, the specification-driven testing tool recently released by the same folks who made Behat.
I think that we are witnessing the first wave of new testing tools in the PHP community that allow developers to wrap their applications in automated tests. I am familiar with the BDD-style that is being promoted in PHPSpec, through my work with Behat to...
Recent releases from the Packagist:twig/twig (v1.10.3)
webignition/http-client (1.2.1, 1.2)
compwright/codeigniter-installers (1.0.1, 1.0.0)
xi/filelib-bundle (v0.7.1, v0.7.0)
Popular posts from PHPDeveloper.org for the past week:PHPMaster.com: Practical Refactoring, Part 1 - What is Good Code?
Chris Hartjes: The Grumpy Programmer's PHPUnit Cookbook
Joshua Thijssen: Installing composer: russian roulette.
Lorna Mitchell: Introduction to PHP OOP
Community News: PHP Manual Masterpieces (Humor)
Android Hive: Android Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL
Do It Yourself Web Development: Setting Up Composer PHP Dependencies Manager in Windows
The PHP project has released the latest in the PHP 5.3.x and 5.4.x series today - PHP 5.4.8 and 5.3.18:The PHP development team announces the immediate availability of PHP 5.4.8 and PHP 5.3.18. These releases fix over 20 bugs. All users of PHP are encouraged to upgrade to PHP 5.4.8, or at least 5.3.18. Key enhancements in these releases include: fixed bug #63111 (is_callable() lies for abstract static method) and fixed bug #61442 (exception threw in __autoload can not be catched.You can get this latest...
The PHP development team announces the immediate availability of
PHP 5.4.8 and PHP 5.3.18. These releases fix over 20 bugs.
All users of PHP are encouraged to upgrade to PHP 5.4.8,
or at least 5.3.18.
Key enhancements in these releases include:
Fixed bug #63111 (is_callable() lies for abstract static method)
Fixed bug #61442 (exception threw in __autoload can not be catched
For source downloads of PHP 5.4.8 and PHP 5.3.18 please visit
our downloads page, Windows binaries
can be found...
Rob Morgan has a recent post showing you how to use Phinx, a PHP-based database migration tool, to handle your database changes (both "up" and "down").Earlier this year I decided to open-source one of my personal software projects - Phinx. Phinx is a database migration tool (think Ruby on Rails ActiveRecord migrations) where can you describe all of your database transformations in pure PHP. I have used this tool for many of my consulting projects, however it still took a lot of effort to turn it into a...
The Atlanta PHP User Group has announced their November meeting - Brian Moon talking about "The Magical World of Gearman":Gearman is a simple and robust tool for distributing asynchronous or offline work across a large number of worker boxes. Gearman will let you run a simple asynchronous task in only a few lines of code (and in many languages). This talk will focus on what Gearman is, some use cases for it, and how you can quickly start using it with PHP.The meeting is being held at Thompson...
Konstantin Kudryashov has posted a helpful hint for any web developer out there that knows the pain of constantly setting up VirtualHosts and local hostnames during their development. His suggestion makes setting them up simple using Apache2's "autohosts" support.We all know, that web development is not as easy as it sounds and that it involves lot of different and sometimes really complex tools to just run or test stuff. We also know, that bootstrap (setup) of the project could take more time than you...
In his latest post Jake Bell talks about why he thinks annotations in PHP are a bad idea (not the concept of them, but how developers are currently using them. He's in favor of officil support though).Both the Symfony 2 and Doctrine 2 libraries and components make liberal use of what have come to be called annotations - special code comments, usually prefixed with an @ that are actually interpreted by the application and affect its functionality. [...] This trend needs to die.He points out that the use...