Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyperledger Composer vs Hyperledger Nodejs Api

I am new to hyperledger and bit confused about hyperledger composer & nodejs api. I saw using composer we can create assets, transactions, participants and chaincode and in last we have to archive it this all into .bna file and finally we deploy this chaincode into network using admin card

But at other end using NodeJs API we can also write chaincode by overiding init & invoke methods.

How can we relate these all.

like image 791
zubair Avatar asked Dec 14 '22 17:12

zubair


1 Answers

The best way to think about this is the following:

1) Hyperledger Fabric v1.1 supports writing chaincode in two languages: Golang and JavaScript via Node.js

If you want to do all of the heavy lifting yourself, you can write straight chaincode.

2) Hyperledger Composer provides a higher-level model-driven language for developing smart contracts. It currently only allows deployment of these artifacts to Hyperledger Fabric. It also happens to support writing functions in JavaScript as well.

So if you want to start from a higher-level model-driven approach, Hyperledger Composer is the way to go. If you want to write all of the plumbing yourself or use very low-level chaincode features, then using chaincode itself is the way to go.

Moving forward, we are looking at a better way to move between the two and not force a decision / direction up front.

like image 100
Gari Singh Avatar answered Feb 03 '23 20:02

Gari Singh