News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Rob Allen's Blog:
A review of "Object-Oriented Programming with PHP5"
0 comments :: posted Tuesday May 06, 2008 @ 09:36:02
voice your opinion now!

Rob Allen has posted his review of another PHP-related book from Packt Publishing, "Object-oriented Programming with PHP5":

Packt Publishing recently sent me a couple of books to review, so let's start with Object-Oriented Programming with PHP5 by Hasin Hayder. According to the introduction, the book is intended for beginners to intermediate PHP5 programmers and the first chapter has a good introduction to what object oriented programming is and why you would want to use it.

He glosses over the first few chapters of the book (introductory stuff mostly) and points out three others specifically - Chapter 5 covering reflection and unit testing, Chapter 6 covering the SPL and Chapter 9 dealing with SimpleXML and DOM.

tagged with: object oriented programming php5 review book packt


Ibuildings Blog:
Accessing object properties by reference
0 comments :: posted Monday May 05, 2008 @ 14:38:49
voice your opinion now!

On the Ibuildings blog today, Harrie Verveer has posted about an interesting quirk he found when working with objects and references:

PHP is a loosely typed language. Most of the time this is very useful because you as a programmer don't have to worry about typecasting: it's done for you. However, on some occasions this can cause some unexpected trouble. [...] In this blog I want to point out what can happen if you try to access object properties by reference when the object is not initialized.

His example shows the problem when it tries to grab a value from an array in a non-existent object by reference. It results in a dyanamically created object (of that type) with an empty array inside of it. It only works when you grab it by reference, but he shares a tip or two about how you can prevent hard to track down issues like this.

tagged with: property object reference find difficult issue

Ken Guest's Blog:
Book Review Object-Oriented Programming with PHP5
0 comments :: posted Friday May 02, 2008 @ 08:47:33
voice your opinion now!

Ken Guest has reviewed one of the PHP offerings from Packt Publishing and written by Hasin Hayder - Object-oriented Programming with PHP5.

Putting the aspects of Hayder's grasp of the English language aside, the book is rather good as an introduction to the various technologies that it covers.

He points out a few things of note - the beginner OOP chapters (only made for the newbies out there), the contents of the main OOP chapter and the good section on PHPUnit and unit testing. He also has a few suggestions of things that could make the book a bit better, including a personal suggestion on code formating and braces.

tagged with: book review php5 object oriented programming packt publishing hasinhayder

DevShed:
Benchmarking Applications with PHP
0 comments :: posted Wednesday April 23, 2008 @ 21:02:17
voice your opinion now!

DevShed has posted the first part of a new series looking at benchmarking performance in your PHP applications.

If you're anything like me, you have had your head spinning with questions [...] these and other dilemmas (add your own to the list) sometimes make peace of mind a nearly impossible goal.

The tutorial talks about a few simple methods for running benchmark data including the use of microtime(), an OOP method and wrapping the call inside a method of their class.

tagged with: benchmark application microtime object oriented tutorial

Developer Tutorials Blog:
PHP array_walk() Run an array through a function
0 comments :: posted Wednesday April 23, 2008 @ 08:47:09
voice your opinion now!

The Developer Tutorials blog has a quick example of how to use the array_walk function to maneuver through the array of your choosing and applying a callback method to each of its elements.

It’s a common sight: taking an array and running (well, walking) its elements through a particular function. Luckily, PHP provides a simple yet powerful function to overcome this: array_walk().

They include an example, giving a sample "some_function" the array_walk method uses when it's called, replacing a foreach (or other type of loop). Plus you can specify an object with the callback to run it against a method inside a class too.

tagged with: arraywalk function callback object method loop tutorial

PHPBuilder.com:
PHP Form Validation System An Object-Oriented Approach
0 comments :: posted Monday April 21, 2008 @ 08:49:24
voice your opinion now!

Mike Weiner has put together an article for PHPBuilder.com that's posted today showing a bit more object-oriented solution to validating the user submitted data in your forms:

Whether it is for database submission, emailing, or for some other purpose, forms represent the primary means of enabling a user to send data to an application. As a result, it is important to have control over the data collected by your forms, which will aid in the creation of streamlined, error-free applications.

He lays out the validation method in a graphic going with a generic validation class that then calls the various validation methods (like phone or email) as needed. The "validation set" manages which validations are to be run on which form elements. Example code for each of the bits making up the structure and the implementation are provided.

tagged with: object oriented approach form validation tutorial

DevShed:
Developing a Modular Class For a PHP File Uploader
0 comments :: posted Wednesday April 16, 2008 @ 13:28:49
voice your opinion now!

DevShed has posted the final part of their series looking at the handling of file uploads in PHP5. This last installment shows how to take what yuou've learned so far and make things a bit more modular.

At this stage, you've hopefully recalled how to build an expandable file uploading application with PHP 5 that uses only one custom function to transfer a target file from a client machine to a predefined web server. However, in the beginning, I said that I was going to teach you how to develop a brand new file uploading application using an object-oriented approach.

The finish off the FileUploader class they were working on previously and show some testing examples of it in action.

tagged with: modular object file upload handler tutorial

Michael Girouard's Blog:
Rolling Your Own MVC The Page Load Scenario
0 comments :: posted Wednesday April 09, 2008 @ 15:33:45
voice your opinion now!

Michael Girouard has posted his 10,00 foot view of the typical structure of an Model/View/Controller application (and framework) and how a page request is handled:

In my previous article, I announced that I would be documenting the process of developing a simple MVC framework. In this post I will go into a little more detail about each of the specific components of our MVC and will discuss the series of events which occur each time a page loads, otherwise known as the page load scenario.

He talks about how URIs work, the role of mod_rewrite, several of the objects involved (like the Front Controller, Request, Route and View) and how they all fit in with the custom Models, Views and Controllers the user could define.

tagged with: modelviewcontroller mvc page load object route request

Hasin Hayder's Blog:
Facebook data storage api can really be the replacement of memcache
0 comments :: posted Wednesday April 09, 2008 @ 13:58:22
voice your opinion now!

Hasin Hayder has proposed an interesting replacement for the usual caching mechanism - using the Facebook data storage API to cache copies of pages/data/etc.

Why not! All you need is a fast-n-furious caching storage for your Facebook application which stores values against a key, same like a hash table. Facebook data storage API does the same for you. using the batch API in Facebook rest client you can seriously think it as an alternative of memcache.

He shows the simple process for making the object (manually in a preexisting application), inserting data into the object through the API they provide and how to pull that data back out.

tagged with: facebook storage api replace memcache object

DevShed:
Working with Multiple Document Nodes with the DOM XML Extension in PHP 5
0 comments :: posted Wednesday March 19, 2008 @ 07:59:49
voice your opinion now!

DevShed has posted the fourth part of their series looking at working with the DOM functionality of PHP5, this time with a focus on working with multiple document nodes inside of an XML document.

It's time to learn a few other methods included with the DOM XML extension. Based upon this premise, in this fourth tutorial I'm going to show you how to get access to multiple nodes of an XML document, either for internal processing or simply for echoing to the browser.

They show you how to grab the collection of nodes to work with and how to grab data from an XML text file with load() and loadXML().

tagged with: dom xml tutorial php5 load set collection object


mysql ajax developer release code book package cakephp security framework releases application zend PHP5 zendframework PEAR job database conference pecl

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework