The multilingual feature is finished, most time went into sorting out how to deal with localization for Windows Universal Apps, Microsoft renamed the resource file extension for UWP apps from .RESX to RESW. In itself not a problem but I want to keep all translations for the three platforms in one place and Xamarin still uses RESX for iOS and Android. Eventually I ended up with a pre build batch file that copies the RESX to a RESW file before building the UWP application.
More info: Universal Windows App Localization
Before I can start building the timer feature in Xamarin, I will have to extend the REST interface that is used by the mobile apps so that it supports creating, pausing, stopping and saving timers. Currently I am working on the REST interface. I realized that mobile apps with timers will generate a lot of REST service calls, for instance to get progress on running timers, so the first thing I did was adding some caching to store data so calls to the SQL database are minimized. Usernames, passwords and active timers will be cached for a couple of hours in order to speed things up. I am using the good old System.Web.Caching.Cache that has been around for years in .NET
To be continued...
woensdag 1 februari 2017
In past week two users reported issues that time entries from other users were displayed in their overviews! Not good.. I looked into the matter and I think this is because some JSON responses were being cached and displayed to several users while the content in those JSON responses was only meant for one person. To disable caching of JSON responses on the IIS Server, I added the following attribute on each controller that has JSON actions:
[OutputCache(NoStore = true, Duration = 0)]
Perhaps a bit of overkill to specify this for all actions on a controller, but it is important that cached content is never served to the wrong user..
More about ASP.NET MVC caching in these links: