top of page

3 tools you should use when you start to develop on Hyperledger Fabric

When you are interested in starting to develop on Hyperledger Fabric you don't need to spend hours searching and learning new tools as you may have in other technologies. Many developers, who I spoke to are not sure about how and where to start in their blockchain career, which results in losing motivation. Well, to reduce your searching and learning time I will propose you with the right toolset for your start.


This article will show you three tools I used when I started my journey in Hyperledger Fabric. Of course, there will be maybe other tools as well where you may have a better experience with but for someone who just started, this will be a great point to begin.


1. Powerpoint - The right tool for planning the road before you code anything


This tool is one of the most underestimated visualizers I worked with during many software development projects. In the world of Hyperledger Fabric, it helped me a lot to structurize my thoughts before I set up any infrastructure and implement any smart contract. When I build a solution from the scratch I always draw the architecture for the organization and the breakdown of the chaincode.

In the beginning, you can start to draw an organization architecture. Don't overthink this step and try to stay as high-level as possible. You only need it for identifying which environment variables such as ports, credentials, etc. are relevant to set them for each organization individually. This will be necessary for writing the .yaml files much faster and with less failure.


Another drawing is the breakdown of the use case for developing your chaincode. You should start with a process you want to map in chaincode and this has to be broken down into pieces like assets, transactions, and permissions. Again, the following drawing is just an example and based on a real estate case.

Assets can be everything you can create, update, read, or delete in a transaction. In our example, the real estate could be used as a digital asset or the digital contract between participants if organizations are sharing information about it.



The visualization can differ whatever fits you. In this example, we split transactions into writing, reading (query), and automated steps. The writing part is straight forward. We basically mapped one transaction to each process step (first row) and defined the asset which will be saved into the ledger. The transactions for querying information (second row) from the ledger can contain data from several process steps and should be readable to organizations that are allowed to read them.


If I sell a real estate to my customer the writing transaction can be called sellEstate. This function will write new information into the blockchain and modify the state of an asset (real estate) from i.e. Available to Sold. If we query Information about real estates such as showSoldEstates then the information will be shown to the queried organization without creating a new block.


The key feature of smart contracts is the automated trigger functionality which invokes certain business logic based on requirements that will be met during a transaction. Therefore on each process step, you also need to identify the automated process which will be triggered through other transactions. In the visualization, the function linkcontract will be triggered after selling is completed and assigns the created contract between customer and agent to the real estate object.


The third information you can extract from the picture is permissions. With permissions, you will figure out which organization should be able to do transactions for modifying assets. The visualization shows which organizations or participants in the blockchain can invoke the transaction.


2. Kitematic - Your visualizing partner for good and bad times


Kitematic is a tool for visualizing your running docker container. For beginners, it will help them to start in Hyperledger Fabric and inspect your network with a simple user interface. Kitematic shows the logs of each container with some easy clicks and allows you to connect directly to the container for further adjustments.


When you configure your environment it is likely that you will face some errors during container creation and have to inspect them. This is easier and faster to do it on Kitematic rather than on the basic Command Line Interface.


Also, it was very helpful to inspect the volume of each container because for chaincode installation or upgrading, it is necessary to mount the source code into a container and with Kitematic you can do that easily per drag and drop.


3. Visual Studio Code - A longterm relationship where you can rely on



For developing software you most probably have to choose an Integrated Development Environment (IDE) of your trust. Visual Studio Code became my longterm partner because it made my journey in Hyperledger Fabric so much easier.


There are several extensions you can install and use but I want to highlight the IBM Blockchain Platform Extension. This extension helps you to run or connect to a local or remote Hyperledger Fabric environment to deploy and interact with your chaincode in a simple way. With Visual Studio Code you can easily test your code because you can invoke the functions directly from the extension. It saved me a lot of time because I didn't have to upgrade the chaincode in my environment for each change through the CLI.


I believe a more deep dive into Visual Code Studio would be helpful and will be created a new article. So, based on your feedback I will post for this topic in a more deep-dive article.


Conclusion


With these three tools, you are able to start your journey. Powerpoint will support to visualize your thoughts, to structurize your work, and break it down into smaller tasks. Kitematic is making your life easier with managing containers of Docker. You can work with it in a simple way instead of typing all commands in the CLI. My best friend Visual Studio Code will support you with debugging and testing your chaincode before you deploying it into a production environment.


These tools helped me a lot and they will also serve you. Also, I would appreciate any feedback. Please let me know if you like or dislike this blog post. See you in the next article.

I believe a more deep dive into Visual Code Studio would be helpful and will be created a new article. So, based on your feedback I will post for this topic in a more deep-dive article.

123 Ansichten0 Kommentare

Comments


bottom of page