Requirements
Create a library for reading and writing tree-like data structures in the simplest way possible. The library should be able to read data in one format and write it back out in a different format.
Permitted PHP versions:
PHP >= 5.2 with any extensions we deem required. We may opt to include some 3rd-party code if we see fit.
Supported formats:
- XML
- YAML
- Basic PHP Array
- Load an existing configuration/data store in any of the aforementioned formats
- Create a new configuration/data store in any of the aforementioned formats
- Read a value with a known key from the data store
- Allow nesting of keys (i.e. a hierarchical structure like XML)
- Set or change a value
- Delete a value
- Commit/save changes to a loaded data store.
- TDD does NOT permit you to implement a feature without first writing a test to declare what you're aiming to acheive
- Test methods should be short and concise
- You CAN and SHOULD discuss a planned API before going ahead and using it. Talking about the API is NOT the same as implementing it. We have to communicate with each other otherwise we'll have have different ideas about how it will work. This is particularly important because we're not all sitting with each other
http://www.sourceforge.net/projects/simpletest
How to participate
Introduce yourself and express your interest, along with telling us how much you already know about TDD. Anybody is welcome to participate; just let us know who's working with us since we'll effectively be working in a team-oriented situation.
If you are posting code, first tell us what you're very roughly thinking at an interface level (NOT what you plan to implement). Then get some feedback since we may think it can be improved, or we may like what is planned. If we agree to head that direction, your code should be posted here showing the test first, then the code you wrote second.
Example of how NOT to post what you are thinking:
Code: Select all
$value = $store->get($wantedKey);
// .. snip ...
//Look up a value
foreach ($dataValues as $key => $value) {
if ($wantedKey == $key) {
return $value;
}
}I'll finish my lunch and then get the ball rolling by asking people to suggest in interface for creating a new data store then setting a value in it