Author’s Archive: long2know

Home / long2know
245 Posts

It’s been a long, long time since I messed around with Google’s push notification messaging. In fact, the last time I played around with it, it was still called “C2DM,” or Cloud to Device Messaging. Since that time, “GCM,” or Google Cloud Messaging was introduced. And even that is superseded by Google’s new Firebase (FCM) messaging. The most recent iteration is very interesting since it’s cross-platform and directly supports iOS, Android, and Web notifications.

More Link

.NET doesn’t have a very good way, that I’m aware of, to limit the number of Tasks/Threads that can be running at a single time. This can create issues where, for example, you are queuing up thousands of jobs that run against a finite set of resources.

More Link

I use Toggl (https://toggl.com/) to track my daily time. It’s a nice system that is free with lots of reports and such. However, one report that I needed is not available. Fortunately, there is a nice API available to extract your data as needed.

More Link

Using LINQ’s FluentAPI, left/outer joins are difficult. With a little work, it’s possible to perform left outer joins, though.

More Link

There are a few scenarios, especially when using partitioning/windowing T-SQL functions, that EF falls down a bit. It also is not entirely straight forward to perform somewhat complex joins and aggregation.

More Link

Using the .NET Core Middleware for request processing is, imho, not very well documented. There are a couple of things that are not obvious: retrieving query parameters and binding a request body to an object. To top things off, accessing the request Body has a few issues. Here’s how to deal with these scenarios.

More Link

Over the past year and a few months, we, my coworkers and I that is, have been using an Actor Model framework to implement a sort-of state-engine-based distributing computing engine. Using a generalized framework for this seemed to introduce many complexities that, in my mind, could potentially be simplified. My weekend project is centered around exploring what can be done out-of-the-box with .NET Core.

More Link

EntityFramework 7 is the defacto ORM used with .NET Core to provide cross-platform compatible data access. EF7 is missing many features that are present in EF6, though. My initial apprehension was that this would create a scenario where one could not use .NET Core if their projects relied on EF6 features. Fortunately, it’s pretty easy to get EF6 working with .NET Core. The sacrifice is a loss of cross-platform hosting ability.

More Link

ASP.NET’s built in CSRF (Cross-site request forgery) is pretty straight forward. You add a token to your views via an HTML Helper, and then decorate your controller actions with a specific attribute to validate the token on POST. There are many times, seemingly randomly, where users have invalid tokens on their requests. MVC throws a 500 error with an HttpAntiForgeryException. For legitimate users, this is not an optimal experience.

More Link