Dashboard

Enforce read only access in SQL Server queries

This is not something common, I guess. Imagine with me, will you? You have an app dedicated for reporting. The sole reason you built this app is to allow non-developers, but data savvy people, to create operational reports for LOB applications. How do you ensure that your users will not use this solution to modify data on the fly? Imagine how fun would it be to explain why your reporting solution allow them to modify data to your boss....

July 7, 2020 · 2 min · LPains
Timezones

Xamarin Forms converting from one timezone to another

There is a pattern here, I think. I don’t like to work with dates and you probably know that by now. Anyway, don’t like them, got to work with them. In this episode of Pains against dates, I wanted to write about something very specific that I had the pleasure to troubleshoot last week. I have this very important and somewhat old app where all dates are saved using server local time....

March 16, 2020 · 1 min · LPains
Working with time

Overriding standard date formatting of axios for post/put/patch

Let’s start by pointing out the obvious. It is painful to work with dates. No matter the technology, it is just harder than it should be. Anyway… I stumbled across one of those annoying date related issues with axios. Just to be fair, the problem is not necessarily an axios problem, I just got to it when using axios. By default, axios will use JSON.stringify to convert an object to a json....

February 13, 2020 · 1 min · LPains

Simple concurrency tester

You probably know how hard it is to purposefully cause a concurrency issue so you can test your code in these edge scenarios. I ran into this issue not too long ago and found that my favorite web service tester Postman doesn’t support sending multiple messages concurrently. I’m sure there are plenty of tools out there that do a great job, but for the simplest possible way you can use a combination of cURL and scripting....

September 6, 2019 · 1 min · LPains

FreshMVVM master/detail page lazy loaded

Out of the box, FreshMVVM offers a Master/Detail page navigation container that works nicely. However, it does not support lazy loading the pages as you navigate to them. Below, I demonstrate how I’ve done it. We need to replace the FreshMVVM original implementation of FreshMasterDetailNavigationContainer. Note that the implementation below is mostly a copy with the following changes: The list view is grouped Each item in the list can have an icon In the AddPage methods, we no longer create an instance of the pages added, we just add a light reference to a collection The menu page is a xaml file instead of fully created in code Only when the menu item is tapped we instantiate and display the Page and ViewModel LazyLoadedPage class:...

July 29, 2018 · 1 min · LPains