views:

77

answers:

5

Hi All,

In this page:
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/transactions.html

I have read that: "A unit of work is a design pattern described by Martin Fowler"

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

Regards

+1  A: 

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.

Otávio Décio
+2  A: 

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

D.Shawley
+1  A: 

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.

S.Lott
A: 

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).

Jay
+6  A: 

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.

Pascal Thivent
Great. Where did you found all this thinks ? :)
darko petreski
@darko Well, I've always been interested by ORM and started to look at tools and theory in the early days of my career. Ambler was already "the authority" on this topic so I studied his work (and still have copies of the original "sister papers" on my machine). I then followed the evolution of the ORM landscape closely and had the opportunity to work with the above mentioned persistence tools/API. So to sum up, this is just accumulated knowledge :)
Pascal Thivent