Question

On this page I read the following:

A unit of work is a design pattern described by Martin Fowler

Did Martin Fowler discover this pattern before the Hibernate developers and is he the only source of describing this pattern?

Was it helpful?

Solution

Did Martin Fowler discovered this pattern before hibernate boys and is Martin the only source of describing this pattern?

The concept of Unit Of Work is a central concept of ORMs and has been described by Scott Ambler in his outstanding research on ORM (which dates back to 1998), notably the famous ORM sister papers (now split in several documents):

And to my knowledge, most modern ORMs are based on Scott Ambler's papers and share concepts:

  • TopLink has a unit of work, the UnitOfWork 1.
  • JDO has a unit of work, the PersistenceManager.
  • Hibernate has a unit of work, the Session.
  • JPA has a unit of work, the EntityManager.

So while this concept has emerged as a pattern which has been described by Fowler, Ambler's work clearly predates PoEAA.

1 Actually, TopLink has been created in the early 90's and thus predates Ambler's work, I just don't know when they introduced their unit of work implementation and if Ambler somehow influenced that or if this is resulting from the convergence of similar ideas.

OTHER TIPS

Patterns are not "invented", they are observed and described. Martin Fowler is credited only with observing and describing the pattern.

You don't "invent" patterns. You discover them by looking at things until you see repeating features. You document the repeating features you observe. Clearly, some implementations have to come first. Then someone documents them. Then other people read and reference the documentation.

everyone that has previously used it now refers to Martin?

I doubt it. "everyone" would be a LOT of previous users. Some of whom may (a) not reference Martin and (b) be very hard to locate on Google because the software is so old.

As the quote says, it is a design patter that was described by Martin Fowler, there is nothing there claiming that he invented it. He might have though.

Patterns aren't invented; they emerge as proven solutions to common problems and are discovered and described, not unlike how biological species are discovered and then described and named. Sure, somewhere along the line, somebody implemented a primitive unit of work solution for the first time, but it wasn't until others had done the same and started sharing it that it could be described as a pattern (1 of anything is never a pattern).

Martin Fowler has been prodigious in describing and naming emerging patterns, Unit of Work among them.

One of his published sources describing UoW is Patterns of Enterprise Architecture, published in 2002 (undoubtedly after the pattern itself had been around for a long time).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top