t/ - worked examples for Tangram, some based on real world applications
Originally the only test suite for Tangram, this test suite balooned with extra relationship types and features until it became quite unmanagable!
an example schema modeled after Request Tracker, a popular e-mail helpdesk application. See t/rt/RT.pod for documentation.
an example schema modeled after the test database for Class::DBI, the schema for which is available at http://www.class-dbi.com/cgi-bin/wiki/index.cgi?ERD. Sections from this test suite are included in "APP2ed".
This schema is for problems that relate to time series databases, such as transaction record processing, system performance logs, etc.
This is a "Hello, world" type demo. No tests yet.
Tests related to interoperating between Moose and Tangram.
This collection of schemas are for building test suites for Tangram based on a real world applications.
The schemas here do not diverge from the original application schemas after which they are modeled so much that the conversion from the original application could not be completed by a SQL or simple DBI script. For some of the applications, such conversion scripts will be provided.
More complex conversions and optimisations of inefficient application schema, such as combining several Tangram::Scalar
string fields that do not need to be searched into a single Tangram::IDBIF field, should be performed as a seperate project.
As such, some principles will apply to building the test suites that use these schemas:
Nothing is worse than reading a test case and there being seemingly non-sensicle operations and
foo's littered all over the place.
If the test case is not from the application, it should be a good, logical `use case' of the application.
musicstoreis an exception to this, as it is a widely popularised example.
springfieldwill be kept around for as long as it is needed. Once the coverage from the other test suites is complete, it will be marked as end-of-life and phased out.
orangeis a real world example, and I challenge anyone who claims otherwise.
Well coded and presented examples will greatly assist new coders from learning the Tao of Tangram. Always clearly describe what each test script is doing, consider that any of them might be a new user's first examination of the `real' way to use Tangram.
Each set of tests should have accompanying comments that at least outline the tests that are run. This documentation should be primarily inside the test suites, and should also be summarised in the documentation for each schema.
_Advanced Programming Perl, 2nd Edition_, Simon Cozens.
Sam Vilain, email@example.com