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.

75 thoughts on “Table of Contents: Introduction to CAB/SCSF

  1. 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!

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

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

  4. @viswaug: They are not the same. SCSF uses CAB but CAB can also be used without using SCSF.

    @Rich: Excellent articles. Thanks a lot!

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

  6. Superb article series. Searched a lot for CAB resources but found none, then hit upon your site and found it all here 😉 … Kudos

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

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

  9. 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ø

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

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

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

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

  14. amazing work, All the 24 articles are just Rocking, Easy to understand, and friendly examples….

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

  16. 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?
    Thanks

  17. Hello Rich,

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

    Thank You!
    Hannes
    Greetings from Bavaria

  18. 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 😉

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

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

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

    Great articles by the way.

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

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

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

  25. 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?
    Cheers
    Steve

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

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

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

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

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

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

  31. Pingback: Q4POINTS
  32. Pingback: CAB | outcoding
  33. 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.

Leave a comment