Programming Microsoft® Composite UI Application Block and Smart Client Software Factory
by David S. Platt
D. Controllers
To fulfill its function as a container, a WorkItem needs a place to hold its business logic. In the early days of CAB, this was often done by deriving a new class from WorkItem, such as BankTellerWorkItem, and placing the business logic on that class. Experience with the first CAB applications showed that this pattern allowed the WorkItem class to get too complex. Everything that a logical subapplication had to do or to hold was concentrated in just one class. It became the "God object," too large and complex to test or inspect, or even develop properly.
By the time SCSF came out, the design philosophy had shifted to recommend separating the holding functionality from the doing functionality. Since the WorkItem already contained ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access