Skip to content

Latest commit

 

History

History
109 lines (68 loc) · 3 KB

README.pod

File metadata and controls

109 lines (68 loc) · 3 KB

NAME

t/ - worked examples for Tangram, some based on real world applications

CONTENTS

t/springfield/

Originally the only test suite for Tangram, this test suite balooned with extra relationship types and features until it became quite unmanagable!

t/rt/

an example schema modeled after Request Tracker, a popular e-mail helpdesk application. See t/rt/RT.pod for documentation.

t/musicstore/

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".

t/timeseries/

This schema is for problems that relate to time series databases, such as transaction record processing, system performance logs, etc.

t/orange/

This is a "Hello, world" type demo. No tests yet.

t/moose/

Tests related to interoperating between Moose and Tangram.

PURPOSE

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:

the test cases should be real

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.

musicstore is an exception to this, as it is a widely popularised example. springfield will 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.

orange is a real world example, and I challenge anyone who claims otherwise.

the test scripts should be good reading

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.

REFERENCES

APP2ed

_Advanced Programming Perl, 2nd Edition_, Simon Cozens.

AUTHOR

Sam Vilain, samv@cpan.org