Professional C# 4 and .NET 4
by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner
Chapter 50. Managed Add-In Framework
WHAT'S IN THIS CHAPTER?
Architecture of the Managed Add-In Framework
Defining a Contract
Implementing a Pipeline
Creating Add-Ins
Hosting Add-Ins
This chapter describes in detail the Managed Add-In Framework (MAF) architecture and how to create add-ins and host add-ins using MAF. You can read about the architecture of MAF and what issues it solves by hosting add-ins, such as versioning, discovery, activation, and isolation. Then we discuss all the steps that are necessary to create the MAF pipeline that is used to connect the add-in with the host; how to create add-ins; and how to create a hosting application that uses add-ins.
MAF ARCHITECTURE
.NET 4 includes two technologies for creating and using add-ins. Probably you've already read Chapter 28, "Managed Extensibility Framework," where you saw how to create add-ins with the Managed Extensibility Framework (MEF). Applications using MEF can find add-ins during runtime from a directory or from within assemblies, and connect them using attributes. The difference from MAF is that MEF does not offer a separation of the add-in from the hosting application by using appdomains or different processes. This is where the MAF comes into play. However, to reach this, MAF adds higher complexity. If you would like to get the advantages of both MEF and MAF, you can combine these two technologies. Of course this also adds complexity.
When you create an application that allows you to add add-ins during runtime, you will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access