Understanding the self-containment design pattern