paul borgermans

› Damn, my Nikon D70 gave up

After a few weird over and underexposed pictures, my beloved D70 refuses to work anymore. Of course, the warranty period expired a few months back … Anyone who is making money with the Lucene search plugin is hereby invited to sponsor me on the purchase of a D200 body. If paying the full price of [...]
09/08/2006 11:18 pm (UTC)   Paul Borgermans   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› PHPBuilder.com: BitMasks: Emulate Unix Permissions in PHP (Quickly)

Permissions in Unix-based systems have become one of the standard models for development all over the world. They're simple to learn and use while being extremely powerful at the same time. In this new article (as contributed by Eric Potvin) from PHPBuilder.com today, they bring this power to the realm of PHP with bitmasks.

Bitmasking is a very useful method to emulate Unix-style file permissions (read/write/execute for example). What's nice about a PHP implementation is that you can configure your own bitmasks and use them for any kind of permissions in your scripts and applications. The implementation is relatively simple as well.

They start by defining a few of the permission levels (add/delete/denied) in PHP constants before showing the bitMask() function you can use to check a user's permissions. They also include some simple pseudo-code to show how it's used. For more information, check out the complete article here.

09/08/2006 11:01 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› PHPHacks.com: Shell Scripting with PHP CLI

On PHPHacks.com, there's a new tutorial that covers a a use for PHP that's not utilized nearly enough - working with it on the command line, shell scripting.

As most of us already know, PHP is the best language for developing dynamic web pages available today. Not many people are aware that it can be used as a shell scripting language as well. While PHP as a shell script isn't as robust as Bash or Perl it does have definite advantages, especially if you're like me and are more proficient in PHP than you are in Perl.

The requirements for using PHP as a shell language is that you must compile PHP as a CGI binary instead of as an Apache module. There are certain security issues related to this so please refer to the PHP Manual when doing so.

The author shows a simple example first, just outputting information. He also demonstrates how to grab the input parameters and how to read in from the command line interactively (both single lines and multiple).

09/08/2006 10:47 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› ThinkPHP Blog: Practical Testing PHP Applications with Selenium

On the ThinkPHP blog today, there's a new post that looks at using the Selenium Javascript library to test your applications, ensuring that the input methods are all up to snuff.

Testing software whilst ongoing development seems to be a boring job containing a lot of reoccurring tasks. As a reaction on all this effects we need to add more testing. So what do we do? We use a person to click through the application, using its features as he or she thinks they are intended to use.

In the end we need another expert in the team for a boring reoccurring task, finding bugs that are easy to find and most times, simple to resolve. Did i say simple task, reoccurring? Why not use a Software for the click-around testing in our application to check if it still does what it needs to do ?

The testing tool of choice for them is Selenium, a Javascript library to perform the clicks and put into input fields data to check your application's functionality. They describe the three kinds of test suites (links to their descriptions) and show what a simple automated test would look like. There's even a link to a tutorial from IBM on the topic.

They step through the process of creating the test (no code) and show how to store them in CVS (as well as talk about a few "dirty tricks" they found out along the way).

09/08/2006 7:11 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› DevShed: Expanding the Application Range of Visitor Objects in PHP 5

DevShed continues their series on the Visitor objects in PHP5 with this second part, looking at expanding the "application range" of the objects.

Well, at this stage I'm assuming that creating visitor objects with PHP isn't a strange concept to you any longer, therefore I'll continue this journey by developing some additional -yet useful- examples on how to build up and implement visitors with PHP 5. The main purpose of this is simply reaffirming the concepts deployed in the first tutorial, so you can have a solid background for including your own visitor classes inside your PHP applications.

They start off by creating a new abstract class to use in this part, a User class with plenty of properties and methods. Next up, they make a class extending this base, abstract class to make a SoftwareUser that will accept visitor objects. They then use this interface and create a Visitor class to make the calls, showing a code example of them playing nicely together.

09/08/2006 1:57 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› DevShed: Classes as PHP Functions

Continuing on in their "PHP functions" series today, DevShed has posted this next step up the ladder, getting more advanced with the functions they're working with. This time, there's a focus on functions inside classes and creating the classes around them (a sort of introduction to object-oriented programming).

Continuing our PHP functions article, we move on to creating classes. Let me say right at the start that you can write perfectly effective and useful PHP code without creating classes or going into object oriented programming. Object oriented programming can be very powerful and PHP programmers are increasingly taking advantage of these capabilities, which have been greatly expanded since PHP4.

They start with the creation of a simple class - a human class with two $legs and two $arms. They show a simple display of this data and add another attribute to the class, one for hair color. They then capture the output they've been creating inside a function, report, and show how to execute it. Finally, they show how to use the special function that runs when the object is created - the constructor.

09/08/2006 12:49 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› Imulus.com: CakePHP and PRADO

On Imulus.com, there's brief look at two of the PHP frameworks available these days - CakePHP and PRADO.

I've recently found two open-source PHP development frameworks with great potential: CakePHP and PRADO.

He talks about the two of them, describing what they are and what the goals of the projects are. He hasn't tried them to compare them yet, but keep an eye out for future posts with more information.

08/08/2006 7:03 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› Tectonic.co.za: Getting your head around PHP objects

In a new article from Tectonic today, Jason Norwood-Young takes a look at one of the harder things for beginning PHP developers to understand - objects.

Still the practice of using objects in PHP remains a bit of a lost art

08/08/2006 1:02 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› KillerPHP.com: Two New Video Tutorials Posted

In a continuing series of introductory video tutorials they offer, KillerPHP has posted to new ones - one covering associative arrays and the other covering indexed arrays.

The videos, seven in all now are done with a voice-over talking about what the feature is and includes bits of code to help explain the discussion.

Topics so far include:

You can get complete information on these screencasts from the KillerPHP site.

08/08/2006 12:53 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› DevShed: An Introduction to Simulating the Model-View-Controller Schema in PHP

So, you've been hearing more and more about all of the PHP frameworks that are available (CakePHP, Zend Framework, etc) but feel left wondering what really powers them behind the scenes (what is MVC anyway?). Well, this new article from DevShed might help to shed some light on things.

Would you like to learn how to simulate an MVC-based system with PHP? If so, you've come to the right place. This is the first article in a three-part series that will show you how to build this schema in PHP by constructing a few classes that represent what is needed.

They start off introducing the Model/View/Controller style of development, showing it as a cleaner alternative for web site development. From there, they break out into the different parts of an application - first a look at the controller to handle the requests, then a basic model class to perform the logic, and then the view to show the results of the script on the page. Their simple application allows for some string manipulation (uppercase, lowercase, reversing, etc).

07/08/2006 2:38 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

eZ publish™ copyright © 1999-2005 eZ systems as