News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

David Otton's Blog:
php//memory, Unit Tests
November 18, 2008 @ 15:42:01

In looking to test his fputscsv functionality, David Otton found a simple way to measure its performance by using streams.

Then I realised I could use PHP's (fairly) new IO streams to dump the function's output to a temporary buffer, and read it back in for comparison. Not perfect, but it removes concerns about file mutexes, permissions, unique filenames, etc. and speeds up the tests, as they never touch disc.

He uses a custom stream and points it to php://memory to store and read the data from. Code is included in the post as well as example usage. It runs an assert that the value pushed into another memory chunk is the same as the first one (ensuring that the results of his fputcsv calls are valid).

0 comments voice your opinion now!
memory stream test fputcsv unittest assert



Sebastian Bergmann's Blog:
Test Dependencies in PHPUnit 3.4
November 14, 2008 @ 10:25:20

Sebastian Bergmann talks about a new bit of functionality he's put into the 3.4 release of PHPUnit (the popular unit testing tool for PHP) based on a suggestion from a paper he'd read:

Back in July, I came across an academic paper (more academic papers on testing that I read recently) titled "JExample: Exploiting Dependencies Between Tests to Improve Defect Localization". [...] For the upcoming PHPUnit 3.4 I have implemented support for the idea expressed in the paper mentioned above.

The feature is a system that helps localize problems at the source, stripping away all of the cascading issues it might have tripped off, causing other tests to fail. This new feature (as illustrated by his code example using a DependencyFailureTest class) makes it simple to fail a test immediately whenever the scripts needs to via a fail() method. Check out the full post for the rest of the code and some further explanation on how it works.

0 comments voice your opinion now!
phpunit test dependencies fail cascade source defect localization


Solar Blog:
Solar CLI - Make-Vendor
November 11, 2008 @ 13:03:58

New on the Solar blog is this post, a new part of their series looking at the Solar framework on the command line, focusing this time on the make-vendor command.

This entry is a continuation of the Solar CLI series--a series that aims to detail Solar CLI commands, available options, parameters, and usage examples. In this entry we take a look at make-vendor, a command to generate a new project, otherwise known as a "vendor space."

Their example shows how to make a new vendor for your application and all of the directories and files that are built out with it according to the standard Solar application layout. You can read more about this layout on the skeleton system page of the Solar manual.

0 comments voice your opinion now!
solar framework tutorial makevendor command cli


Pierre-Alain Joye's Blog:
PHP 5.2.7RC3 Released (Go test!)
November 10, 2008 @ 11:13:18

Pierre-Alain Joye has pointed out that the latest release candidate of the PHP 5.2.x series (5.2.7RC3) has been posted for download.

PHP 5.2.7RC3 has been released. It is likely to be the last RC and the final release is planed for Thursday next week. Please test it and report any issue you may found. The sources can be fetched here and the binaries in the windows site.

He also mentions a milestone for the PHP project - releasing the Windows builds at the same time as the normal source builds. Check out on the php.internals list for more information.

0 comments voice your opinion now!
php5 release candidate test windows build binary


Solar Blog:
Solar CLI - Getting Started
November 06, 2008 @ 07:51:22

A new post to the Solar blog takes a look at a set of included tools the framework offers for working with command-line applications.

One of the nice things Solar has to offer is its CLI (Command Line Interface), which can be used to accomplish tasks that would otherwise eat up valuable time, such as creating a new project, applications, models, tests, and documentation. In this entry, and others that will follow, I will be showing you how to use the current (Solar v1.0.0 alpha2) CLI, detailing commands, available options, parameters, and usage examples.

This entry is the first in a series on the subject and gives just the basics of the cli component - where to find it, how get help with its functionality (a "help" command) and some resources to get more information.

0 comments voice your opinion now!
solar framework tutorial cli commandline series


Richard Thomas' Blog:
Solar Articles around the Web
October 23, 2008 @ 09:33:10

Richard Thomas has put together a quick listing of resources, tips and articles for the Solar PHP framework.

Here is a quick reference list to a ton of Solar Framework Articles around the web.

He's broken it up into Tutorials (including a few from our own blog), Tips and other random content.

0 comments voice your opinion now!
solar framework article tutorial benchmark


Richard Thomas' Blog:
Using jQuery with Solar
October 17, 2008 @ 09:31:10

In a quick new entry to his blog, Richard Thomas shows how to integrate the popular jQuery javascript library into your Solar application.

Going to go through a quick walk through of how to use a hacked together version of my old jquery library with solar. You can find the class source files here.

He sets up a callback in the Base controller (that all other controllers extend) for the jQuery calls so that any of the "child" controllers can just call "/controller/jquery" to make jQuery requests.

0 comments voice your opinion now!
solar framework jquery javascript tutorial base controller


Richard Thomas:
Solar Gets Firephp Support & a Base Controller Tip
October 15, 2008 @ 07:56:14

Richard Thomas has two new Solar framework posts added to his PHPJack blog - one talking about the new Firephp support integrated into the framework (similar to other frameworks) and a tip he's come across so far in using the framework.

In talking about the Firephp support:

There has been a flurry of work around Firebug recently including announcements that Zend Framework and Symfony both now have Firebug logging support through the use of the Firephp. As of this weekend Solar can be added to the list with its own support.

A quick example is included.

In the second post he looks at a simpler way to share information between all of your controllers without code duplication - adding it to the constructor of the Base controller your application is built on.

0 comments voice your opinion now!
base controller solar framework firephp support tutorial


Solar Blog:
Adapter for Master/Slave MySQL Setups
October 03, 2008 @ 14:35:05

On the Solar blog Paul Jones has posted about a new database adapter they included in the latest Solar framework release - one that lets you connect to master/slave MySQL setups.

With Solar, you connect to SQL databases using the Solar_Sql factory class, which returns a Solar_Sql_Adapter class for you. Most developers only need to connect to a single MySQL server. [...] However, when you get into a situation where you need to scale up, you might need a replicated MySQL database setup. In such cases, there is one "master" server that handles reads and writes, and there are one or more "slave" servers that are read-only.

The Solar_Sql_Adapter_MysqlReplicated adapter does all of the switching for you, making it as simple as dropping it in and changing your configuration to point to the master and slave servers (examples included).

0 comments voice your opinion now!
solar framework master slave adapter automatic


Solar Blog:
Using registry_set to auto-register objects
September 23, 2008 @ 08:47:36

In this recent post from the Solar blog, anttih shows how to use the Solar registry to automatically load and register objects when it starts up.

Solar_Registry is a class for storing singleton objects which are used usually for things like SQL objects and the response and request objects. Now what's interesting, is that in the new version of Solar a new configuration key registry_set was added for the Solar arch-class. You can use it to tell Solar to automatically add objects to the registry when it starts up.

He compares the two methods - manual loading and the automatic version and includes a "real world" example of loading up an SMTP object.

0 comments voice your opinion now!
solar framework solarphp registry registryset automatic object



Community Events









Don't see your event here?
Let us know!


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

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