Read the app settings with ASP.NET Core

In previous version of “ASP.NET”, we used to retrieve settings from the “web.config” by using the “ConfigurationManager” like this: View the code on Gist. However, with “ASP.NET Core”, things get a little bit different, and I didn’t say “more complicated” but “different”. Indeed, now, the idea is to convert your app settings to a plain […]

Automate Umbraco deployment with Powershell

Nowadays, it’s inconceivable to deploy web sites manually which is partly why some solutions such as “Umbraco Cloud” exist. However, these options are not always the best. Indeed, for instance, I’m currently working in a governmental company that does not want to have its data hosted elsewhere that on-premise. In that case, it’s important to […]

Umbraco is just another Konami game

Welcome in this utterly useless and short blog post but I couldn’t help myself when I discovered this funny thing in the source code of “Umbraco”. Indeed, during my investigation to fix an issue in the “Umbraco” UI, I noticed something weird in the HTML code of the login page… View the code on Gist. […]

Organize Umbraco projects

This post uses Umbraco 7.12 for the example but probably applies to a wider range of version. Few weeks ago, I started to use “Umbraco” and I noticed that it was pretty difficult to find a tutorial on how to organize an “Umbraco” project (I didn’t say it does not exist, it’s just difficult to […]

Configure Umbraco behind a proxy

Some functionalities, such as the installation of a starter kit during the initial configuration of “Umbraco” perform some calls to external services. If you’re working in a company that is using a corporate proxy and don’t configure “Umbraco” to use it, all these functionalities won’t work. In the case of the starter kit selection, you’ll […]

How to use PetaPoco with Umbraco

The code of this post has been tested on Umbraco 7.12. “PetaPoco” is a micro-ORM used by “Umbraco 7” (“Umbraco 8” uses “NPoco“) to query the database. This blog takes a look at how to perform common operations using the “Umbraco” implementation. Creating tables “PetaPoco” uses class definitions to create tables. Basically, it analyzes a […]

Asynchronicity in JavaScript

Introduction Asynchronicity is one of the most used and most important aspect of “JavaScript”, so let’s review it. In this post, we’ll start by learning what “v8” and the “events loop” are. Then we’ll talk a bit about callback functions before exploring what promises and observables are. The idea of this post is not to […]

AngularJS adds “unsafe” before links

Recently, I experienced an annoying issue after having upgraded my application from angularjs 1.6 to angularjs 1.7. Consider the following link: View the code on Gist. This is a technique I like to use to simulate a link. Basically, defining the “href” attribute to “javascript:void(0)” along with “ng-click” allowed me to add a link executing […]

How to use Promise instead of $q with AngularJS

Imagine the following AngularJS application: View the code on Gist. The idea behind the “doWork” function of the service is to execute some asynchronous code and return a promise to be able to perform some actions once this code has been completed. For the sake of this example, we just wait for 2 seconds and […]

Generators with ES6

As we saw in the post “Make your ES6 classes iterable“, you can make a class iterable by returning a specific object containing a “next” function used by the “for … of” loop to get the different values. As a reminder, the “next” function returns an object with two properties: “value” defines the current value […]