News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Zend Developer Zone:
Designing Klingon Warships Using Behaviour Driven Development
0 comments :: posted Monday February 11, 2008 @ 15:34:00
voice your opinion now!

The Zend Developer Zone has another new tutorial from Padraic Brady talking about testing your applications (i.e. unit tests). In this new article, he expands on his previous one and dives a bit deeper into the behaviour-driven development process.

In this article, I introduce a TDD related practice called Behaviour-Driven Development which has been gathering attention for over a year and gaining converts (like me!).

He briefly covers what BDD is and how it can be used to solidify code against issues that might come up down the road (and how it compares to test-driven development). Some sample code/tests are included to give you a better idea of how it all fits together - a set of scenarios for any given "story". True to the title, Padraic writes his tests around the construction of a Klingon Bird of Prey ship.

tagged with: birdofprey behavious driven development unittest fluent plain english


Jonnay's Blog:
Introducing BunnyRegex - easy regular expressions, and mini-languages inside of PHP.
0 comments :: posted Thursday March 02, 2006 @ 06:52:20
voice your opinion now!
On his blog today, Jonnay has posted information about a new library he's built up called "BunnyRegex", a way to make easy regular expressions and mini-languages inside of PHP.

Regular expressions are hard. They are hard to create, and even harder to read after the fact. Regular expressions, while quite powerful, are a blight upon readable code. There is no easy way to know that '/^d{4}/d{2}/d{2}$/' is a search for a string in the form of 'xxxx/xx/xx'. You have to know that ^ is the start of a line, d is a digit, / is / escaped, etc.

Granted, once you know regular expressions, that information is portable across which ever language you use, be it PHP, Perl, Javascript, whatever. But getting to that point is not easy, and even after you are there, the fact remains:Regular expressions are not human parseable. This is where BunnyRegex comes in.

He includes examples of the usage of the library (not as concise as a regex, but easier to read) and how you can also use it to create "fluent regular expressions". The library even allows you to do most of the normal things you would with a standard regex engine - match, grep, replace, and splitting data.

tagged with: php regular expression bunnyregex simple fluent human-parseable php regular expression bunnyregex simple fluent human-parseable


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

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