InfoQ

News

CLR Add-In Model

Posted by Jonathan Allen on Feb 09, 2007 06:00 AM

Community
.NET
Topics
.NET Framework
Tags
CLR Add-In Model

Currently .NET applications have the ability to host add-ins. Isolation and sand-boxing can even be accomplished via AppDomains. However there are some gapping holes in the use case. Microsoft's CLR Add-In Team intends to address these holes in VS 2007.

The CLR Add-In Team divides the issues into two sections. Version 1 problems affect applications the first time they try to add extensibility. Version 2 problems affect applications when their second version is released.

Version 1 problems include:

  • Activation
  • Discovery
  • Isolation
  • Lifetime Management
  • Loading/Unloading
  • Sandboxing

 Version 2 problems include:

  • Backwards compatibility: running V1 add-ins on V2 applications
  • Forwards compatibility: running V2 add-ins on V1 applications
  • Isolation changes: moving from AppDomain to Process isolation boundaries
  • Sharing: taking an add-in built for one application and running it in another

Jack Gudenkauf and Jesse Kaplan of MSDN Magazine covers some of these in their article, .NET Application Extensibility.

Add-ins are built against abstract classes defined by the host. The AddInStore is used to obtain information about available add-ins. Information about add-ins are returned as tokens containing the add-ins' Name, Version Number, Publisher, and Description.

Add-ins can be activated via their token. The activate is a one-line call that takes the security level the add-in will be run under and returns an object that implements the previously mentioned base class. The object actually runs in a separate AppDomain, which protects the rest of the application from failures within it.

In order to unload an add-in, its entire AppDomain must be unloaded. This can be as simple as calling ShutDown on the AddInController.

Like any new framework, the CLR Add-In Model needs a real application to put the design to the test. Jason He is running a series of articles on how to use the CLR Add-In Model to extend Paint.NET. Among other things, these articles go into some of the finer details of an add-in's life cycle.

No comments

Reply

Exclusive Content

Diary of a Fence Sitting SOA Geek

In this presentation, Mark Little explains the history of SOAP/WSDL/WS-*-based web services and RESTful HTTP and highlights how the two approaches might converge into a single solution.

Flex for XML and JSON

Platforms need interoperability. In this article Flex interoperability with JSON and XML is explored including direct mapping to chart and grid components.

Measuring Agile in the Enterprise: 5 Success Factors for Large-Scale Agile Adoption

Michael Mah analyzes the development process in 5 companies: 2 Agile (one of them BMC) and 3 classic. He presents the factors which contributed to the success of BMC's Agile adoption.

Tom Preston-Werner on Powerset, GitHub, Ruby and Erlang

In this interview filmed at RubyFringe 2008, Tom Preston-Werner talks about how both Powerset and GitHub use Ruby and Erlang, as well as tools like Fuzed, god, and more.

David Laribee on Alt.NET and its Mission

David Laribee discusses the purpose of ALT.NET, its mission and future.

Discover RailsKits and Stop Writing Redundant Code

Ruby on Rails has become a popular Ruby framework for creating web applications in recent years. An aspect of creating a web application is the need to repeatedly create the same base functionality.

A Formal Performance Tuning Methodology: Wait-Based Tuning

Steven Haines talks about tackling web application performance tuning by proposing a method called wait-based tuning.

Shaw and Fowler About Forging a New Alliance

Shaw and Fowler talk about the need for a new relationship between the business department and the IT department. Studies have shown that projects mostly fail due to miscommunication between the two.