In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components.
I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible...
Smashing Magazine has a new post today about using jQuery and GD to manipulate images to upload an image, crop it and save that version to the remote server.One of the numerous advantages brought about by the explosion of jQuery and other JavaScript libraries is the ease with which you can create interactive tools for your site. When combined with server-side technologies such as PHP, this puts a serious amount of power at your finger tips. [...] Sure, there are plugins out there that you can use to do...
The Voices of the ElePHPant podcast has released their latest interview with a member of the PHP community. This time it's with Chris Hartjes.Cal's "three questions" for Chris center around some of his experience with frameworks:
Are frameworks a good thing or a bad thing for PHP developers?
If you could talk to the heads of all of the major frameworks, what would you tell them?
What advice do you have for those new to PHP when selecting a framework?
You can listen either through the in-page player, by...
After running away screaming from Zend_XmlRpc we migrated of our internal webservices are RESTful nowadays - which implies that we make heavy use of HTTP status codes and so on.
On the PHP side of things we implemented almost all of those webservices using the Zend Framework where some parts are replaced by in-house replacements (mostly stripped-down and optimized versions equivalents of Zend_Foo) and a couple nifty PEAR packages.RESTful - how does it work?Building a RESTful API means to adhere to the...
Vance Lucas has tossed his hat into the ring in the debate about private versus protected scope in PHP projects with this new post to his blog.The age old private vs protected debate has been re-ignited in the PHP community recently following the decision of Doctrine2 and Symfony2 to make all class methods private until there is a very clear and proven reason to change them to protected or public. The intention is a good one - to ensure they are providing a clear and stable API through intentional and...
In a recent post to his blog Ian Barber looks at applying Benford's Law in PHP to determine if the dataset you're working with is "real" or not.Benfords Law is not an exciting new John Nettles based detective show, but an interesting observation about the distribution of the first digit in sets of numbers originating from various processes. It says, roughly, that in a big collection of data you should expect to see a number starting with 1 about 30% of the time, but starting with 9 only about 5% of the...
The CatsWhoCode.com blog has a new post today with what they call super useful PHP snippets that could help you out in a pinch.Having the right code snippet at the right time can definitely be a life saver for web developers. Today, I've compiled 10 really awesome PHP code snippets that will, I hope, be very helpful in your forthcomming developments.Their list of ten includes bits of code for:
Super simple page caching (file-based)
Convert seconds to time (years, months, days, hours...)
Get current...
From time to time I trip over APIs, which do not allow me to control the
object lifecycle of the used objects myself. Let me discuss why this is a bad
thinga€¦
Latest PECL Releases:
timezonedb 2011.5
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components.
I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible...
Mockery is my Mock Object Framework for PHP 5.3, geared towards replacing existing mock object solutions (like PHPUnit Mock Objects) with a simpler, more flexible and more intuitive alternative with a fuller feature set. All that aside, this blog post is about some of the features Mockery 0.7 will add shortly. When I set out to write Mockery, I did so knowing that I'd need to settle on some new terminology. Here's what I came up with:
1. Partial Mocks
This is the least debateable term since it's...
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components.
I've just put out ComponentManager version 1.1.0, with the following (hopefully useful) changes:
Improvements To The php-library Skeleton
Once you've setup your metadata, phing...
Brandon Savage - one of the latest members of the Mozilla tribe and all around good guy - has written a new post for his blog. In it, he discusses a€oValidation Blind Spotsa€ť. Click on in for the details, a link and a vague attempt at humor.
In a recent post to the 3 Engineers blog, they take the usual "Two Step" approach the Zend Framework takes to generating view data (Zend_View + Zend_Layout) and takes it up one more step by using Three Step Layouts with a simple wrapper.While the Two Step View pattern creates a reasonable paradigm for seperating layout presentation from page presentation, enabling Three-level Inheritance allows for even better separation. In other words, using 3 Step Layouts is a possible and often necessary investment...
Gonzalo Ayuso has a new post to his blog today talking about a regular expression-laden script he's some up with to reflect over a PHP file and pull out the document's comments (PHPDoc-style).I want to parse PHPDoc code. Let me explain a little bit what I want to do. Imagine a dummy function documented with PHPDoc. [...] PHP has a great reflection API, but as at least in the current PHP version (as far as I know) we only can get the PHPDoc as a string, without parse it. I need to get the parameters and...
In a new post to his blog Maarten Balliauw shows a method that's a bit more lightweight than some of the other Windows Azure deployment methods you might have used in the past - creating a .cspkg from scratch to describe your project.Those of you who are deploying PHP applications to Windows Azure, are probably using the Windows Azure tooling for Eclipse or the fantastic command-line tools available. I will give you a third option that allows for a 100% customized setup and is much more lightweight than...
The Italian PHP user group GrUSP is pleased to
announce the 8th edition of the Italian phpDay
conference, taking place from May 12th to 14th, 2011 in Verona. We will
show new development traits, best-practices and success cases related to
quality, revision control, test-driven development, continuous
integration and so on. There are also talks about design, project
management, agile and various php-related technologies.
phpDay is the first historic Italian conference dedicated solely to PHP...
Dave Marshall has written up a new post showing how he's used memcache, Gearman and Dojo to create an asynchronous progress bar he uses when generating large reports.I have a (highly optimised) report that takes way too long to generate, up to around 30 seconds. [There's] too many variables to prime caches for every possible combination [and] personally, I don't think the browsers inbuilt progress bar is enough feedback for todays web users.He generates the data into memcache when the user requests it...
In a new post to his blog Brandon Savage talks about how some of your current validation rules (and restrictions on input values) could be causing blind spots in your application that you don't even know are an issue.Our blind spots about validation can and do harm real users if they're poorly or incompletely thought out. What might seem like a completely rational limit to us might hurt a real user who needs to exceed that limit, through no fault of their own. How many women are "BETTYJEAN" because their...
From the HashBangCode.com site today there's a new post that revisits filtering with the filter_var function included with the language. The focus in this article is specifically in validating URLs with the FILTER_VALIDATE_URL flag.Quite a while ago I looked at using the filter_var() function to validate URL's using the FILTER_VALIDATE_URL flag and someone pointed out recently that this function has not only changed since the initial release, but that a number of flags can be added to change the way that...
|
Latest PHP Tweets
|