What Is Managed Extensibility Framework?

As its name suggests, the Managed Extensibility Framework (MEF) is a framework to help with the building of extensible applications. Essentially, it allows developers to bolt on additional functionality into an existing application without having to go through an extensive process of rebuilding. It can be used in any .NET application and is now considered an integral part of the .NET Framework 4.0.

The basics of the managed extensibility framework

Managed Extensibility Framework

Say you have an application and you’d like to extend its functionality. Using the MEF, your application checks a catalog, which is essentially what its name suggests. In more technical terms, it’s an object which can search in an assembly or directory for parts that can potentially do the job.

Parts are objects (such as classes, methods, and properties), which are available for inclusion in your application to fulfill your designated need.

This process is governed by the Import Attribute/Import Many Attribute and the Export Attribute. The former defines the needs of the various available parts, so the application can tell if they’re a potential fit. The latter determines whether or not those needs can be fulfilled.

Essentially, the import and export parts have a “conversation” and see if they can arrange a contract according to which they can both function (such as an interface or a predefined data type, for example, a string).

If all goes well, the Composition Engine will compose the two parts, which is to say assemble them so that they work together.

What the managed extensibility framework offers businesses?

While everything mentioned so far might be very interesting, it doesn’t explain what the MEF means for businesses. So, in simple terms, here is its main benefit.

The MEF makes it much easier to extend the useful life of your current applications

That is the main selling point of the MEF in a single sentence. By making it simpler (and therefore more affordable) for developers to update in-house applications, it becomes simpler for companies to get the absolute maximum possible return on investment by pushing their in-house applications as far as they can go. This can mean anything from updating functionality to allow applications to continue into the foreseeable future, to squeezing the last bit of usefulness out of an application before it is retired.

The MEF can also make it easier to customize “big-box” solutions such as open-source software and thus give companies the functionality they really want without having to go to the expense of having to develop everything for themselves from scratch.

Both of these points are likely to be of particular relevance to SMBs, especially those that either plan to migrate to the cloud or are already in the cloud and still in the process of becoming fully cloud-native. In other words, the MEF can help to keep your current applications in a usable state while you work on building new and improved apps, which can actually leverage everything the cloud can offer.

Using the MEF versus developing new applications

In the traditional world of on-premise IT infrastructure, it’s probably fair to say that SMBs budget for developing new apps when old ones start to be so problematic (or insecure) that they are essentially forced to do so. This is simply the reality of having to work to extremely tight budgets, which is a fact of life at the average SMB. This is one area where using the MEF can really come into its own.

In the cloud, however, the situation can be a bit different. What may come as a surprise to SMBs is that there can be a big difference between “moving to the cloud” and being genuinely “cloud-native”. 

In the former case, companies essentially “lift and shift” their existing systems so that they are replicated in the cloud (or update them very slightly to make them work better in the cloud). This often involves using what are essentially workarounds such as the use of “containers” (basically virtual operating systems) or virtual machines (exactly what their name suggests, virtual computers) to run legacy software.

This can bring a lot of benefits, including both predictability of costs and the chance to make what could be significant savings through the astute use of cloud resources (and, in particular, only using what you need when you need it). These cost savings could then be reinvested into developing cloud-native apps, which would bring further benefits. In this situation, the MEF could be used to keep your legacy apps running until their replacements were ready.

If you’re interested in making the move to the cloud and would like to learn more, click here to contact Aperio IT.

Managed security services sacramento