Building a blockchain business network with Hyperledger Composer

Building a blockchain business network with Hyperledger Composer



we've created a brand new application and we've done it using a you know whole raft of open-source tools we modeled the nature of our business network using this composer modeling language and domain-specific language for describing the nature of business networks you know that's that's technology that that we built for composer we wrote our business logic in JavaScript so I don't have to learn a brand new programming language just because I'm doing blockchain development you know I get to use the what is now the most popular programming language on the planet which is JavaScript so right my friends up front-end may be to write my mid tier but also to write the logic that's running on the blockchain itself I get to use the web playground to kind of do that ideation and to very quickly prototype composer solutions I have a whole set of client libraries that I can embed in my applications if I want to you know have programmatic access to composer solutions and that could be programmatic access because I'm creating a client application or it could be programmatic access because I'm I'm doing some sort of advanced that administrative utility so there are two main NPM modules that that we develop composer client and composer admin depending on you know what kinds of API you're looking for we haven't had time to show you but there are plugins into both Adam and Visual Studio code so particularly when you're editing the models it can be very nice to bring them into a traditional code editor and you can do all of your composer developments in a code editor these are just text files on disk and they're very easy to add edits in you know Emacs or IntelliJ or you know whatever editor you happen to like a rich set of CLI utilities that allow you to deploy networks on deploy networks create network archives generate sample applications you know generate rest API is from a network there's really a lot of stuff there the code generation we just saw and we we saw you know a couple of the ways that you can start to integrate with existing systems and data and one of the major ways that we do that is using this loopback framework and using open API swagger API to describe the interface into the into the blockchain network itself so let's quickly switch back and see whether our application has finished installing yes it has so I'm going to CD into my the Dan Bank app and I'm going to run NPM start and this is just simply starting that generated angular application so it's going to do a bunch of web packing stuff just to bootstrap the application and then we can we should be able to go to localhost 4200 and sure enough we see the the aptly generated application which is kind of a skeleton right it's not supposed to be a finished application it's really just guiding you in in you know how to use our API sand how to pull these things together but at the top right we've got an assets drop-down and we have a single account asset type in this network which is an account and if I click on the account drop-down you can see that the angular component that we've generated is dynamically pulling in the accounts from the fabric from the blockchain and it's doing that by going through that composer REST API server that we stood up a moment ago so I can even update the balance you know of our customer here and submit that as a change and that's that change would have been submitted back onto the blockchain so you can you know you can give this to your web developers and they can start to hack – you know to build that next generation mobile experience or whatever it is that you you're trying to build for your your banking application so thank you very much I hope that was informative please please join us in the hyper ledger composer community you know we're very friendly come and find us on rocket chat engage with us and have fun using composer thank you

1 Comment

Leave a Reply

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