Table of Contents: Introduction to CAB/SCSF ? Rich Newman

来源:百度文库 编辑:神马文学网 时间:2024/06/03 04:31:33

Rich Newman

Table of Contents: Introduction to CAB/SCSF

Part 1 Modules and Shells

A guide to these two core concepts without the need tounderstand dependency injection or WorkItems. Explains what a compositeapplication is and why we might want one, and shows a naive applicationthat uses the CAB to run three separate projects simultaneously withoutthem referencing each other. Also explains some of the mysteries of howCAB applications behave at start-up.

Part 2 WorkItems

A quick initial look at WorkItems, explaining their importance bothas containers of code and as a hierarchy that allows us to control thescope of the code.

Part 3 Introduction to Dependency Injection

A discussion of dependency injection and why it’s useful in general,without reference to the Composite Application Block. A code example isgiven. The relationship to the strategy pattern is examined, as well asthe various different types of dependency injection.

Part 4 An Aside on Inversion of Control, Dependency Inversion and Dependency Injection

A discussion of the concepts of inversion of control and dependencyinversion, and how they relate to dependency injection. Again theseconcepts are discussed without direct reference to the CompositeApplication Block.

Part 5 Dependency Injection and the Composite Application Block

This article finally revisits the Composite Application Block,showing how we can use dependency injection to get hold of WorkItems inprojects that are not conventionally referenced, and hence access theobjects in their containers. It discusses the various ways of doingdependency injection in the CAB using the attributesComponentDependency, ServiceDependency and CreateNew, and gives anexample illustrating this. It further discusses the ObjectBuilderbriefly, and explains how dependency injection works in the WorkItemshierarchy.

Part 6 Constructor Injection in the Composite Application Block

A brief article on how to use constructor injection with the CAB, and why we might not want to.

Part 7 Introduction to Services in the Composite Application Block

Discusses what services are in general, what they are in theComposite Application Block, and how the Services collection differsfrom the Items collection. Gives a basic example, and an example ofsplitting interface from implementation in a service.

Part 8 Creating and Using Services in the Composite Application Block

Dives into services in much more detail, including an in-depthexamination of the various ways of creating and retrieving services.

Part 9 The Command Design Pattern

Another article looking at some theory without direct reference tothe Composite Application Block: explains the command pattern, how itrelates to .NET, and why its a good thing if you’re writing menus.

Part 10 Commands in the Composite Application Block

Shows how to use Commands in the Composite Application Block to hookup clicks on menus to their handlers. Explains why we might want to doit this way rather than with the more usual .NET approach using events.Looks at how to handle Status with Commands, the parameters passed to aCommandHandler, and discusses writing your own CommandAdapters tohandle other invokers than menus. Gives a CommandAdapter example.

Part 11 Introduction to Events in the Composite Application Block

Recaps the usual events in .NET and explains why we might wantsomething simpler. Gives a basic example of the Composite ApplicationBlock’s alternative approach.

Part 12 Events in the Composite Application Block

Goes into detail of what we can do with the Composite ApplicationBlock’s events: examines the handling of scope, how the EventTopicscollection works, use of the ThreadOption enumeration to ensure thatour event executes on the GUI thread, more flexible event handling withAddSubscription and RemoveSubscription, hooking up .NET events to CABevents with AddPublication, and how to disable CAB events.

Part 13 Introduction to UIExtensionSites

Explains what UIExtensionSites are at a high level, and gives abasic example that shows how to use them to construct ToolStrips in aComposite Application that have different buttons contributed bydifferent modules.

Part 14 More On UIExtensionSites

Gives more detail on how we can use UIExtensionSites, but issceptical as to their value. Examines why this is. Discusses theAdapter Design Pattern and how we can use it to generateUIExtensionSites for user interface elements other than the standardToolStrips, MenuStrips and StatusStrips.

Part 15 Introduction to SmartParts and Workspaces

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.

Part 16 More Detail on Workspaces and SmartParts

Takes a closer look at Workspaces. In particular this articleexamines the IWorkspace interface, and explains the SmartPartInfo class.

Part 17 Workspace Types

Looks at the various types of Workspace provided with the CompositeApplication Block (DeckWorkspace, ZoneWorkspace, TabWorkspace,MdiWorkspace, WindowWorkspace). Provides code examples of how to useall of these.

Part 18 Introduction to the Smart Client Software Factory

Discusses what ’software factories’ are, and gives an overview ofMicrosoft’s ‘Smart Client Software Factory’. Looks at the basic projectstructure generated when you generate a Smart Client solution using thefactory.

Part 19 Business Modules and Interfaces in the SCSF Smart Client Solution

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 anSCSF Smart Client Solution.

Part 20 SCSF Business Modules: Start Up and the ControlledWorkItem

Discusses the Load method of a business module, and how we should use WorkItems and ControlledWorkItems.

Part 21 Foundational Modules and Names as Constants

Explains what foundational modules are (as opposed to businessmodules), and looks at how constants are used to handle names in SmartClient Software Factory solutions.

Part 22 Model-View-Controller Explained

A background article giving an explanation of themodel-view-controller pattern. An understanding of this pattern and theproblems it is trying to solve helps to understand theModel-View-Presenter pattern which the SCSF can generate for us: thiswill be discussed in part 23.

Part 23 Model-View-Presenter: Why We Need It and the Basic Pattern

Examines some of the shortcomings of Model-View-Controller and looksat one version of a more modern alternative, Model-View-Presenter.

Part 24 Model-View-Presenter: Variations On The Basic Pattern

Looks at the Model-View-Presenter pattern in more detail, includingshowing some variations and discussing advantages and disadvantages ofthe pattern.

Part 25 Model-View-Presenter Using The Smart Client Software Factory

Explains how to use the SCSF to generate appropriate classes for theModel-View-Presenter pattern. Discusses some issues around this.