Jump to: navigation, search

Difference between revisions of "Deploy UI Customizings (Client)"


(Manual deployment)
Line 3: Line 3:
 
== Manual deployment ==
 
== Manual deployment ==
 
This is an obvious approach of deploying UI customizings. From a {{UBIK}} perspective, this can be
 
This is an obvious approach of deploying UI customizings. From a {{UBIK}} perspective, this can be
* Manually copying/pasting the UI customizing files (XAMLs, images, etc.) to the desired devices;
+
* Manually copying/pasting the UI customizing files (XAMLs, images, etc.) to the desired devices (at [AppInstallPath]\LocalState\XAML, where the installation path is in the user's appdata\packages directory);
 
* Other 3rd-party (e.g. customers' private rollout infrastructure) automated deployment systems.
 
* Other 3rd-party (e.g. customers' private rollout infrastructure) automated deployment systems.
 +
 +
[[Category:Client|Deploy UI Customizings (Client)]]
 +
[[Category:WinX|Deploy UI Customizings (Client)]]
 +
[[Category:Xamarin|Deploy UI Customizings (Client)]]
  
 
== {{UBIK}} server deployment ==
 
== {{UBIK}} server deployment ==

Revision as of 10:23, 6 July 2021

As a crucial part of the UBIK® client, it is often the case that a set of UI customizings, once finished, is needed on multiple devices. Therefore, the deployment is an important step.

Manual deployment

This is an obvious approach of deploying UI customizings. From a UBIK® perspective, this can be

  • Manually copying/pasting the UI customizing files (XAMLs, images, etc.) to the desired devices (at [AppInstallPath]\LocalState\XAML, where the installation path is in the user's appdata\packages directory);
  • Other 3rd-party (e.g. customers' private rollout infrastructure) automated deployment systems.

UBIK® server deployment

UBIK® provides a new solution where UI customizings can be deployed from UBIK® servers to the clients the same way content can be fetched.

Technical concept

The UI customizings are delivered from UBIK® servers to clients in the form of archive documents which contains the following.

  • The archive files containing the packed UI customizing files;
  • The version of the UI customizings.

Client scenario

Once a UBIK® client connects to a server and downloads such a customizing archive, it unpacks the archive file and place all its content (with the folder structures if there's any) under the client's XAML folder.

  • If a folder or a file at the root level of the archive already has a same-named counterpart in the client's XAML folder, the existing one is first removed before the one from the archive gets unpacked;
  • Once the archive is unpacked, the client tries to reload the UI customizings. If a set is found for the currently selected profile, one should see the changes in the UI.

Some other details

  • The download of a document file is not always automatically done in UBIK® clients.
    • If the archive document is a part of the infrastructure objects, its file is automatically downloaded during login (as long as the client is in online/auto sync mode);
    • Otherwise, one has to either navigate to that document or download a branch containing that document.
  • One can deploy multiple sets of UI customizings in a single archive document by placing them under corresponding folders. Theoretically, it's okay to configure and deliver multiple archive documents to the clients since the content will be unpacked just the same. However, it's our recommendation to use a single archive document not only because it's simpler, but also see below;
Customizing Version
Customizing Version
  • The version information of the UI customizings is available on the archive document and is displayed together with the client version at the bottom of the login page. Currently there's no additional UI to display a list of versions, so the version of a randomly chosen archive will be displayed in case multiple are present. Also, the version information only becomes available after a user logins in (which grants access to the content).

Known Issues

Sometimes, unpacking UI customizing archives might fail because the app cannot overwrite some files which are being used in the current UI. A typical example of this is related to using the Image control. In the example below, an image file "UBIK.png" under the "Demo" customizing folder is referenced by an Image control. If such a control is displayed while an archive containing a set of UI customizings with the same name "Demo" is received on the client, the unpacking will fail because the UI is still holding onto the file, which blocks the unpacking.

<Grid>
    <Image ...
       Source="ms-appdata:///local/xaml/Demo/Images/UBIK.png" />
</Grid>

This tends to happen with image files used in the login/home page since that's where users are most likely at when UI customizing archives are received. In such cases, one can use the following converter technique so that the image files can be safely deleted even when they are being displayed.

<Grid>
    <Grid.Resources>
        <x:String x:Key="logo">ms-appdata:///local/xaml/Demo/Images/UBIK.png</x:String>
    </Grid.Resources>
    <Image ...
       Source="{Binding Source={StaticResource logo}, Converter={StaticResource PathToImageConverter}}" />
</Grid>
IC Attention.pngThe converter essentially creates a copy of the image file in the device memory. While solving the deletion problem, it does add up the memory consumption. So one should be cautious about using this converter too much especially when the images are relatively large.
IC Hint square.pngAn easy way to verify whether the failing of unpack is related to the deletion is to check in Windows Explorer whether there are files that can not be manually deleted in the target unpakcing folder before closing the UBIK® app. If that's the case, please check the customizings and see if there's any reference to those files that can not be deleted. When the problem is not solvable with the above mentioned technique, please create a ticket with sufficient details or manually delete the files after closing the app.