Stored procedures in Cosmos DB are JavaScript functions that run close to the data to ensure high performance. In addition to great performance, stored procedures provide multi-operation transaction support with automatic rollback when things don’t go as planned. In this episode, we’ll look at the server-side Collection and Response classes to learn how to create and update… Continue reading Cosmos DB Server-Side Primer – Episode 1
Category: Programming
Create SAS Tokens for Azure API Management with an Azure Function
Shared Access Signature (SAS) tokens are required to call Azure API Management’s original REST API. We can generate these manually on the Azure portal for testing. However, in production, if you want to invoke the APIM REST APIs programmatically, you’ll need to generate these tokens with a bit of code. There’s a snippet available in… Continue reading Create SAS Tokens for Azure API Management with an Azure Function
Extract JWT Claims in Azure API Management Policy
JSON Web Tokens (JWT) are easy to validate in Azure API Management (APIM) using policy statements. This makes integration with Azure Active Directory and other OpenID providers nearly foolproof. For example, one might add the following directive to the <inbound> policy for an API to ensure that the caller has attached a bearer token with… Continue reading Extract JWT Claims in Azure API Management Policy
The Simplest Possible Thing Principle
I mentor lots of young developers. It became a passion for me in the 1990s when I started teaching computer programming at a local college. I was not a good teacher for the first couple of years, admittedly. But I studied pedagogy and learned how to balance lecture and lab time to maximize the understanding… Continue reading The Simplest Possible Thing Principle
.NET Back to Basics – Delegates to Expression Trees
I led a talk at the Richmond, Virginia .NET User Group on 2016/2/4 about how delegates have evolved in .NET since 2002. We had about 40 in attendance from my rough count and the discussion was energetic. Thanks to everyone who attended. Below, you’ll find the links for the presentation and source code from the meeting.… Continue reading .NET Back to Basics – Delegates to Expression Trees
Kevin’s Career Upgrade v6.0 – Amazon AWS
I started my career in software development 34 years ago. I was 16 years old and a relative needed a program that helped her with a file classification project at a local hospital. I wrote a really bad piece of software in BASIC that took hours to solve the problem each time it was needed. I… Continue reading Kevin’s Career Upgrade v6.0 – Amazon AWS
Schema Refactoring with Views
Database triggers are generally pretty awful. Anyone who has had to deal with a database heavily laden with DML triggers knows this and avoids using them. If anyone tells me that they must use a trigger, I can always prove that there’s a better way that doesn’t bury dependencies and business logic so deeply in the database.… Continue reading Schema Refactoring with Views
Generating Filenames Dynamically in SSIS
A file’s name and location are often used to express what’s inside it. Filenames are not required to be meaningful to human beings but they often follow some sort of pattern for categorizing and describing the data inside them. In this way, we can think of the name of a file as being somewhat like… Continue reading Generating Filenames Dynamically in SSIS
On Primary Key Names
If you use frameworks like Microsoft Azure Mobile Services or Ruby on Rails, then you’re accustomed to complying with a host of development conventions. Frameworks are often said to be opinionated, forcing certain design decisions on the developers who use them. Given that very few software design choices are perfect in every situation, the value… Continue reading On Primary Key Names
Invoking Stored Procedures from Azure Mobile Services
One of the questions I’m often asked is whether it’s possible to call SQL stored procedures from Azure Mobile Services. The answer is yes and it’s probably easier than you think. In case you don’t know, Azure Mobile Services is a way to very simply expose an HTTP service over data stored in an Azure… Continue reading Invoking Stored Procedures from Azure Mobile Services