2007-04-20 18:06 UTC
From what I understand, one of the aspects of N-Tiered architecture (N >= 3) is that the objects into which data is loaded from the data source are very dumb. They do not contain any business logic.
Dumb container: object that loads from and stores to data source
Smart container: object that contains business logic
Question: is it worth newing up two objects instead of one? If we use a dumb container, we also need a smart container which theoretically accesses all of its persisted data through the dumb container.
A major benefit is that we can create new classes for the dumb container to serve from different data sources. If we have no dumb container, the smart container needs to know how to get all its data in and out of the data source, unless some other object does this. Relying on another object requires that encapsulation of the smart container is violated.