Navigate / search

Sending emails from Azure Functions – SendGrid

I am trying to convince people that right now we should try to think about how we can build our application effectively. Instead of building everything from scratch we should look for possibilities of composition application from different elements. This means that you should write smaller amount of code and there is also smaller chance for making an error.

In case of Azure Functions natural choice for email service provider is SendGrid. Read more

Azure Function – Uploading photos to Azure Blob Storage

Today I would like to describe another production use case for Azure Functions. This time example is quite simple. I would like to use Azure Functions to upload photos to Azure Blob Storage. Of course, you can upload photos directly to Azure Blob Storage. However, with such solution, your components are tightly connected. This can block you in the future. To avoid that you should add some middle layer.

For this, you can use Azure Function. It will act like an API that will accept photos encoder in base64 and upload it to provided location. With this approach, you will be able to change storage component in the future very easy if needed. Read more

NDepend – short review

Sometime ago I have been asked by Patrick Smacchia to write short review of his tool – NDepend. I believe that most of you know this tool. It is a swiss army knife in scope of code analysis. Capacity of this tool is enormous. I wanted to fulfil this request in a professional way. So, I needed to learn how to use this tool before writing any word regarding it. And it was not so easy task. This tool has so many features and possibilities of customisation… After two months of using it I can say that still I am not so advanced user of it.

I will try to do my best… Read more

Caching in Azure Function – how you can use Redis

I believe that you should know that Microsoft has prepared some set of components that can be used for integration purposes. You are able to consume the following services in our function: Azure Storage, Azure Event Hubs, Azure Service Bus, Azure Mobile Apps, Azure Cosmos DB, Azure Notification Hubs, Twilio, SendGrid. On the one hand this list is not so big. On the other one you can address with those services a lot of typical scenarios. But sometimes you need to do something more.

Today I would like to share with how easily you can use Redis cache in Azure Function. You should start thinking what for we need to do that. Probably you heard that Azure Functions should be stateless, atomic, small, fast, … But sometimes you need to do something that violate those rules. Read more

Azure Functions – Lessons learned

Nowadays all topics related to Cloud and Serverless terms have become very popular. One of such elements are Azure Functions. Microsoft defines it as:

Azure Functions is a solution for easily running small pieces of code, or “functions,” in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Python or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions lets you develop serverless applications on Microsoft Azure.

And really I could write a lot about comfort of it usage, easiness of implementation and other features that are great in this solution. Azure Functions works perfect when you do not need to have huge backend. I tested this scenario many times and I was always satisfied.

Of course, at the beginning I made some mistakes and I would like to write about two most important ones. Read more

FluentValidation.Validators.UnitTestExtension version 1.1

I just managed to publish new version of packgage FluentValidation.Validators.UnitTestExtension. This package allows you to write unit tests for Fluent Validators in more effective way.

With version 1.1 following changes have been introduced:

  • support for new version of FluentValidation 7.*
  • new verifiers that check configuration of ScalePrecisionValidator and RegularExpressionValidator.

More information about project is available on GitHub.