Accounting Patterns - Martin Fowler

21 downloads 265 Views 1MB Size Report
#EEQWPVKPI 2CVVGTPU. 2GTJCRU KV•U LWUV VJG YC[ O[ ECTGGT JCU YQTMGF QWV DWV CEEQWPVKPI U[UVGOU QH QPG. MKPF QT CPQVJGT ...


                                                                             !"#  $ #  $                %    &'      

 

      ( 

     )          

          



       *      

         *          

    

       #           

          

Accounting Entries

Events

System

 

  

      

     

 (       #   

             (   

         +,               (   %     

      '   %        &    +,                    '   (       

  +,              

    

   

       

                   (     

 

      (

               

     

                               $    

& -         

        .                       /  0,1

reads

Processor

Event

creates Accounting Entry

process(Event)



 



*              (       -    #             (             

         &  &  & &

 &        . 

                     

 &                    (       

           

     /   021                    .    

Event process() findAgreement(Event)



Agreement

creates Accounting Entry

find

process(Event)

 

&       (                            (           &              3           4                                         &        %              #             

      5         .                        (                           (                         



Posting Rule

creates

Event Type

Accounting Entry



1

process(Event)

1





1

Event process() findAgreement(Event)



Agreement find

getRule(EventType)

     

&                                   .                        &                              6 3      

              

                  (     '    

78               '  9 6            :               .          #           

               

#    *                  

     .        



    (   

       

Posting Rule creates effectivity: Date Range

Event Type



1 1





1

Event process() findAgreement(Event)

 

Accounting Entry

process(Event)

Agreement find

getRule(EventType, Date)

    

  

    

                                %  .        6                         !" # $   " 

% &&                   

(                    

  *   

     %           4 

              



   

                    &       

             %   

                &  

 %       

       (             

(             

   4       !         

       ;'           

    '    

  

                        

         

  (          4   &           

     (            (              

     (          

                   

   

     (         

              **   %