In this course, you'll learn about MEF, Microsoft's answer to the runtime extensibility problem of today's applications, and how to implement it into your existing applications. What is MEF? How does it work? Should you replace your existing IoC solution with MEF? We'll answer these questions and more throughout this course. For existing users of MEF, we also cover troubleshooting and debugging parts.
Dustin is a co-founder of Developer Advocates, a freelance evangelism for hire outfit. He is also a co-host on the MashThis.IO podcast. As a PostSharp MVP, he regularly attends user groups, code camps and other developer events to speak about aspect oriented programming and a range of other topics.
Introduction Hi, and welcome to Building Extensible Applications with Microsoft's Managed Extensibility Framework. I'm Dustin Davis and in this course, we'll be learning how to do just that, build composable applications and extend them using MEF. MEF is a framework that simplifies building extensible applications using dependency injection-based component composition, as well as other features that support modular application development. Well, other solutions exist in this problem space such as Microsoft's own Managed Addin Framework also known as System. Addin and even in version of control frameworks like StructureMap and a Unity Library from the patterns and practices. Microsoft felt that these solutions were not ideal for third party extensibility due to the solution being either too heavyweight for general use, or just required too much effort on the developer's part to implement both for the host application and the extension providers. So MEF is the Microsoft's attempt to address the pinpoints of existing solutions, even their own. However, MEF is not meant to replace any existing solutions. As we'll see throughout this course, MEF provides developers with quite a few things, but here is some of the highlights. First is a standard Addin Framework that's lightweight and it comes built in the. NET. Before MEF, developers who wanted to support plug-in based extensibility in their applications needed to create an infrastructure from scratch or had to compose the infrastructure from existing solutions. MEF provides a powerful attributed programming model out of the box that makes it easy to hit around running and provides a standard way for application to compose the extension points as well as consume extensions. And tooling, instead of tools for discovery, type dependency resolution, dependency injection as well as the rich meta data system that can be used for querying and filtering of extensions. So how do you get MEF? Well, it's already available in. NET 4. 0, and you can find that right now hiding in the System. ComponentModel. Composition namespace. You can also find documentation, information by upcoming releases and even source code for MEF by visiting mef. codeplex. com.