tags:

views:

19

answers:

1

I'd like to make a searchable Document Management System and allow a user of this application to group documents together.

On one hand, there would be a functionality that registers/fingerprints in a global linear fashion and, on the other, there would be a functionality that associates documents into distinct groups.

How could I compromise between the two in terms of object design? Or how could I make the system more flexible overall?

+1  A: 

It sounds like what you might be looking for is the composite pattern, wherein you could treat groups of items uniformly (while still being able to make the distinction that certain objects are grouped in composition) :

http://en.wikipedia.org/wiki/Composite_pattern

byte
Thanks. I hadn't thought of the Composite pattern in that way but it makes sense. I'll see what's possible.
James P.