2nd MSDN Magazine Article Hits the Web [Jack Gudenkauf]

The second of two articles we wrote for MSDN magazine was published online today (and available in news stands now): http://msdn.microsoft.com/msdnmag/issues/07/03/CLRInsideOut/default.aspx

This article discusses the System AddIn pipeline and we promised to show the utilization of the model to enable compatibility as your Host and Add-In version independently. In this article we’ll first go into detail about the architecture of the model. Then we’ll look at version 2.0 of the application we reviewed last month, using it to get an in-depth view of how our pipeline works, and finally using it to demonstrate how you can use our system to keep add-ins working even as the host changes.

Comments (19)

  1. tcmichals says:

    Good article.  How would would you go about adding IoC (Inversion of Control)?  for example: event registration could be done via attributes to hook up publishers to subscribers?  Or another example setting up business objects within a plugin.

  2. Wow!  What a great question.  I think there are several questions in there 🙂

    1. We are planning to give more guidance on using patterns, etc.. on our model.  In some respects there are several patterns you employ (or may employ) in using our model (e.g., Proxy, Adapter, Bridge, …).  The key to our model is a separation of implementation and integration.  After initial activation we get out of the way.  Which of course implies that you need to build your object model on pattern(s).

    2. We will give an example of how events are enabled over our model.

    3. We will give an example of how a traditionally thought of Add-In (e.g., Office Add-In) works over our model.  The article shows an Add-in providing a service to a Host not an Add-in automating a Host.

    4. I’m not clear on your BO plugin question but if you are referring to an Add-in (sorry but we use the term Add-in not plug-in) that also acts as a Host (e.g., Windows media player) we support this model.  Or if you are refering to plugable pipelines we also support this.

    • JackG
  3. tcmichals says:


    I’ve seen this question posted several times, but need to post it again… When will it be released?

  4. tcmichals says:

    Oh also, WCF example, for example, WCF interface mapped and a plugin interface mapped into a single instance to a module…

    Thus from the programmers view point it can be coming over the web, or UI it uses the same interface?

  5. re: When it is released – http://blogs.msdn.com/clraddins/archive/2007/01/12/msdn-magazine-articles.aspx#comments

    re: WCF. We reconcile the models via an interface/contract.  In fact we call it a contract because we worked with the WCF team.  There is certainly more we could do to bring the models together. The models are similar wrt a proxy pattern.  The WCF model is fundamentaly based upon a messaging model and reconciling to a single model for cross machine and intra-machine would be difficult.

    • JackG
  6. NSWCDD_Leland says:

    Can this technique be used in Web apps? I am working on a project that is a web app and we would like to develop a framework that enables develoeprs to build tools against our app and then treat those tools as add-ins. Would this be the technique we should be moving towards?

  7. Garry Trinder says:

    We designed these features to be used in both clients and servers including web applications. We are also capable of running in partial trust so if you need, for example, to host add-ins from a partially trusted IIS/ASP.Net domain you will be able to.

    In fact, a few of the internal partners we are working with are building web applications and drove many of our requirments.


    Jesse Kaplan

  8. Taco says:

    How would an add-in talk to another add-in in your model? Is there some kind of contract between an add-in and the host to find and  communicate with other add-ins?

  9. NSWCDD_Leland says:

    In order to create a host application, should we wait for ‘Orcas’ release? The AddIn namespace is new as of Orcas, correct?

    With regards to add-ins talking to add-ins – I’m not sure we envisioned that. Could have possibilities though. Thanks for bringing it up!


  10. Gary says:

    Is it possible for an out-of-process addin to be activated remotely (say on remote server machine on the corporate network)?

  11. Garry Trinder says:

    re: Add-Ins talking to other add-ins

    There are actually two possibilities here. The first is that one add-in can directly activate a second. In our system add-in/host is really just about who calls the Activate API and it’s entirely possible for a component to be both at the same time.

    Additionally we provide functionality to make it relativly easy to pass add-ins from one entity (say to the original host) to another (say one of its add-ins). Part of the object model between the host and the add-in would have to allow for the add-in to be passed across. I’ll make a full post on this at a later time but we provide the functionality to allow the host to pass the add-in off to another entity and let that entity talk to the add-in with a completely different “view” than the original host.

    re: Release schedules

    All of this functionality will first appear in the Orcas release of the .Net Framework. If you can wait to release your product until we release we would certainly encourage it, but if you cannot wait until that time I still encourage you to read about what we’re providing so that you know what pitfalls to look out for and have a migration plan to move over to the framework provided system as it makes sense.

    If you do think you can wait until Orcas, or even if you can’t, you don’t need to wait until the final release or even the beta’s to start building or prototyping on our bits. The current CTP has nearly all the features we’ll be delivering and is quite stable. There may be a few code changes required for moving fromt the CTP to betas and final releases but the ammount of effort will be minimal.

    re: Remote activation

    In Orcas we do not provide anything that would let a client side host application run add-ins on a server. We’ll be coming out with samples/articles that demonstrate how to easily discover add-ins from a server and deploy them on a client, but they would then be run on the client.

  12. wang says:

    How do you plan to support the third category, the UI type addin? Thanks

  13. Garry Trinder says:

    The question about UI add-ins probably warrants its own post but the short answer is that our model is agnostic as far as UI is concerned and doesn’t do anything that would prevent hosts from designing object models that would allow the add-ins to directly display UI to the user.

    The problem is that there is currently no UI framework built on the CLR that is capable of running in multiple AppDomains. We are working with the WPF and WindowsForms teams to enable these scenarios but we’re not sure when that will come online. In the meantime, if your add-ins need to contribute UI directly to the user you can run those add-ins in the same AppDomain as the host: you will lose the sandboxing potential and reliability you get with AppDomain isolation but you still get most of the versioning benefits enabled by our sytsem.

    –Jesse Kaplan

  14. John says:

    What would be the guidance for when to use System.Addin as opposed to CAB?

  15. Hi John. System.AddIn is a platform component and is therefore fully supported and serviced as a Microsoft product.  

    Whereas, CAB is Prescriptive Guidance, not a product.  Don’t get me wrong, they have done some great work and there is a model for receiving some support.  And many times their work finds its way into core products.

    The PAG CAB is more specifically a UI framework model.  

    The Add-In model is a “generic” model for extensibility.  As such, CAB could certainly be built on the Add-In model!

    If your question is why not have a standard contract definition for IWorkspace, IUElementAdapter,.. you find any argument from me 

    I would love to get feedback on whether or not people would find this valuable.

    • JackG
  16. John says:

    Thanks for the response JackG.  Perhaps part of my original question should have been… Since CAB is a pre-built framework, why would I re-implement the same thing under the Add-In model?  I know something about CAB but little about AddIn.  Are there any advantages to building my own AddIn based framework? i.e. CAB is heavy handed compared to AddIn, doesn’t provide isolation, etc….?  I do like the idea of working with a supported MS product.  BTW – I’ve read the MSDN articles – good stuff.

  17. John, Thanks for clarifying. I agree a UI f/x built upon the Add-In model would be a great offering. We have had many discussions internaly about this very subject.  I will pass on this desire to our sister team. If others out there are also interested, please let us know.  Customer demand certainly drives our feature work. JackG

  18. Garry Trinder says:

    Regarding support for UI Add-In’s – Here you go! http://blogs.msdn.com/clraddins/archive/2007/07/27/by-popular-demand-jack-gudenkauf.aspx

    • JackG
  19. hipnoj says:

    <a href= http://index1.krewor.com >jodo upskirt gameshow</a>