Skip to Content.
Sympa Menu

patterns-discussion - Re: [patterns-discussion] Data Access pattern

patterns-discussion AT lists.cs.illinois.edu

Subject: General talk about software patterns

List archive

Re: [patterns-discussion] Data Access pattern


Chronological Thread 
  • From: Ralph Johnson <johnson AT cs.uiuc.edu>
  • To: Jevon Wright <j.m.wright AT massey.ac.nz>
  • Cc: patterns-discussion AT cs.uiuc.edu
  • Subject: Re: [patterns-discussion] Data Access pattern
  • Date: Mon, 22 Nov 2010 23:34:51 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/patterns-discussion>
  • List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>

The Iterator pattern in Design Patterns is similar, except that the Data Structure also supported the Data Source interface.  Can't you just say that this is the Iterator pattern, except that you have a separate factory for the iterator?   

-Ralph Johnson

On Mon, Nov 22, 2010 at 8:53 PM, Jevon Wright <j.m.wright AT massey.ac.nz> wrote:
Hi all,

In our work we have noticed a fairly common data access pattern when
dealing with iterators (in Java, Iterator<T>) and iterator factories
(Iterable<T>), with respect to a given structure (T). This pattern is
illustrated in the attached image. Essentially it separates the
physical source of the data (such as a database, or memory) when it is
accessed iteratively.

The Iterator must also be closable, so that it can clean up
references, close database connections etc. Jena has a similar
interface ClosableIterator.

As far as we can tell, this has not been explicitly published
somewhere. Is anyone aware of a similar design pattern for data access
using iterators?

Cheers
Jevon

_______________________________________________
patterns-discussion mailing list
patterns-discussion AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion





Archive powered by MHonArc 2.6.16.

Top of Page