PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 5401 to 5420 of 6889

Unit Testing Databases with Zend Framework

Unit Testing Databases with Zend Framework
Testing the database layer is a fundamental step during application development. It allows us to ensure that all data operations behave properly, without data loss or corruption. In this article, we are going to describe a simple way to test the database layer of our applications, using PHPUnit database classes, Zend Framework extensions and some custom reusable code to facilitate the process for all the domain models. This article will walk you through, step by step, for each of the tasks needed to...

Bits and PHPieces

Bits and PHPieces
I like to think of PHP as a mixed bag of tricks. The language itself was born out of some simple, real-world use cases, and that ideology still drives the language forward today. It sometimes isn't pretty, but PHP isn't meant to be prettya-ait's meant to solve problems. One (some would say unfortunate) side-effect of this ideology is that there are quite a few things in the PHP language that exist only to solve one particular, and sometimes obscure, problem. Sure, the addition of an object model in PHP...

Yahoo Developer Network: 'Tis the season for developers' calendars

Yahoo Developer Network: 'Tis the season for developers' calendars
On the Yahoo Developer Network a new post talks about some of the developer "advent" calendars that have popped up around the web - including the PHP Advent.Christmas is upon us. Developers are embracing the spirit of sharing their knowledge and wisdom, while taking the opportunity to look back and recollect what 2010 brought us in terms of new technologies and ideas. A number of "advent" calendars started posting their blog-a-day-till-Dec-24th. Here are some for your reading pleasure while you kick back...

Jani Hartikainen's Blog: How to create Doctrine 1-style Soft-Delete in Doctrine 2

Jani Hartikainen's Blog: How to create Doctrine 1-style Soft-Delete in Doctrine 2
Jani Hartikainen has posted his technique for making the Doctrine version 1 style "soft delete" in your Doctrine 2 powered application.Doctrine 1 has the concept of behaviors which you could add to your models. One of these was the soft-delete behavior, which allowed you to "delete" records without really deleting them. Doctrine 2 does not have behaviors due to various reasons. However, I needed a way to have a model which worked like soft-delete. Let's see one approach to creating such behavior in...

A Simple Alternative to Global Registry Dependency

A Simple Alternative to Global Registry Dependency
Anyone that has written object oriented code has had to use one class from within another class. The quick and dirty way to implement this is to simply hardcode the object instantiation within the current class, but this can cause you more hassle in the long run. Unfortunately, this method provides you with no means of overriding or changing that dependency on the fly, so future modifications and testing suffer. The obvious solution to this hard-coding issue is to instead rely on objects being explicitly...

Johannes Schluter's Blog: Upload Progress in PHP trunk

Johannes Schluter's Blog: Upload Progress in PHP trunk
Johannes Schluter has a new post to his blog looking at the progress that the upload progress meter extension has been making and how a version of it, put together by Arnaud Le Blanc has been introduced to the trunk line of PHP's code.For implementing this we have one architectural problem: PHP implements, for very good reasons, a shared nothing architecture. So one request from connection has no insight into another request/connection - but this is needed for the upload progress. [...] The obvious...

LearnComputer.com: PHP Interview Questions and Tips

LearnComputer.com: PHP Interview Questions and Tips
From LearnComputer.com there's a few hints they've put together that might help you with that next PHP-related job interview.So you've been slinging resumes for a while and now you have an interview for an awesome PHP job. While part of the interview will be the typical job interview, you should also be prepared for a technical interview. Technical interviews are often given to determine how well you truly know the technologies with which you'll be working. There are numerous books and articles to help...

A new tutorial on using Facebook's PHP SDK

A new tutorial on using Facebook's PHP SDK
Over on his blog, Joey Rivera recently posted a tutorial on how to interact with Facebook's Graph API and PHP SDK . Click on in and let's take a look at this.

Community News: Latest PEAR Releases for 12.06.2010

Community News: Latest PEAR Releases for 12.06.2010
Latest PEAR Releases: Mail_Mime 1.8.1 Mail_mimeDecode 1.5.5 Net_DNS2 1.0.1 Payment_DTA 1.4.0 Translation2 2.0.4 Image_JpegXmpReader 0.5.3 URI_Template 0.3.3

JavaScript for PHP Developers

JavaScript for PHP Developers
Hopefully, you've been a good geek in 2010. You've followed last year's advice and learned some JavaScript. Now, let's kick back with a glass of wine by the fireplace and take a moment to review what you've learned. Objects Most everything in JavaScript is an object, yet there are no classes. One way to define an object is by simply listing out the properties you want your object to have, separate them with commas, and wrap them in curly braces. var calendar = { name: "PHP Advent", year: 2010 }; This...

Code for Today

Code for Today
Most programmers are lazy, for some value of lazy. Many of us claim that we are efficient, doing no more than is actually needed, pulling resources from elsewhere, and generally getting things done in time to make it to the pub. Why, then, do we sometimes over-engineer solutions to the point that when we get to the end of the task, we have lost sight of the feature we were building when we began? I wonder sometimes if it's because we love to code, so we look for opportunities to put into practice what...

The Thing with the Two Heads

The Thing with the Two Heads
(With apologies to Rosie Grier.) As web developers, we usually think of the apps or sites we create as single, contained units. That's understandable, especially with PHP-based apps. PHP is often responsible for creating all aspects of the site. Platforms like WordPress and Drupal generally reflect this thinking, and thousands (millions?) of sites have been deployed on top of them.It's not quite like that, though. There are two distinct platforms our code executes on, the server and the browser. Our...

Richard Smaizys' Blog: Improve your code style with simple tips

Richard Smaizys' Blog: Improve your code style with simple tips
Richard Smaizys has a new post to his blog with a few simple tips you can follow to help improve your code's style and readability.So you have to know and you can not forget that your program (not only websites) is like a living beast with whom many people might work in the future. Your code is like your art piece which sometimes need editing, renewal and etc. You can not just think that you will always be the person who manages everything and supports all the bugs. By understanding this you also agree...

Upload Progress in PHP trunk

Upload Progress in PHP trunk
File uploads via HTTP are an annoyance. Web Browser know quite a lot but still the give little feedback to the users. Some a bit more, most close to no feedback. Now over the years this led to man unhappy users. Over the last year, with all these AJAX things, solutions emerged so that one can periodically poll the web server on a second connection for the status. For implementing this we have one architectural problem: PHP implements, for very good reasons, a shared nothing architecture. So one request...

Phil Sturgeon's Blog: EllisLab react with CodeIgniter Reactor

Phil Sturgeon's Blog: EllisLab react with CodeIgniter Reactor
Phil Sturgeon, one of those selected to a spot in the Engineer group of the CodeIgniter Reactor community branch, has posted a few thoughts of his own about the moves EllisLab has made and the reaction from the community he's seen.Since what some have referred to as "CodeIgniter-gate" EllisLab's have done a great job of listening to the points raised by me and other members of the community and in part I believe we have effected change. [...] Good news right? Hell yes. This is exactly what the...

DZone.com: Zend_Validate for the win

DZone.com: Zend_Validate for the win
In this new post to DZone.com today Giorgio Sironi looks at what he considers one of the more valuable yet underestimated components of the Zend Framework - Zend_Validate.Zend_Validate is a component of Zend Framework which provides validation classes which out-of-the-box enable you to check from string lengths to stranger properties like conformance to regular expressions or to a standard for barcodes. [...] Some parts of Zend_Validate are quite complex, and tie-in with the other components: there are...

PHP Content Repository: Full implementation in sight

PHP Content Repository: Full implementation in sight
Recently, I put a finishing cleanup on the PHPCR API, the port of the Java Content Repositry API (JCR) to PHP. PHPCR is implemented by Jackalope, which got a whole team at Liip working at it to fix the failing tests and fill in missing bits. You might have heard that we started to port the Java Content Repository (JCR) standard to PHP. If not, read the Jackalope post from last year. The JCR is a Java standard for storing content. Probably the best way to think of it is as a file system with flexible meta...

CodeIgniter.com: CodeIgniter in 2011: Reactor, Core, & UserVoice

CodeIgniter.com: CodeIgniter in 2011: Reactor, Core, & UserVoice
The CodeIgniter project (from EllisLab) has posted the latest community efforts they've been making to try to advance not only the framework but the CodeIgniter community as well. They've introduced three new things - CodeIgniter Reactor, Core and UserVoice.EllisLab, Inc. is formally announcing CodeIgniter Reactor, a community driven branch of CodeIgniter that will enable faster adoption of the best community submitted code to the CodeIgniter open source PHP framework. CodeIgniter Reactor will be...

Mashable Interview

Mashable Interview
I was fortunate enough to be interviewed on Mashable by Jolie O'Dell recently, cited as a aoPHP experta Here's a full transcript of the original email interview, some responses make more sense in context: Am running a bit behind but here are my answers for your interview, please let me know your feedback and if this gets published: -What advice would you give to a developer just starting to learn PHP? - keep on top of best practices including a healthy approach to security - read the code of seasoned...

Label Media Blog: Test Driven Development with PHPUnit

Label Media Blog: Test Driven Development with PHPUnit
New on the Label Media blog today Sam Holman has posted his introductory look at doing Test Driven Development (TDD) with the help of the popular PHP unit testing tool PHPUnit.I couldn't find any recent surveys looking into the percentage of software development teams that make use of TDD, but i'd hazard a guess that it's probably not as high as it perhaps should be. I think there are a number of reasons for this, but it's primarily all about the people. The technologies are here, you've just got to...

Latest PHP Tweets