What is Let‘s code pattern?
I am starting a blog series to explore blog series to explore some code patterns, like those which are available on IBM Developer. I will call these series Let‘s code pattern .
Definitions for Let‘s code pattern
On IBM Developer website, there are complete solutions to problems that developers face every day. Code patterns leverage multiple technologies to solve issues that our developer advocates have recognized as common use cases across multiple industries.
Do you want to add something about Open Source and the code is available??
For the series Let‘s code pattern , I have defined three topics I will observe for each code pattern in the future.
- Did the code pattern work?
- Did I need to make changes to the readme?
- How complex was it for me?
I always will clone the code pattern to my own repository, to make any changes I want to apply. For example; to add my simple git and cloud helper bash scripts or customisations to the code or in the readme.
Let’s start with the first code pattern
I am starting the Let’s code pattern series with the Blockchain code pattern called “Use blockchain to track fitness club rewards”. The web app is designed to track and trace member rewards, using IoT and the blockchain. It’s a fairly recent code pattern, which was published just last week.
The code pattern “Use blockchain to track fitness club rewards” enables you to setup a blockchain locally on your computer using Hyperledger Composer. The code pattern is based on an Angular web app. You can implement it and start to learn from this project, which is based on a fitness club use-case.
Here’s my customised GitHub version of the code pattern: https://github.com/thomassuedbroecker/Using-Blockchain-to-Track-fitness-Rewards#part00
Let’s begin! Let’s get down to business
Overall it was useful starting point for me to dig into this area without using a cloud instance. The local instance makes blockchain with Hyperledger composer simpler. But I notice, I have to read additional information to get a better understanding of the Hyperledger composer in more detail.
Let me start my observation by providing feedback, with the three defined review questions.
1 . Did the code pattern work?
Yes, it worked well and there were no major issues missing in the step by step guidance. Now the code pattern runs on my MAC.
2. Did I need to make changes to the readme?
Overall the readme worked, I also gained some first-hand experience of blockchain and composer. I used this code pattern to explore these topics. It was useful for me to adjust the project’s main readme to my needs.
The main readme contains references to other readmes. To get a better overview, I created a navigable table of content for each chapter in the main readme.
I rewrote some chapters in the main readme to make the application/architecture content for me clearer.
I even added some BOLD words into the readme to make it easier for me to read the text.
I also reengineered the model and built a custom UML use case diagram of the “Hyperledger Composer Model” to get a better understanding of the model. For this I defined my own UML interpretation of the “Hyperledger Composer Modeling Language” with custom stereotypes.
Now the readme is now more detailed and contains more information, but is much bigger than before 😦 .
3. How complex was it for me?
I would say it is a good level for an advanced beginner, who has basic blockchain understanding and technologies like Docker, Node, and so on. I noticed that I need additional information to understand the composer in more detail.
Overall it was useful starting point for me to dig in this area without using a cloud instance, making blockchain with composer simpler. But I notice, I have to do some additional reading to get a better understanding of Hyperledger Composer.
The major learning point for me was getting a basic understanding of the composer model, the logic.js (which is the contract implementation for the blockchain), and using the REST API created inside the web application.
I hope this was useful for you and maybe it helps you to decide if it makes sense for you to checkout this pattern!
#letscodepattern #codepattern #blockchain #composer