Best Practice for Upgrading a Silverlight Deployment that is Actively Used

I am currently launching the SL3 project, in which we are in a very iterative development mode with approximately 25 active test clients. I make small changes to the clip about 4 new builds per day. It is important to know that this application is a critical area of ​​activity for these 25 people, it is a tool that they use all day to do their work, so they constantly use it and often launch their browser and application in the morning and never close it until the end of the day .

The problem is that when I make an update for the application, I don’t have a clean way to notify users, in most cases this is normal, since I rarely introduce a change in the data contract or something that would be a classic “violation” of the change in the application / service. Users continue to connect and will receive changes at the next update.

Right now, we resorted to sending emails to everyone and telling them to force update or close the browser and log in again.

Of course there is a better way ...

At the moment, my approach is to have a method on the server that compares the versions of the xap client and determines whether the client is the most recent one, so I will notify the user of this and update.

What did you do to solve this problem?

+4
source share
3 answers

One way to do this is to use the push mechanism (I used Kaazing Websoocket Gateway, but anyone could do it). When the new version of XAP is released, all clients will be manually sent (manually entered into the system by the administrator or automated using the XAP file change event). In the simplest scenario, the user will be shown some kind of notification (notifying that a new version has been released and the application needs to be updated), and then the application will update (just reloading the page), if necessary, save the user’s state.

+1
source

If I did this, I would just keep it simple. The configuration value in web.config and the corresponding service method that simply returns that value (the value itself can be anything, but the counter is probably wise). You can then try out this Silverlight application through the service method at regular intervals. Whenever the value changes (which you do manually when you deploy the new version), just pop up a dialog box informing the user about the browser update or login / logout. Thus, you should not force them to be updated every time. If you are going to compare versions of xap files, they will always need to be updated, even for non-break changes.

If you want to take it further, you can come up with some mechanism to distinguish between different levels of severity. For example, if the new configuration value contains the string "update_forced", you can force users to restart the application by logging them automatically (possibly a little harsh). If it contains the string "update_recommended", just show a small icon in the upper right corner, saying that there is a new version and that they should be updated in due time.

0
source

This was supposed to target Silverlight 3, but with the PollingDuplex client and in newer versions of Silverlight, you could publish the “Update Now” bit to clients and create a mechanism in the client to alert the user that there is an update that is currently missing ... that they should update it soon, etc. You can even with serialization, etc. keep the state they are in when they close the application to restart it.

We made material similar to the LOB application that we created, so as users change the situation, the rest of the user base immediately sees these changes. In the following case, flags will be placed to change authorization and updates on the fly if you do.

0
source

Source: https://habr.com/ru/post/1301656/


All Articles