PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 61 to 80 of 246

Unit Testing Strategies

Unit Testing Strategies
High Code Coverage through extensive Unit Testing is the Holy Grail in software development. Theoretically, it would create an environment where the code could be debugged, re-factored, and extended while keeping a stable and overall clean system. Unfortunately, this is just about as elusive as the Holy Grail. So how can we do Unit Testing in the real world.

Zend Developer Zone: File uploads with Adobe Flex and Zend AMF

Zend Developer Zone: File uploads with Adobe Flex and Zend AMF
On the Zend Developer Zone there's a post looking at uploading files in a Adobe Flex-based application that uses a slightly different than usual approach to uploading files through Zend_Amf.Zend AMF is a PHP implementation of the AMF (Action Message Format) binary protocol within the Zend Framework. I had to implement a system to upload files that were a little different than what is typically used in Flash, so I built upon Zend AMF for my needs. Researching a little on the net, I found a solution that...

PurpleRockScissors.com: Avoiding Cache Stampedes with Pseudo-Locks

PurpleRockScissors.com: Avoiding Cache Stampedes with Pseudo-Locks
In this quick post to the Purple Rock Scissors blog, there's a suggestion from Rob Zienert about how you can avoid a "cache stampede" on your site's caching tool with the help of a pseudo-lock on the record.A cache stampede occurs when a cached item expires and multiple clients attempt to repopulate the cache at the same time. Take for example a page cache expires and a few thousand people try to refresh the generated HTML. That's a lot of instant load - hitting the database, re-saving the cache and...

Josh Holmes' Blog: Zend SimpleCloud and Azure

Josh Holmes' Blog: Zend SimpleCloud and Azure
In a new post to his blog, Josh Holmes has posted about some of the testing he done with Azure and SimpleCloud to get them connected and playing nicely together.I've been playing with Zend's SimpleCloud API for the webcast that I'm doing with Zend today. I started with the Zend Framework Quickstart tutorial but changed out the backend to hit the Azure Tables and such (well kinda - I used Zend Studio 8 Beta 2 and didn't use the ZF tool but I still created a little guestbook). I'm going to expand this...

VoidWeb.com: PHP Clustering using Apache httpd mod_proxy

VoidWeb.com: PHP Clustering using Apache httpd mod_proxy
New on VoidWeb.com there's a post looking at clustering PHP applications with the help of the mod_proxy component that can be added into the Apache web server.Often for my clients, I have to prepare the deployment strategy for their LAMP based web applications. Some of them are small to medium businesses and are starting up so a single server setup work out for them. But there are few large web applications too which are growing continuously in terms of users and demands scaling either horizontally or...

Conference Schedule

Conference Schedule
In a few days I will attempt one of my most tricky conference schedules in a long while (perhaps ever), I get the feeling a vacation will be in order after all this. It was a privilege to get my talks accepted accepted at the PHP Barcelona Conference 2010 in Barcelona, Spain where I will be speaking about Hidden Features of PHP as well as APC & Memcached. Then I get to fly home to Toronto for about 24 hours, and from there travel to ZendCon in Santa Clara, California, where I get to speak about the...

PHPBuilder.com: Enforcing Coding Standards with PHP_CodeSniffer

PHPBuilder.com: Enforcing Coding Standards with PHP_CodeSniffer
Developing applications has become simpler and simpler these days and the multitude of IDEs out there can help you keep all of your files organized and linked together so you know everything is in its place. There's one thing that only a handful out there can do, though - enforce coding standards. Thankfully, there's a tool that can help you keep your code following down the right path and PHPBuilder.com has a new tutorial about using it - PHP_CodeSniffer.Although defined according to formal grammar and...

Sebastian Bergmann's Blog: PHPUnit 3.5 Upgrading Woes

Sebastian Bergmann's Blog: PHPUnit 3.5 Upgrading Woes
If you've been having issues upgrading to the latest version of PHPUnit (v3.5), Sebastian Bergmann might have the answer to your problems that's related to the PEAR installer and this bug.The new dependencies of the PHPUnit package, such as PHPUnit_MockObject for instance, are installed first. The PHPUnit package itself is installed last. And herein lies the problem: PHPUnit_MockObject installs the new version of MockObject/Generator.php before the PHPUnit package is upgraded. This upgrade deletes the...

Site News: Popular Posts for the Week of 10.22.2010

Site News: Popular Posts for the Week of 10.22.2010
Popular posts from PHPDeveloper.org for the past week:Jay Allen's Blog: Adminer | The World's Smallest MySQL Admin Script Smashing Magazine: Common Security Mistakes in Web Applications Vance Lucas' Blog: Practical Uses for PHP 5.3 Closures Paul Jones' Blog: PHP Framework Benchmarks on Github Phil Sturgeon's Blog: CodeIgniter 2.0 is stable (enough) Lorna Mitchell' Blog: Best Practices in API Design: Audio and Slides Leszek Stachowski's Blog: php anachronic coding standards SitePoint.com: OAuth for PHP...

PHPUnit 3.5 Upgrading Woes

PHPUnit 3.5 Upgrading Woes
The issues related to upgrading from a previous version to PHPUnit 3.5 that I mentioned in the release announcement are more serious than I initially thought. Only today did I find the time to really investigate the root cause. Here is the situation before the upgrade: root@ubuntu:~# pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.7 stable Console_Getopt 1.2.3 stable PEAR 1.9.1 stable Structures_Graph 1.0.3 stable...

Zend Framework 1.11.0RC1 Released

Zend Framework 1.11.0RC1 Released
A quick announcment: Following on the heels of 1.11.0BETA1, the Zend Framework team is pleased to announce the immediate availability of the first release candidate of version 1.11.0. Almost 30 issues have been resolved since the beta, most of which occurred during our bug hunt days this week.

WebReference.com: Create a Localized Web Page with PHP

WebReference.com: Create a Localized Web Page with PHP
On WebReference.com there's a new tutorial posted about localizing your website by defining a character set to use for your content.The process of making your applications/websites usable in many different locales is called internationalization, While customizing your code for different locales is called localization. Localization is the process of making your applications or websites local to where it is being viewed. For example, you can make a website more local to a particular place by converting its...

Speaking at ZendCon 2010

Speaking at ZendCon 2010
This year I was invited to speak at ZendCon 2010, the PHP conference of the year in Santa Clara, CA (USA). I'm giving three talks there and I host the uncon sessions (see my previous announcement about that).I'm not only sharing the stage with great icons from the community, but I'm also celebrating the fact I recently became a ZCE for PHP 5.3.At the end of ZendCon, I'll be a part of a community panel to answer questions regarding community and user groups. At PHPNW I closed the conference with a short...

Reddit.com: Today I learned about variable variables...

Reddit.com: Today I learned about variable variables...
Over on Reddit.com there's an interesting post (yes, despite some of the comments made on it) about variable variables that turns into a detailed look at PHP variable handling as based around "$".OK, here's the thing: [variable variables are] only the entrance of the rabbit hole. [...] The first thing to understand is what $ is. $ is actually a shorthand for ${} and means "return the value of the variable whose name is contained in this".The response goes on to talk about variable names as strings, a few...

ServerGrove Blog: Enforcing unique key constrains with Doctrine ODM for MongoDB & Symfony 2

ServerGrove Blog: Enforcing unique key constrains with Doctrine ODM for MongoDB & Symfony 2
New on the ServerGrove blog today is a quick post talking about how you can enforce key constraints on a MongoDb with Doctrine in Symfony.Of course you can define unique indexes to prevent duplicate values and there are a couple of different syntax options to do so, which are clearly defined in the official documentation. But defining and creating the indexes is not enough. You must specify when you want to enforce the constrain, this is due to the fact that the PHP driver needs to tell MongoDB to throw...

Paul Jones' Blog: Regarding Underscores

Paul Jones' Blog: Regarding Underscores
In response to a post from Leszek Stachowski about underscores in PHP class development, Paul Jones has shared his own thoughts on the matter - that he disagrees with Leszek and suggests keeping the underscore prefix for private methods.I think the underscore-prefix for protected and private is a good convention to keep. As with many things about programming, this convention is not for the program, it is for for the programmer. For example, limiting your line length to about 80 characters is a good idea,...

Padraic Brady's Blog: Nanosecond Scale Remote Timing Attacks On PHP Apps: Take Them Seriously?

Padraic Brady's Blog: Nanosecond Scale Remote Timing Attacks On PHP Apps: Take Them Seriously?
In a new post to his blog Padraic Brady takes a look at remote timing attacks that happen on a nanosecond scale and whether or not we, as application developers, should take them seriously. Timing attacks involve gleaning information off of systems based on the response and execution time.I've been following the progress of Remote Timing Attacks with a lot of interest over the years, during which time there has been an obvious trend in improving the technique. The most recent reported cases of Remote...

Paul Reinheimer's Blog: Open the field to find the paths

Paul Reinheimer's Blog: Open the field to find the paths
Paul Reinheimer has posted something to think about for both developers and those planning out projects and features - the paths the users will take through the application, not just the features they'll have available.There's a popular turn of phrase "pave the cow paths", which was introduced to me by my friend Chris Shiflett in one of his talks. The essence (as I understand it) of paving the cow paths is that it's easier to positively encourage users to act they way they already want to, than to have...

Internationalized domain names, are you ready?

Internationalized domain names, are you ready?
Since may 11 TLD's (top-level domainnames) have been added. In order for this to work successfully, a lot of applications will have to be fixed. Many email-validation scripts might use an approach like this:$ok = preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i', $email);This one is pretty simple, it matches the most common address formats, as long as the tld (.com, nl, .uk, etc) is under 6 characters. For a bit more sophistication you might want to ensure that the tld is a bit more valid:$ok =...

ZendCasts.com: Unit Testing Zend_Form

ZendCasts.com: Unit Testing Zend_Form
On the ZendCasts.com site today there's a new screencast posted about using the unit testing functionality that comes with the Zend Framework to unit test your Zend_Form instance.This screencast will show you how to build a form for changing user passwords with 100% code coverage.To follow along you can download the source code for this specific example or the entire project to see how it all fits in. If you're interested in other unit testing related topics, see their unit testing section.