Distributing child applications
A server-side Vault Application Framework application may sometimes be accompanied with a client-site User Interface Extensibility Framework application, where the two applications are designed to be used together and not independently. From a usability perspective it is better for the users to have to install and maintain one vault application, rather than have to manage the installation of both.
Approach
- Create your Vault Application Framework application and note the
guid
that it is assigned within theappdef.xml
file. - Update your User Interface Extensibility Framework application’s
appdef.xml
file, ensuring that the v3 schema (or higher) is used, and add a master application guid containing the value found above. - Build the User Interface Extensibility Framework application, and produce a deployable
.zip
or.mfappx
file. - Add the UIX application to the Vault Application Framework solution, ensuring that it is set to copy to the output directory.
- Right-click on the Vault Application Framework solution name and select
Add
, thenExisting Item...
. - Navigate to the User Interface Extensibility Framework application, select it, and click
Add
. - Right-click on the file that is now visible within the solution and select
Properties
. - Ensure
Copy to Output Directory
is set toCopy always
.
- Right-click on the Vault Application Framework solution name and select
- Open your Vault Application Framework class and override the
InitializeApplication
method. Ensure that the name of the UIX application is altered to the name of your application.
/// <summary>
/// Install the UIX application, as it will not be installed by default.
/// </summary>
/// <param name="vault">The vault to install the application into.</param>
protected override void InitializeApplication(Vault vault)
{
try
{
string appPath = "UIX.mfappx";
if (File.Exists(appPath))
{
vault.CustomApplicationManagementOperations.InstallCustomApplication(appPath);
}
else
{
SysUtils.ReportErrorToEventLog("File: " + appPath + " does not exist");
}
}
catch (Exception ex)
{
if (!MFUtils.IsMFilesAlreadyExistsError(ex))
SysUtils.ReportErrorToEventLog(ex.Message);
}
base.InitializeApplication(vault);
}
Once the Vault Application Framework application is installed to the vault, it will automatically find and install the User Interface Extensibility Framework application, and list it as a child application:
Samples
This approach is shown within the Client to Server Communication sample.