Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin and Managed Extensibility Framework (MEF)

I'm thinking about a new mobile/tablet application.

I want to allow the users to develop their own plugins.

Imagine a cash desk application running on a Android tablet. The user could use many alternative when connecting to the credit card reader (Square, Sum'Up, ...).

If my application was an old Win32, I would just publish an API and let Square or Sum'Up developpers create a DLL. This DLL would then be placed somewhere on the computer. At application startup, I just have to look for those DLL and dynamically load them.

In fact, the real question is : Is it possible to create a plugin based application ? I'm thinking about Managed Extensibility Framework here. Many questions come to mind :

  • How to deploy those plugins ?
  • Does this work for all the platforms (iOS, Android, UWP) ?
  • ...

I was unable to find any documentation on this.

Many thanks for your thoughts and indications.

like image 551
Julien Ferraro Avatar asked Dec 19 '16 05:12

Julien Ferraro


People also ask

Is MEF still supported?

Managed Extensibility Framework (MEF) - . NET Framework | Microsoft Learn. This browser is no longer supported.

Is MEF supported in .NET core?

For those who don't know, the Managed Extensibility Framework (MEF) is alive and well, and has been ported to . NET Core as System. Composition (source here).

What is MEF Visual Studio?

Overview of the Managed Extensibility Framework. The MEF is a . NET library that lets you add and modify features of an application or component that follows the MEF programming model. The Visual Studio editor can both provide and consume MEF component parts.


1 Answers

Not sure if this answers your question fully.

However, a MEF like architecture could probably work on Android if you put the DLL's somewhere publicly discoverable, such as in /storage/emulated/0. Alternatively, such plugins could be distributed as separate Apps, providing Services, Content Providers and Activities consumable from other Apps.

However, on iOS you would not be able to publish such an App in the App Store though, as Apple does not allow you to use dynamically linked libraries there. You could maybe do it for Apps that don't go on the App Store, such as for Enterprise distribution.

While it might not be the greatest solution. You would always be able to navigate between Apps on iOS through URLs. However, that is not the greatest experience, since this would mean you would be leaving your App every time you wanted to get into a "plugin" App to do something.

like image 58
Cheesebaron Avatar answered Nov 07 '22 01:11

Cheesebaron