Rich Newman

Table of Contents: Introduction to CAB/SCSF

Part 1 Modules and Shells

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.

Part 2 WorkItems

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.

Part 17 Workspace Types

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.


  1. […] 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

  2. 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

  3. Hi Rich,

    Are CAB and SCSF one and the same?

    Thank You,

    Comment by viswaug — November 28, 2007 @ 4:14 pm

  4. 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

  5. Hi Rich,
    When is the next article? we are waiting for you….. 🙂 Thank you~

    Comment by Nan — December 4, 2007 @ 3:14 am

  6. 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?



    Comment by Alex — December 4, 2007 @ 1:05 pm

  7. @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

  8. 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.


    Comment by richnewman — December 9, 2007 @ 7:38 pm

  9. Finally, here comes part18 and 19 for SCSF! Thank you very much! Rich!

    Comment by Nan — December 10, 2007 @ 3:03 am

  10. 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

  11. 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

  12. 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.


    Comment by Victor — January 5, 2008 @ 3:58 pm

  13. 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.


    Comment by Srihari S — January 18, 2008 @ 4:53 am

  14. 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

  15. 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.


    Comment by Ron Clarke — February 2, 2008 @ 1:39 am

  16. 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,


    Comment by Eric — February 6, 2008 @ 5:18 pm

  17. […] 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

  18. […] 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

  19. 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

  20. […] Introduction to SCSF […]

    Pingback by WCSF links « Billy club Weblog — March 31, 2008 @ 5:03 pm

  21. […] 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

  22. 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 (
    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

  23. Great guide. Very complete and by far the best guide to CAB/SCSF out there.

    Comment by Tobias — May 28, 2008 @ 8:21 am

  24. 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

  25. 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

  26. […] Introduction to CAB/SCSF […]

    Pingback by Blog » Blog Archive » Composite application block - CAB — June 4, 2008 @ 5:23 am

  27. 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

  28. […] 13, 2008 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

  29. […] Serie de Introducción a CAB/SCSF de Richnewman […]

    Pingback by Jonathan Cisneros » Smart Client Software Factory — June 13, 2008 @ 10:22 pm

  30. […] Excelente serie de artículos sobre CAB/SCSF […]

    Pingback by   Composite UI Application Block by Jonathan Cisneros — June 19, 2008 @ 9:30 pm

  31. […] 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

  32. Thanks Rich.
    These are amazing tutorials for CAB & SCSF.

    Comment by Farshid — July 3, 2008 @ 7:47 pm

  33. Rich,
    These tutorials are great!!!
    I can’t wait for you to publish #26 on how to properly use the MVP.
    Do you know when you will have it completed? or do you know of a source that explains it?

    Comment by Michael — July 8, 2008 @ 11:12 pm

  34. Hello Rich,

    your tutorials and code examples are excellent.
    Best so far. I’m looking forward to #26.

    Thank You!
    Greetings from Bavaria

    Comment by Hannes — July 16, 2008 @ 1:03 pm

  35. Good Work!
    I was already familiar with CAB & a variation of SCSF that was developed internally, but I have to say that your articles have cleared up some important things for me. Especially Workitems, how are they used and the little nuances that you wouldn’t normally know unless you went and read the CAB & SCSF code.

    I find the CAB/SCSF a very “promising” Framework that does provides many of the best practices any developer should use in their applications. However, I still think it is not mature enough to be called a fully functional and easily usable/extensible framework.

    The learning curve is steep (even though you do help quite a bit) and I am not even sure that through out its development the p&p guys were exactly sure of everything they want to do. It’s still the best Framework of it’s kind geared towards to Microsoft’s presentation technology and .NET but it still has a long way to go before it reaches the level of clarity .NET has.

    That being said, I’m still going to use it, although one Guidance recipe that I am desperately in need of is a “Create a Workitem with View/Presenter”. I think that would help in the logical separation of Use Cases instead of having to do it all by hand.

    In any case, looking forward to the rest of the articles, although I think No. 26 will come in September 😉

    Comment by willhunting — July 17, 2008 @ 11:30 am

  36. Hi Rich,

    Impressive articles… would you kindly help me out on below points.

    I have been working on CAB/SCSF for the last 2 months and would like to know about the negative points of CAB SCSF. why one should not use CAB?

    are there any disadvantage using CAB?

    what are the points will be affected while we migrate existing CAB application to another framework?

    – Harry

    Comment by Harry — August 7, 2008 @ 9:15 am

  37. Hope for No.26.
    We wait for it so long time~~~ 🙂

    Comment by Nan — August 19, 2008 @ 4:40 am

  38. I would give Rich the Booker prize as well as the nobel prize for literature for writing such awesome articles. Good Job….

    Comment by Varun — September 1, 2008 @ 2:56 pm

  39. Fantastic articles…great job… i am waiting for article no.26

    Comment by Rakesh — September 15, 2008 @ 9:32 am

  40. Great work, Rich. Looking forward to the next article. Is there a book in the future? 🙂

    Comment by Vince — November 4, 2008 @ 7:08 am

  41. Only once in a while can a piece of work as excellent as this is seen around…. job well done… you rock!!!

    Comment by Phani — November 23, 2008 @ 1:31 pm

  42. Excelent article. Ultimate guide for CAB and MSCF. I’m waiting for best practices using ActionCatalog !

    Comment by Tihomir — November 24, 2008 @ 12:04 am

  43. Has the credit crunch bit you ?
    Are you one the the 100s being layed off by the Investment Banks?

    Great articles by the way.

    Comment by MoneyForNothing — December 8, 2008 @ 8:18 pm

  44. Hello Rich,
    Great articles!!!
    Waiting for N26.
    Please hurry.

    Comment by Lucy K — December 31, 2008 @ 6:00 am

  45. Fantastic!!
    I am fan of ur articles now…
    Gr8 job …Keep it up and provide us few more articles on other topics as well…
    thank u

    Comment by nilesh — February 24, 2009 @ 5:01 pm

  46. Brilliant reference. Thanks very much.

    Comment by D — March 9, 2009 @ 2:47 pm

  47. Your articles are great and should be published in a book. I’d buy it and I think many who’ve commented on this blog would also. The Microsoft documentation is useless and a waste of time for the beginner. The problem I have with the SCSF is that’s is that its too problematic to work in my environment which is Visual Studio 2008 SP1. I do not have 2005 installed. Some of the problems I have are the context menu on the View doesn’t appear when the business module is right-clicked, and the runtime crashes because it can’t find infrastructure modules that have been renamed during the project creation. I’ve worked around these issues, but it’s too much of a pain, especially when I can accomplish nearly the same functionality with StructureMap as my IOC. Nevertheless, thanks for a great series of articles.

    Comment by Roy — March 26, 2009 @ 12:37 pm

  48. Excuse me, but where can I find the source code? Thank you so much!

    Comment by Leo — April 1, 2009 @ 8:52 am

  49. Hi,

    Nice article. Any books regarding CAB and SCSF written by you?


    Comment by Clifford Resonable — June 11, 2009 @ 9:05 am

  50. great article, great job!!!! waiting for part26 …

    Comment by mark — June 30, 2009 @ 4:32 pm

  51. […] une série d’articles très clairs présentant l’architecture du CAB. Parfait pour débuter et bien comprend son […]

    Pingback by Le blog de Sylvain AURAT » Microsoft CAB — July 21, 2009 @ 8:27 am

  52. hi Rich thank’s a lot,why don’t you show us a video demo?it will help us more,
    thank you!

    Comment by Anonymous — July 21, 2009 @ 3:01 pm

  53. hi Rich thank’s a lot,why don’t you show us a video demo?it will help us more,
    thank you!

    Comment by Sherlock Holmes — July 21, 2009 @ 3:03 pm

  54. I enjoyed reading evryone of your articles. Thank you for your hard work.

    Comment by Gilbert — October 8, 2009 @ 10:05 pm

  55. Rich over the years your articles have been a great help, thanks! We’re now knee deep in the SCSF way but do you know what the future holds? Acropolis is dead, will the patterns team continue to develop new versions of the framework? They have said that they are committed to future updates but it’s been nearly 1 ½ years since we’ve had any updates. Does anyone know what the plan is?

    Comment by Steve — October 21, 2009 @ 2:18 pm

  56. One of the best articles I have ever read. Really awesome!!!
    Waiting for more of your article 🙂

    Comment by Nazish Kanwal — November 5, 2009 @ 8:20 am

  57. I was dumb in CAB and I had not found a place where I can start learning the concept. After googling a lot I found this series of article really…..really helpful. Thanks Rich.

    Comment by Sohel Rana — November 14, 2009 @ 4:08 pm

  58. Outstanding Article , I considered it wonderful

    I look ahead to more similar postings like this one. Does This Blog have a newsletter I can subscribe to for new posts?

    Comment by erevesoic — November 24, 2009 @ 2:26 pm

  59. This is truly one of the best CAB tutorials I ever found!

    Comment by R — December 4, 2009 @ 7:34 pm

  60. […] Rich Newman. Introduction to CAB/SCSF Possibly related posts: (automatically generated)Installing the Smart Client Software FactoryA few words about frameworkFirst look at the Smart Client projectAre you seeking employees confidentialy in Orlando? Leave a Comment […]

    Pingback by Smart Client Software Factory Resources « Aleks Grinberg — March 13, 2010 @ 2:54 pm

  61. Hello Rich, you’re really a rich man. Before reading your series, I’m struggling with CAB/SCSF more than 3 days and have no idea to start up with it. But now I well understand what I can do and how I can do with SCSF because you have revealed the veil. Great Job. Thanks. And, like others, I’m waiting for part 26, that you mentioned at the last of part 25. Is it still on your agenda?

    Comment by jinglecat — March 24, 2010 @ 4:12 pm

  62. Hello Rich, I am looking for C# developer to come on board for a 3-6 month project. I need someone with experience with C#, Windows forms (WINFORMS), .Net 3.5, OOP, Microsoft CAB and graphic programming (GDI, GDI+ or DirectX).

    If you are interested or may know of anyone that can do the project could you please contact Tim Pindolia on 0207 4466730 ASAP.

    Comment by Tim Pindolia — June 7, 2010 @ 12:24 pm

  63. […] Following series referred is a really good resource to learn CAB/SCSF, but unfortunately, they can’t be accessed in China. Original address is […]

    Pingback by Table Of Contents: Introduction To CAB/SCSF | Leon Liu's Weblog — June 19, 2010 @ 11:53 am

  64. […] Monday, 02 August 2010 14:15:18 UTC      Comments [0]    |  Trackback […]

    Pingback by kevin Mocha - Rich Newman: Introduction to the CAB/SCSF — August 2, 2010 @ 8:24 pm

  65. […] or need some clarification if you already have experience, stop searching for information and visit this great article on CAB/SCSF. Microsoft documentation on CAB sucks, I spent enough time searching material on CAB, this article […]

    Pingback by Introduction To CAB/SCSF « Rams On It – .NET — September 17, 2010 @ 10:41 pm

  66. […] late 2007 I wrote a series of articles on Microsoft’s Composite Application Block (CAB).  At that time I was running a team that was developing a user interface framework that used […]

    Pingback by Review of a Composite Application Block Project « Rich Newman — September 13, 2011 @ 4:59 am

  67. Excellent Series. I was required to work on project which involves SCSF + CAB. I was struggling for first couple of days. But after reading this series, now I have fairly good idea of SCSF + CAB and underlying concepts. Very good series for starters. Thank you very much.

    Comment by Anonymous — September 27, 2011 @ 1:18 pm

  68. Thanks for writing this great articles 🙂

    Comment by milley — February 23, 2012 @ 11:02 am

    • Hi Richnewman,
      Thanks for giving us great articles. SCSF/CAB is killing the performance of my application. Can you please suggest me how to improve the performance?.

      Comment by Srihari — October 19, 2012 @ 7:05 am

  69. nice, help me a lot

    Comment by Anonymous — December 19, 2013 @ 10:11 pm

  70. This is nothing new from the consoles so what sets GTA on PC apart.

    People Follow You ‘ Right, Left, Down, Left, Circle, Up, Left, and Square.
    3 by suggesting that additional information will need to be submitted for further investigation.

    Comment by gta online money — June 25, 2015 @ 12:45 am

  71. In all honesty, an amazing series of articles. Thank you!

    Comment by arlvin — January 20, 2016 @ 9:32 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: