Table of Contents: Introduction to CAB/SCSF
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.
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 is given. The relationship to the strategy pattern is examined, as well as the 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 dependency inversion, and how they relate to dependency injection. Again these concepts are discussed without direct reference to the Composite Application 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 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.
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 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.
Part 8 Creating and Using Services in the Composite Application Block
Dives into services in much more detail, including an in-depth examination of the various ways of creating and retrieving services.
Part 9 The Command Design Pattern
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.
Part 10 Commands in the Composite Application Block
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.
Part 11 Introduction to Events in the Composite Application Block
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.
Part 12 Events in the Composite Application Block
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.
Part 13 Introduction to UIExtensionSites
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.
Part 14 More On UIExtensionSites
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.
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 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.
Part 18 Introduction to the Smart Client Software Factory
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.
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 an SCSF 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 business modules), and looks at how constants are used to handle names in Smart Client Software Factory solutions.
Part 22 Model-View-Controller Explained
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.
Part 23 Model-View-Presenter: Why We Need It and the Basic Pattern
Examines some of the shortcomings of Model-View-Controller and looks at 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, including showing some variations and discussing advantages and disadvantages of the pattern.
Part 25 Model-View-Presenter Using The Smart Client Software Factory
Explains how to use the SCSF to generate appropriate classes for the Model-View-Presenter pattern. Discusses some issues around this.

[...] articles that explain the foundations in an easy to follow fashion is a great thing. I can across these articles while browsing the Smart Client website. They’re well written and a good place for those [...]
Pingback by MacRaeNet 3.2 » Learning CAB — November 19, 2007 @ 5:35 am
Rich, Thank you so much for your work on explaing CAB/SCSF! It is the best reference I have found and should help me considerably. Kudos!
Comment by Dwight — November 20, 2007 @ 6:24 am
Hi Rich,
Are CAB and SCSF one and the same?
Thank You,
Vish
Comment by viswaug — November 28, 2007 @ 4:14 pm
Nice series Rich - so much more valuable than P&P’s quickstarts or hands-on-labs. Two weeks into those documents and I still had no idea what I was doing with CAB. Well done.
Comment by Darryn — November 30, 2007 @ 11:43 pm
Hi Rich,
Thank you~
When is the next article? we are waiting for you…..
Comment by Nan — December 4, 2007 @ 3:14 am
Hi Rich,
Great articles and much appreciated. I echo previous posts about the lack of documentation for the SCSF. I am not sure how to pass data from one View to another, e.g. A Grid has a list of Customers, one is selected and another View is displayed showing the Details of the Customer selected.
What is the best way to pass the Customer selected to the other View so that it can query a DB and populate the controls accordingly?
Regards,
Alex.
Comment by Alex — December 4, 2007 @ 1:05 pm
@viswaug: They are not the same. SCSF uses CAB but CAB can also be used without using SCSF.
@Rich: Excellent articles. Thanks a lot!
Comment by Kerry — December 6, 2007 @ 8:07 pm
Viswaug, Alex, Kerry
I’ve now posted parts 18 and 19 which start to address what the SCSF is and how it relates to the CAB. More will follow.
Rich
Comment by richnewman — December 9, 2007 @ 7:38 pm
Finally, here comes part18 and 19 for SCSF! Thank you very much! Rich!
Comment by Nan — December 10, 2007 @ 3:03 am
We are currently working on very large CAB project and are having problems deploying it on a 64-bit environment. Is there any guidance on deploying CAB on a 64 bit environment? Are there any known issues / fixes required to deploy CAB to a 64 bit environment?
Thanks in advance
Comment by Nitin Gandhi — December 13, 2007 @ 2:45 am
Superb article series. Searched a lot for CAB resources but found none, then hit upon your site and found it all here
… Kudos
Comment by Prashant Jain — December 31, 2007 @ 8:20 am
Great, superb, excellent articles !!!
Much better than the product documentation as the other colleagues says (A SCSF Book is comming ? :))
I’m preparing a brief presentation for my coworkers based on your articles, I’ll mention the source of my knowledgment of course :).
A request: Could you treat the Foundational Modules more deeper ?
We have a windows forms framework that provides services as exception handling, logging, translation, security, etc., and we like to integrate that code as Foundational Modules into SCSF. Any advice ?
Thanks again and sorry, my english is terrific.
Victor.
Comment by Victor — January 5, 2008 @ 3:58 pm
Hi Rich,
Superb articles!!!
I am new to CAB and SCSF. Your articles explain the concepts very well especially the basics. It would be great if you could provide a single document that has all the contents of your articles. Also a web page which lists all the sample code downloads.
Hari
Comment by Srihari S — January 18, 2008 @ 4:53 am
Hi Rich,
thanks for an extremely well researched and written collection of articles… I’m impressed with your dedication to understand and learn complex subject matters and share them with your fellow developers in a very easy to understand way
I really hope you plan to continue sharing your knowledge of CAB (and other subject matters). If I could make some wishes for future articles on CAB, I would love for you to write some articles covering:
- Loading of CAB modules on-demand, based on user roles
- How to best use ActionCatalogs together with a custom Authorization Service
- How WorkItem State works and recommendations on how to use it
- How to implement your own Authentication Service in CAB
- + as much other topics you have time and energy to finish
Bjørn Storø
Comment by Bjorn Storo — January 31, 2008 @ 10:51 am
Your articles are great and fill a vast void in how to use CAB/SCSF. I’m a beginner in this area and really apprecite your work. I would love to see all of the articles in a single file (pdf or doc) available for download somehow. I would like to be able to add my own annotations like VB code examples.
Thanks…
Comment by Ron Clarke — February 2, 2008 @ 1:39 am
I just wanted to drop a quick thank you for your series of articles. I just picked up a new job which relies heavily on CAB/SCSF etc, and this is a very quick jump start into the whole process/procedure.
Thank you very much Rich,
Eric
Comment by Eric — February 6, 2008 @ 5:18 pm
[...] understanding of its mechanisms. Therefore, I would propose to read the introduction of Rich Newman - it is the best I ever read. To me, it was most important to get a comprehension [...]
Pingback by How to start developing with the Composite UI Application Block — February 12, 2008 @ 1:16 pm
[...] Excelente serie de artículos sobre CAB/SCSF Posted: Wednesday, February 13, 2008 7:28 AM by jcisneros Filed under: CAB [...]
Pingback by Jonathan Cisneros : Yet Another Post about Composite UI Application Block — February 13, 2008 @ 4:17 pm
First I want to say thank you for posting these articles. They are so much more informative than what MS offers. I have a question on a project I am working on. I have a datagrid that needs to do several different things(different data). Would it be wise to set the datagrid up as a user control/view and have the a class that needs it call it when needed or should I have separate datagrids for each job and hide and view as needed. My problem is the user wants to see one screen but have the ability to do several things within the one work environment. I hope I am not being to vague and I hope you can make sense of what I am trying to ask. This is my first smart client project. Thanks in advance.
Comment by Ray — March 25, 2008 @ 5:18 pm
[...] Introduction to SCSF [...]
Pingback by WCSF links « Billy club Weblog — March 31, 2008 @ 5:03 pm
[...] there are smart people like Rich Newman out there. Rich has made a series of small introduction articles to CAB and SCSF. There are 25 such articles so far, and they have a very nice progression. They are well written [...]
Pingback by CAB: Introduction to CAB and SCSF « delegate () { solve(everything); } — May 23, 2008 @ 11:35 am
Great stuff, the best explanation to CAB i ve found on the web so far and I did quite a lot of search. I just started a small german CAB / SCSF blog to give back a little bit of what the community gave me (http://cab-scsf.blog.de/).
Btw. I would love to see an article about writing and registering custom builder strategies. Thanks
Comment by Florian — May 27, 2008 @ 10:37 pm
Great guide. Very complete and by far the best guide to CAB/SCSF out there.
Comment by Tobias — May 28, 2008 @ 8:21 am
amazing work, All the 24 articles are just Rocking, Easy to understand, and friendly examples….
Comment by Tarun Kumar — May 29, 2008 @ 6:59 am
really excellent articles!
I am looking forward to your next article.
thank you very much!
Comment by Philip Li — June 3, 2008 @ 7:41 am
[...] Introduction to CAB/SCSF [...]
Pingback by Anasoft.net Blog » Blog Archive » Composite application block - CAB — June 4, 2008 @ 5:23 am
Hi Rich,
All your articles are really RICH. I started to read your articles with zero idea on CAB/SCSF. Now, I am confident that I can do something.
In my company, we are developing one project with this CAB/SCSF technology. I am some what comfortable now.
But I could not get where the remaining articles are. Articles till Part 25 are in this page. Where can i get Part 26 article?
Can you please provide me the url?
Thanks in advance,
Ashok kumar.
Comment by Ashok kumar — June 4, 2008 @ 6:02 am
[...] 13, 2008 http://richnewman.wordpress.com/intro-to-cab-toc/ Posted by Hiren patel Filed in Uncategorized ·Tags: SCSF [...]
Pingback by All About Smart Client Technology « Hiren’s Weblog — June 13, 2008 @ 11:44 am
[...] Serie de Introducción a CAB/SCSF de Richnewman [...]
Pingback by Jonathan Cisneros » Smart Client Software Factory — June 13, 2008 @ 10:22 pm
[...] Excelente serie de artículos sobre CAB/SCSF [...]
Pingback by Composite UI Application Block by Jonathan Cisneros — June 19, 2008 @ 9:30 pm
[...] des CAB in Verbindung mit der Smart Client Software Factory werden. Hierfür bieten Rich Newman (Intro to cab) oder Martin Szpuszta (Designing Smart Clients Based on CAB and SCSF) ausreichend Material. [...]
Pingback by Exceptionfault » Blog Archiv » CAB, SCSF, GAT, GAX…? — June 26, 2008 @ 9:28 am
Thanks Rich.
These are amazing tutorials for CAB & SCSF.
Comment by Farshid — July 3, 2008 @ 7:47 pm