OOP App Architecture: Which layer does a lazy loader sit in?
Posted
by JW
on Stack Overflow
See other posts from Stack Overflow
or by JW
Published on 2010-04-01T20:31:57Z
Indexed on
2010/04/01
20:33 UTC
Read the original article
Hit count: 249
I am planning the implemention an Inheritance Mapper pattern for an application component http://martinfowler.com/eaaCatalog/inheritanceMappers.html
One feature it needs to have is for a domain object to reference a large list of aggreageted items (10,000 other domain objects)
So I need some kind of lazy loading collection to be passed out of the aggregate root domain object to other domain objects.
To keep my (php) model scripts organised i am storing them in two folders:
MyComponent\
controllers\
models\
domain\ <- domain objects, DDD repository, DDD factory
daccess\ <- PoEAA data mappers, SQL queries etc
views\
But now I am racking my brains wondering where my lazy loading collection sits.
Any suggestions / justifications for putting it in one place over another another?
DDD = Domain Driven Design Patterns, Eric Evans - book PoEAA = Patterns of Application Architecture Patterns, Martin Fowler - book
© Stack Overflow or respective owner