Adventures with Azure Table Storage: Repository Pattern

Azure Storage

I am not a fan of writing wrapper libraries around SDKs.

A good mature SDK should be simple to use and require a minimal amount of code to implement.

Instead, I would rather focus on guiding the development team on how to best use the SDK, in this case the Microsoft.Azure.Cosmos.Table SDK.

What exactly is the recommended guidance?

The two that I have found to be the most successful: are documentation and code, with some combination of the both being the best.

Documentation

I am talking specific examples outlining how developers in the organization should use the SDK.

Show me some classes, interfaces, etc.

The examples should also include organization specific coding standards, why not, great way to reinforce best practice.

Good developers, see patterns, and can work to patterns, which is why documentations comes in handy.

Code

While documentation is great, code is even better.

Show me an example project, one that runs on my machine with minimal setup, and let me see how the pieces work together.

Give me something to play around with, for me, this is the best guidance.

So I did both for a recommendation on how to standardize development with the Microsoft.Azure.Cosmos.Table SDK.

I created a sample project, which can be found at https://github.com/mattruma/MJR040 and documentation, which can be found at https://github.com/mattruma/MJR040/blob/master/README.md.

This project demonstrates one implementation of the repository pattern for reading and writing data to Azure Table Storage.

The easiest way to get this project up and running is to have Visual Studio 2019 installed, with all the Azure goodies, Azure Storage Emulator and Azure Storage Explorer, as outlined in the documentation.

Think of this as a conversation starter.

If you have some feedback, some criticism, or better yet, another idea of how to do it, please send it my way!

Thanks!

1 Reply to “Adventures with Azure Table Storage: Repository Pattern”

Leave a Reply

Your email address will not be published. Required fields are marked *