ForEvolve

A piece of mind...

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Part 3: The VSTS Release

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Now that we have a Blob Storage container set up for static website delivery, we need to deploy our Jekyll website there.

Continue reading...

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Part 2: Create Azure Blob Storage, and configure static website

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Lets recap: we have a Jekyll website saved in VSTS/Git, with a build that starts automatically each time someone pushes code to the master branch.

From there we need to deploy our website in the cloud! However before automating that, we need to create some resources in Azure. To do so, let’s use the Azure portal.

Continue reading...

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Part 1: The VSTS Build

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Now the fun begins, we have a website to deploy, a VSTS project and a Git repository. It is time to start that continuous deployment pipeline we want to build!

Continue reading...

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

Introduction and prerequisites

How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline

In this article series, we will create a continuous deployment (CD) pipeline using Visual Studio Team Services (VSTS) to deploy a Jekyll website to Microsoft Azure.

We will use Azure Blob Storage to store and host the files in the cloud, a Content Delivery Network (CDN) to deliver those files using a custom domain (with free HTTPS support). From Blob Storage, we will use the Static Website blade to configure a default page (index.html) and an error page (404 Not Found).

Azure Storage is a great, cost-effective, cloud storage offering from Microsoft (and no they don’t pay me to say that). For example, the images of this blog are delivered using a CDN and stored in Blob Storage on Azure. Moreover, as a developer, I enjoyed my experiences working with both Azure and Jekyll.

That said, I initially planned a single article, and once again it became very long very quickly, so I decided to split it into smaller chapters to make it easier to read. You can still consider the whole series to be a single long article. For example, when I decided to split the article, I had 55 screenshots; only that made the page ultra long.

The articles focus on the DevOps part of the equation and how to implement the cd pipeline, not really on Jekyll itself.

Here is a diagram that explains the whole idea:

Continue reading...

Operation result

Design Pattern

Operation result

This article will focus on the “Operation Result” design pattern, as I call it. Why do I said, “as I call it”? Because it doesn’t seem to have an official name yet; I haven’t read anything about it; and as you will see, this name fits well. I saw this technique used in multiple SDK, and I used it myself numerous times. It is also straightforward to implement and powerful enough to be worth mentioning.

What’s a design pattern?

A design pattern is a way of solving a problem; a sort of plan of how to implement a solution.

Role

The role of the Operation Result design pattern is to give an operation (a method) the possibility to return a complex result (an object), allowing the consumer to:

Continue reading...

A beginner guide to exceptions

The basics

A beginner guide to exceptions

Today we will take a look at how to propagate errors using Exceptions. I will do my best to keep the article as simple as possible with lots of code samples. I believe that learning the basics is essential in programming.

Prerequisites

You must understand what is a class, a type, a property and have a basic knowledge of inheritance.

What is an Exception?

An exception is a particular Type representing an error.

Continue reading...

DataAnnotations Localization using ASP.NET Core 2 and ForEvolve.AspNetCore.Localization

The basics

DataAnnotations Localization using ASP.NET Core 2 and ForEvolve.AspNetCore.Localization

In the past few months, I worked on a few projects, some are more long terms than others but all in all, I ended up adding a few features to my toolbox: the ForEvolve Framework.

This article will focus on ForEvolve.AspNetCore.Localization. I will show you how you can enable localization of DataAnnotations error messages with 3 lines of code. All the usual Asp.Net Core 2 localization plumbing is also done for you.

Continue reading...

Design Patterns: Asp.Net Core Web API, services, and repositories

Part 11: Integration testing

Design Patterns: Asp.Net Core Web API, services, and repositories

In the previous article, we completed the last piece of the Ninja API. In this article, we will glue all of these pieces together by:

  • Creating integration tests to integrate the Ninja subsystem confidently
  • Connecting the Ninja API to Azure Table Storage
  • Leveraging the new Asp.Net Core 2.0 default configuration

Continue reading...

Design Patterns: Asp.Net Core Web API, services, and repositories

Part 10: the NinjaRepository and ForEvolve.Azure

Design Patterns: Asp.Net Core Web API, services, and repositories

It is now time to complete our Ninja subsystem!

To be prepared, in the previous articles, we implemented a mapping subsystem and visited the Façade design pattern, we also created our data model and introduced Azure Table Storage.

In this article:

  1. We will implement the NinjaRepository
  2. We will connect the NinjaRepository to Azure Table Storage (which cost basically nothing)
  3. I will introduce an open source framework that I am building; from that framework, the ForEvolve.Azure package will help us get things done faster than using WindowsAzure.Storage directly.

Continue reading...

Design Patterns: Asp.Net Core Web API, services, and repositories

Part 9: the NinjaMappingService and the Façade pattern

Design Patterns: Asp.Net Core Web API, services, and repositories

In the previous article, we explored Azure Table Storage briefly, and we created the NinjaEntity class. Doing so opened up a new concern: mapping Ninja to NinjaEntity.

Before going further, to keep the external dependencies low, in this article, we will create a mapping system. This will also allow us to explore an additional design pattern: the Façade.

Continue reading...