 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
David Otton's Blog: php//memory, Unit Tests
by Chris Cornutt 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).
voice your opinion now!
memory stream test fputcsv unittest assert
Solar Blog: Solar CLI - Make-Vendor
by Chris Cornutt 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.
voice your opinion now!
solar framework tutorial makevendor command cli
Solar Blog: Solar CLI - Getting Started
by Chris Cornutt 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.
voice your opinion now!
solar framework tutorial cli commandline series
Solar Blog: Adapter for Master/Slave MySQL Setups
by Chris Cornutt 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).
voice your opinion now!
solar framework master slave adapter automatic
|
Community Events
Don't see your event here? Let us know!
|