PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 4341 to 4360 of 6889

PHP Components: Shipping A Command-Line Program

PHP Components: Shipping A Command-Line Program
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: Image Manipulation With jQuery and PHP GD

Smashing Magazine: Image Manipulation With jQuery and PHP GD
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...

Voices of the ElePHPant: Interview with Chris Hartjes

Voices of the ElePHPant: Interview with Chris Hartjes
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...

nginx configuration gotchas

nginx configuration gotchas
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' Blog: Protected vs Private Scope: Arrogance, Fear and Handcuffs

Vance Lucas' Blog: Protected vs Private Scope: Arrogance, Fear and Handcuffs
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...

Ian Barber's Blog: Benford's Law

Ian Barber's Blog: Benford's Law
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...

CatsWhoCode.com: 10 super useful PHP snippets

CatsWhoCode.com: 10 super useful PHP snippets
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...

Object lifecycle control

Object lifecycle control
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

Community News: Latest PECL Releases for 04.05.2011

Community News: Latest PECL Releases for 04.05.2011
Latest PECL Releases: timezonedb 2011.5

PHP Components: Shipping Reusable PHP Code

PHP Components: Shipping Reusable PHP Code
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 Terminology: Any Suggestions From The Audience?

Mockery Terminology: Any Suggestions From The Audience?
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...

PHP Components: ComponentManager-1.1.0 Released

PHP Components: ComponentManager-1.1.0 Released
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 is talking about Validation Blind Spots

Brandon Savage is talking about Validation Blind Spots
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 aoValidation Blind Spotsa. Click on in for the details, a link and a vague attempt at humor.

3 Engineers Blog: 3 Step Layouts in Zend Framework

3 Engineers Blog: 3 Step Layouts in Zend Framework
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's Blog: Reflection over PHPDoc with PHP

Gonzalo Ayuso's Blog: Reflection over PHPDoc with PHP
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...

Maarten Balliauw's Blog: Lightweight PHP application deployment to Windows Azure

Maarten Balliauw's Blog: Lightweight PHP application deployment to Windows Azure
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...

Italian phpDay 2011

Italian phpDay 2011
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' Blog: Asynchronous cache priming with progress bars via Gearman, Memcache and Dojo

Dave Marshall' Blog: Asynchronous cache priming with progress bars via Gearman, Memcache and Dojo
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...

Brandon Savage's Blog: Validation Blind Spots Hurt Real Users

Brandon Savage's Blog: Validation Blind Spots Hurt Real Users
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...

HashBangCode.com: Revisiting filter_var() and FILTER_VALIDATE_URL

HashBangCode.com: Revisiting filter_var() and FILTER_VALIDATE_URL
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