Download presentation
Presentation is loading. Please wait.
1
Managed Extensibility Framework
Mahender Senior Software Engineer United Health Group
2
Mahender Sarangam Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Technologies. Blog :
3
Dependency Injection Idea of the Dependency Injection is to have a separate object, an assembler, that populates a field in the listener class with an appropriate implementation for the finder interface. interface injection setter injection constructor injection. Dependency injection is a style of object configuration in which an objects fields and collaborators are set by an external entity. Dependency injection is an alternative to having the object configure itself . Loose coupling promotes greater reusability, easier maintainability, and allows you to easily provide "mock" objects in place of services instances
5
Responsibilities Instantiation, Configuration and Disposal
Life cycle management is one of the responsibilities dependency containers like Singleton For .NET :- Castle Windsor, Spring.NET, PicoContainer.NET, Puzzle .NFactory ,Unity Benefits: Reduced Dependencies Reduced Dependency Carrying More Reusable Code More Testable Code More Readable Code
7
MEF
8
MEF The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. Plug-in components to an already running application Discovery and Composition capabilities that you can leverage to load application extensions. Benefits Dependency injection and inversion of control. Lifetime management Configuration Import Many Modularity Extensibility Strongly Typed
9
System. ComponentModel. Composition. dll -> Assembly come part of
System.ComponentModel.Composition.dll -> Assembly come part of .NET Framework 4.0 If the version of application is < .NET 4.0, Download MEF Zip file from codeplex site Here are MEF Jargon Part Catalog Contract Import Export Compose
10
Steps for MEF Create Import
Create Export attribute of same type of Import Create instance of Assembly Catalog Composite Container to Compose
11
Catlogs Assembly Catalog Directory Catalog Type Catalog
DeploymentCatalog - Silverlight only
12
Thank you
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.