Skip to main content
edited tags
Link
smp7d
  • 4.2k
  • 1
  • 27
  • 40
Source Link
w0051977
  • 7.1k
  • 8
  • 67
  • 96

Fowlers Data Access Layer patterns

Fowler talks about a number of design patterns available for the data access layer e.g. Table Data Gateway, Row Data Gateway, Active Record and Data Mapper.

In the book it suggests using Data Mapper with Transaction Script and Active Record with Domain Model. This doesn't seem to be logical to me as Transaction Script classes contain business logic and data logic and domain model separates business logic and data logic. Active Record combines business logic and data logic (like Transaction Script rather than domain model) and Data Mapper separates business logic and data logic (like domain model rather than Transaction Script). What am I not understanding here?