B2 Integration - Keeping It Simple

I’ve been a software developer for just a few years now. I’ve always worked with numbers and logic as a financial analyst and securities broker, but recently had the opportunity to develop a new product for ServMask Inc.

I was tasked with developing an extension to our All-in-One WP Migration plugin to upload WordPress website backups to Backblaze B2 Cloud (and to be able to import the backups to a website later).

Extends All-in-One WP functionality to use B2 Storage cloud.

B2 Integration - Keeping It Simple

When I first looked at the B2 API and found that they use HTTP basic authorization, I was relieved because it’s the simplest technique for enforcing access controls. At the same time, I was curious and concerned that it might make creating the plugin extension more complex. I wondered how it would work out, but when I dug deeper into the documentation I discovered that the logic structure of all the functionalities and the API was designed to be as simple as possible. I found it to be quite helpful to work with and a really smart solution for an API structure.

My project with the All-in-One WP Migration B2 Extension was to create a WordPress plugin that integrates the functionalities of the ServMask All-in-One WP Migration plugin with Backblaze B2 Cloud Storage through API integration. Developing the product using Backblaze API and function calls was quite amusing because everything worked as expected in a simple and elegant manner. It gave me the opportunity to learn a lot of new things and experience new situations.

Simple authorization works by simply calling the b2_authorize_account API function and providing account details: account ID and application key. (The account details are obtained from the user account after creation and activation.) b2_authorize_account returns a token that is then used for all subsequent function calls – if the application needs to upload, download, list information, or delete a file or folder.

Building a product around the B2 REST logic produced a simple and smart solution. I was able to see, analyze and rethink my code on a number of occasions when I saw that the data returned from each API function call actually contained a lot of useful information that could be used on other places, without any additional requests. This allowed me to improve my code and instead of making new requests, I just manipulated the arrays and class properties.

I really enjoyed that the workflow and logic of the RESTful structure really made sense to me. Working with a solution that was designed with vision and simplicity let me develop my thinking and progress with creating the extension without any blockers, or any extension of my coding knowledge. It made sense, I worked with it – and the product worked.

Product is here.

B2 Integration - Keeping It Simple

Most APIs today use OAuth2 protocol, which enables applications to obtain limited access to user accounts when using HTTP services. Working with a basic HTTP authentication, on the other hand, was refreshing and allowed me to simplify a big section of my code (which is awesome) and made me realize again there is always more than one solution when creating software.

This project was one of the ones that I have enjoyed the most. I love to create things from beginning to end and the simplicity of the process allowed me this opportunity. This project feels like my creation. I am proud to have created it, end to end, and grateful for what I discovered in the process.

What are your thoughts?