Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sebastian Bergmann's Blog:
Isolated (and Parallel) Test Execution
Dec 19, 2007 @ 21:26:00

Sebastian Bergmann points out a new feature that PHPUnit (the popular PHP unit testing tool) now has - parallel_test_execution allowing for each test to execute on a separate PHP process.

The advantages of this include full test isolation and the fact that a test can now cause a PHP fatal error or even a segmentation fault of the PHP interpreter without interrupting the test execution.

He does mention, however, that it can cause a bit more overhead for larger testing suites since it needs to create a new process (complete with memory usage) for each running test. There are also coding issues that could be thrown off by this option (he gives an example of an inheritance issue with eZ Components).

He also notes some of his thoughts on how to control/configure the process (like in a configuration file) and via an "@isolated" notation to make it easy to do it dynamically.

tagged: phpunit seperate process unittest execute overhead configure isolated phpunit seperate process unittest execute overhead configure isolated

Link:

Sebastian Bergmann's Blog:
Isolated (and Parallel) Test Execution
Dec 19, 2007 @ 21:26:00

Sebastian Bergmann points out a new feature that PHPUnit (the popular PHP unit testing tool) now has - parallel_test_execution allowing for each test to execute on a separate PHP process.

The advantages of this include full test isolation and the fact that a test can now cause a PHP fatal error or even a segmentation fault of the PHP interpreter without interrupting the test execution.

He does mention, however, that it can cause a bit more overhead for larger testing suites since it needs to create a new process (complete with memory usage) for each running test. There are also coding issues that could be thrown off by this option (he gives an example of an inheritance issue with eZ Components).

He also notes some of his thoughts on how to control/configure the process (like in a configuration file) and via an "@isolated" notation to make it easy to do it dynamically.

tagged: phpunit seperate process unittest execute overhead configure isolated phpunit seperate process unittest execute overhead configure isolated

Link:

DevShed:
Working with Multiple Template Files to Separate Logic from Presentation (Part 3)
May 17, 2006 @ 11:07:46

Wrapping up their series on "Seperating logic from presentation", DevShed has posted this final article capping off the creation of a simple template parser in PHP5.

By returning to the subject of this last installment, I'll use the skeleton of the original "TemplateProcessor" class to develop an improved, production-level template processor, which, as you'll see in a few moments, will be capable of working with multiple template files, in addition to implementing a chunked caching system. In this way, the class will be able to use several templates that have distinct cache expiration times, aside from utilizing most of the template processing features that you learned before.

If you haven't read up on them yet, go back and check out part one and part two of the series to catch up. They'll give you the foundation to build from - not just the code but the concepts as well. This third part demonstrates chunked caching of your templates/pages as well as pulling in more than one template file at a time. Throw that all together with the functionality from before and you have an extensible, simple template parsing class they use in a bit more concrete example.

tagged: tutorial template processor seperate logic presentation tutorial template processor seperate logic presentation

Link:

DevShed:
Working with Multiple Template Files to Separate Logic from Presentation (Part 3)
May 17, 2006 @ 11:07:46

Wrapping up their series on "Seperating logic from presentation", DevShed has posted this final article capping off the creation of a simple template parser in PHP5.

By returning to the subject of this last installment, I'll use the skeleton of the original "TemplateProcessor" class to develop an improved, production-level template processor, which, as you'll see in a few moments, will be capable of working with multiple template files, in addition to implementing a chunked caching system. In this way, the class will be able to use several templates that have distinct cache expiration times, aside from utilizing most of the template processing features that you learned before.

If you haven't read up on them yet, go back and check out part one and part two of the series to catch up. They'll give you the foundation to build from - not just the code but the concepts as well. This third part demonstrates chunked caching of your templates/pages as well as pulling in more than one template file at a time. Throw that all together with the functionality from before and you have an extensible, simple template parsing class they use in a bit more concrete example.

tagged: tutorial template processor seperate logic presentation tutorial template processor seperate logic presentation

Link:

Jonnay's Blog:
REST and URI Names
Apr 27, 2006 @ 11:53:22

On his blog, Jannay briefly shares some of REST and PHP after reading an older post on the SitePoint PHP blog.

I've been reading this blog over at sitepoint about Who Gets Rest by PHP heavy Harry Fuecks. It is a fairly link-heavy top level view of what REST is.

Its nice to see more the PHP guys get into REST, as far as PHP guys go, Harry is pretty Heavy. What harry has to say about URI naming schemes (especially in the comment section) really helped to gel a very important part of REST for me.

He comments that Harry's ideas about seperation of "tools" from the resources they work with is a very appealing idea, and one that would allow much more flexibility in PHP applications.

tagged: rest uri names sitepoint seperate resource tool uri rest uri names sitepoint seperate resource tool uri

Link:

Jonnay's Blog:
REST and URI Names
Apr 27, 2006 @ 11:53:22

On his blog, Jannay briefly shares some of REST and PHP after reading an older post on the SitePoint PHP blog.

I've been reading this blog over at sitepoint about Who Gets Rest by PHP heavy Harry Fuecks. It is a fairly link-heavy top level view of what REST is.

Its nice to see more the PHP guys get into REST, as far as PHP guys go, Harry is pretty Heavy. What harry has to say about URI naming schemes (especially in the comment section) really helped to gel a very important part of REST for me.

He comments that Harry's ideas about seperation of "tools" from the resources they work with is a very appealing idea, and one that would allow much more flexibility in PHP applications.

tagged: rest uri names sitepoint seperate resource tool uri rest uri names sitepoint seperate resource tool uri

Link:


Trending Topics: