Skip to content

grahambrooks/accounting-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

accounting-pattern

Implementation of Martin Fowler's accounting patterns article and Accounting Narrative.

Summary

The accounting pattern is a design pattern used to manage financial transactions and ensure accurate financial reporting. It involves the following key concepts:

  • Transaction: Represents a financial event that affects accounts.
  • Entry: A record within a transaction that specifies the amount and the account affected.
  • Account: Represents a ledger account where entries are recorded.
  • Ledger: A collection of accounts that tracks all financial transactions.

The pattern ensures that all transactions are balanced, meaning the total debits equal the total credits, which is crucial for maintaining accurate financial records.

Pattern

graph TD
    A[Application] -->|1.0| B[Command] -->|1.1| C[Command Handler]
    A -->|2.0| D[Event] -->|2.1| E[Event Handler]
    A -->|3.0| F[Query] -->|3.1| G[Query Handler]
    A -->|4.0| H[View]
Loading
sequenceDiagram
participant Application
participant Command
participant Command Handler
participant Event
participant Event Handler
participant Query
participant Query Handler
participant View

Application->>Command: 1.0
Command->>Command Handler: 1.1
Command Handler->>Event: 2.0
Event->>Event Handler: 2.1
Event Handler->>Query: 3.0
Query->>Query Handler: 3.1
Query Handler->>View: 4.0
    
Loading

About

Implementation of Martin Fowler's http://martinfowler.com/apsupp/accounting.pdf accounting patterns article

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages