Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Started restructuring. See the README file for the details #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@

This repository illustrates the usage of Agile Data.
This repository is a comprehensive demonstration and test-suite for Agile Data and some related components. There are several real-life examples modeled with a provided database schemas. You can set up each example individually, go through examples and the test-suites.

## Installation

1. Clone this repository
2. Import docs/primer.sql into a new MySQL database
3. cp config-example.php config.php
4. Use your editor to edit config.php, specify the new database that you have created.
2. `composer install`
3. Set up empty MySQL database
4. `cp config-example.php config.php` and edit as necessary


Next pick one of the examples described below.

## About Examples

Each example is located in it's own namespace and has it's own database schema file. This way you can clear your database from previous tables when you start working with a new example.

## Usage
Most examples will include Console:

```
php console.php
```

Other examples can also include some UI demos. Typically you can find them in file `index.php`.

http://localhost/data-primer/1-ui-table

Some examples may require additional extensions to be installed.

## Contributing Examples

Are you using Agile Data inside your project? Contribute your model implementation as an example here.

## List of examples

| Name | Keywords | Description | Level |
| ---------- | ---------------------------------------- | ---------------------------------------- | ----- |
| freelancer | client, conditions, traversing, expressions | Client list with projects and invoices. If you are a software consultant you are likely using a similar data structure to keep track of your projects. | 2 |
| acct | accounting, document types, joins, invoice, payment, reports, contact, disjoint sub-types | Implementation of "document type" system. Main model "Document" is augmented into Invoice, Payment, etc. Use of joins and inheritance makes system extensible. There are also various Report models to illustrate data aggregation. | 3 |
| twitter | | Simple model structure if you are implementing twitter clone | 1 |
| leding | | Simple model structure for system to account for money lent from one person to another. | 1 |
| p2p | methods, transactions | Peer-to-peer crowd lending. Single loan can be funded by multiple lenders. If fully funded, it can be converted into a repayment schedule. | 3 |

## Tests

Examples may contain PHPUnit and Behat BDD tests. Each one must execute with the initial database structure, but will not actually modify the database contents.