A guide to these two core concepts without the need to understand dependency injection or WorkItems. Explains what a composite application is and why we might want one, and shows a naive application that uses the CAB to run three separate projects simultaneously without them referencing each other. Also explains some of the mysteries of how CAB applications behave at start-up.
A quick initial look at WorkItems, explaining their importance both as containers of code and as a hierarchy that allows us to control the scope of the code.
A discussion of dependency injection and why it’s useful in general, without reference to the Composite Application Block. A code example is given. The relationship to the strategy pattern is examined, as well as the various different types of dependency injection.
A discussion of the concepts of inversion of control and dependency inversion, and how they relate to dependency injection. Again these concepts are discussed without direct reference to the Composite Application Block.
This article finally revisits the Composite Application Block, showing how we can use dependency injection to get hold of WorkItems in projects that are not conventionally referenced, and hence access the objects in their containers. It discusses the various ways of doing dependency injection in the CAB using the attributes ComponentDependency, ServiceDependency and CreateNew, and gives an example illustrating this. It further discusses the ObjectBuilder briefly, and explains how dependency injection works in the WorkItems hierarchy.
A brief article on how to use constructor injection with the CAB, and why we might not want to.
Discusses what services are in general, what they are in the Composite Application Block, and how the Services collection differs from the Items collection. Gives a basic example, and an example of splitting interface from implementation in a service.
Dives into services in much more detail, including an in-depth examination of the various ways of creating and retrieving services.
Another article looking at some theory without direct reference to the Composite Application Block: explains the command pattern, how it relates to .NET, and why its a good thing if you’re writing menus.
Shows how to use Commands in the Composite Application Block to hook up clicks on menus to their handlers. Explains why we might want to do it this way rather than with the more usual .NET approach using events. Looks at how to handle Status with Commands, the parameters passed to a CommandHandler, and discusses writing your own CommandAdapters to handle other invokers than menus. Gives a CommandAdapter example.
Recaps the usual events in .NET and explains why we might want something simpler. Gives a basic example of the Composite Application Block’s alternative approach.
Goes into detail of what we can do with the Composite Application Block’s events: examines the handling of scope, how the EventTopics collection works, use of the ThreadOption enumeration to ensure that our event executes on the GUI thread, more flexible event handling with AddSubscription and RemoveSubscription, hooking up .NET events to CAB events with AddPublication, and how to disable CAB events.
Explains what UIExtensionSites are at a high level, and gives a basic example that shows how to use them to construct ToolStrips in a Composite Application that have different buttons contributed by different modules.
Gives more detail on how we can use UIExtensionSites, but is sceptical as to their value. Examines why this is. Discusses the Adapter Design Pattern and how we can use it to generate UIExtensionSites for user interface elements other than the standard ToolStrips, MenuStrips and StatusStrips.
Explains what SmartParts and Workspaces are at a high level. Discusses the two SmartParts collections and why this can be confusing. Looks at the usage of the SmartPart attribute.
Takes a closer look at Workspaces. In particular this article examines the IWorkspace interface, and explains the SmartPartInfo class.
Looks at the various types of Workspace provided with the Composite Application Block (DeckWorkspace, ZoneWorkspace, TabWorkspace, MdiWorkspace, WindowWorkspace). Provides code examples of how to use all of these.
Discusses what ‘software factories’ are, and gives an overview of Microsoft’s ‘Smart Client Software Factory’. Looks at the basic project structure generated when you generate a Smart Client solution using the factory.
Explains what business modules are and how we are meant to use them. Looks at how interface components for CAB modules should be used in an SCSF Smart Client Solution.
Discusses the Load method of a business module, and how we should use WorkItems and ControlledWorkItems.
Explains what foundational modules are (as opposed to business modules), and looks at how constants are used to handle names in Smart Client Software Factory solutions.
A background article giving an explanation of the model-view-controller pattern. An understanding of this pattern and the problems it is trying to solve helps to understand the Model-View-Presenter pattern which the SCSF can generate for us: this will be discussed in part 23.
Examines some of the shortcomings of Model-View-Controller and looks at one version of a more modern alternative, Model-View-Presenter.
Looks at the Model-View-Presenter pattern in more detail, including showing some variations and discussing advantages and disadvantages of the pattern.
Explains how to use the SCSF to generate appropriate classes for the Model-View-Presenter pattern. Discusses some issues around this.