|
Sponsored Link
|
Lars Tesmer and his coworkers have been working on improving their development skills lately, specifically related to unit testing. In his latest post he shares some of what they've discovered along the way.The plan was to try and write as many tests as we could for the Constraint classes PHPUnit uses to implement its assertions. [...] Well, our plan didn't work out that way, we didn't really succeed in writing a considerable amount of unit tests. However, it still was a valuable experience, as it turned...
Matt Farina has a new post today looking at an "underutilized gem" he's found in the offerings of the Standard PHP Library (SPL) - the SplFixedArray.Arrays in PHP are not arrays per the typical array data type. Instead, as Matt Butcher recently pointed out arrays in PHP are similar to hashes in other languages. This can be a very important point to know when tracking down bugs in code and to programmers coming to PHP from other languages. But, what if we wanted something like a traditional array data...
In a new post to his blog Marco Tabini offers some suggestions on unit testing - not really a tutorial on how to it, more of an "easy way in" to introducing it to your development process.Stopping development for weeks while you figure out how to add unit tests to cover your entire codebase is simply something that cannot be done (at least, not if you want to keep your job), no matter what future benefits it might bring. The good news is, adding unit testing to your existing project only takes five...
Talking in the Web Species blog today about Dependencies management in PHP projects:
Rarely a project lives by itself, especially in the days of frameworks. Furthermore, there are a lot of great open source libraries you might want to use to save time. But all of this raises a new problem - how could we manage all those dependencies. Here are some thoughts on this problem and how you might want to solve it; without shooting yourself in a foot. Which is commonly known as DLL Hell.
Read the full article here
Kevin Schroeder has a new post to his blog today asking "Why PHP?" - not so much a "why you should chose PHP for your development", more of a why PHP is the way it is.Today on twitter there was a conversation going on about the responsiveness of the core PHP developers to PHP users. [...] This post isn't necessarily to correct perceived errors, to stand behind correct statements, or to state what I believe the problem is. Rather, it is to add something to the conversation that I don't think I've seen...
Popular posts from PHPDeveloper.org for the past week:rooJSolutions Blog: Watch-out PHP 5.3.7+ is about.. and the is_a() / __autoload() mess.
Amazium Blog: PHP in the Dark: Input/Output
Lars Tesmer's Blog: PHPUnit: Better Syntax for Expecting Exceptions
CodeIgniter.com: Amazing Progress Report & Addition of IRC to CodeIgniter.com
Brian Moon's Blog: Check for a TTY or interactive terminal in PHP
Christian Schaefer's Blog: Beware of the timezone! Working with PHP DateTime & Doctrine for MongoDB
Lukas...
The ServerGrove blog, a hosting provider whose services include shared hosting, has posted a guide to help you deploy to shared hosting with Capifony, a Symfony-based tool for use with Capistrano.This article is meant to help you configure and deploy your projects developed with Symfony2 into a Shared Hosting environment, so if you need to deploy using capifony on a VPS, please read this article.You'll need ssh access to the server to get things set up for the deployment as well as a local environment...
On PHPBuilder.com today there's a new tutorial from Vojislav Janjic about using a simple DOM parser in PHP to edit the markup even if it's not correctly W3C-formatted - the Simple HTML DOM ParserSimple HTML DOM parser is a PHP 5+ class which helps you manipulate HTML elements. The class is not limited to valid HTML; it can also work with HTML code that did not pass W3C validation. Document objects can be found using selectors, similar to those in jQuery. You can find elements by ids, classes, tags, and...
Unit testing shouldn't be hard. In fact, given its usefulness, it should be easy and pleasant-a tool that every developer would never want to do without.
And yet, I see programmers (and, more frighteningly, systems architects) struggling with it constantly. In many cases, they are saddled with large codebases that have never seen any tests whatsoever on one hand, and the fact that a recent changes has caused their entire system to crap out on the other.The unfortunate thing is that most a€oexpertsa€ť...
On his blog today Jakub Zalas has posted a tutorial he's written up about using dependency injection in PHP with the Symfony2 dependency injection component (DIC).Symfony's DependencyInjection component is a PHP implementation of a Service Container, or as others like to call it, a Dependency Injection Container (DIC). The component also provides useful tools for handling service definitions, like XML loaders or dumpers. If you want to learn more about the dependency injection or the dependency injection...
As a result of the ZendCon advisory board for this year's event, Joe Devon has posted a guide that wants to help you get your talks accepted to conferences in the future (both PHP-related and not).For those who don't know what an advisory board is, conference organizers get loads of proposals and need help deciding who should speak. So they ask others in the industry to provide some feedback. It was quite a learning experience.He talks some about the "speaker backlash" that comes from being rejected, a...
I had to look deep into Symfony 1.4 code this morning as I was trying to get a field's value. Form values come from different sources: default values, record values (when editing, for example), original POST values and clean POST values. So when is each available and how do we get it?
Get the values by type
Default values are what you will be presented with when you display an empty form.
Get all values using $form-getDefaults() or a single value using $form-getDefault($name).
Record values, whichA are...
Here's what was popular in the PHP community one year ago today:Smashing Magazine: Upcoming Web Design and Development Conferences in 2010
Dhiraj Patra's Blog: Getting Started with iPFaces PHP Mobile Application Framework
Zend Developer Zone: Getting started with CouchDB : meet PHP on Couch
CodeForest.net: Key/value tables and how to use them in PHP and MySQL
Mike Bernat's Blog: The Problem with Wordpress and Drupal
Chris Roane's Blog: Should PHP web programmers go to college?
NETTUTS.com: Understanding...
A little while back, the PHP development group posted a survey of developers asking them which version control system they'd like to see the PHP project use. By an overwhelming margin, git has won and things are already in motion to move parts of the project away from subversion.In his mailing list post, David Soria Parra explains:
After 2 weeks of voting and discussion, I closed the votes today. The results are fairly straightforward. Most of the users want to move to a decentralized version control...
In a new post to his blog Philip Norton shows how to desturate images with PHP using the already built-in GD libraries and the imagecopymergegray function.To desaturate an image means to remove all non-greyscale colours from it, essentially creating a black and white version. To do this you can use the function imagecopymergegray(), which is part of the GD image library. This function is a little difficult to figure out, but what is does is sample one image into another and optionally changing the amount...
Since the CodeIgniter project has put much more emphasis on open source and having others contribute back to the framework they love, they've had questions about the best places to get started and the steps to contribute back. They've posted this Contribution Guide to help answer some of those questions.CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or Pull Requests on the EllisLab...
ZendCon is coming and the time to save on ticket prices is getting short! You know you want to go, so go ahead and get your ticket now. Click on inside, I'll share the link.
On DZone.com today there's a new post written up by Mike Bernat about making web test cases for CakePHP applications with SimpleTest.Most of the applications I work on have very straight-forward components and not a lot of complex functions/methods. I would only be testing whether or not they worked at all, rather than if they worked in a wide-array of situations. [...] For example, unit-testing a simple news list and detail page is probably overkill. Sure, you can test your classes by simple...
In a new post to his blog today Sameer Borate spotlights a translation wrapper for Bing that lets you easily use their API to translate text or determine what language the given text is in.Microsoft Language translation is an interesting service. Not only can you do language translation, you can also detect the language of a particular text. The given class provides a PHP wrapper which will help developers translate text from one language to another in a easy manner. The library also supports caching,...
The folks over at Zend would like to remind you that the deadline for Early Bird pricing on ZendCon conference tickets is coming soon - September 16th!The Zend PHP Conference (ZendCon) will be held October 17-20, 2011, at the Convention Center in Santa Clara, California. [...] The conference opening keynote will be given by Andi Gutmans, CEO and co-founder of Zend, who will be joined onstage by Michael Crandell, CEO and co-founder of RightScale.Other keynotes include ones from Jeff Barr (Amazon), Hugh...
|
|