A complete Practical Approach to Blockchain & Smart Contracts using Node.js - JavaScript & Solidity - Ethereum - web3.js
Blockchain is a transaction ledger that maintains identical copies across each member computer within a network. The interesting feature is that, once information is placed inside a block of the blockchain, the tampering or changing of it is impossible.
Governments and financial organizations have already invested millions of dollars into blockchain research and development and most of them have already implemented blockchain in financial services and record keeping.
Also, blockchain-based smart contracts are replacing conventional paper contracts and other promissory deeds. A smart contract is an electronic contract that can execute itself after the conditions mentioned in the contact is full-filled. Since it's also based in blockchain, once created, it cannot be tampered by anyone.
If you are a technology enthusiast or a programmer who wish to integrate blockchain in your applications, this is the right time to get yourself a thorough knowledge about the practical implementation of blockchain.
There are tons of material and books out there explains, the concepts, nuts and bolts of blockchain. But only a very few of them explains how it can be practically implemented.
In this course, I have taken extreme care to keep a 30 / 70 percentage balance between the theoretical concepts and the practical implementation respectively.
After this course, you will get a clear idea of how and where to implement blockchain in your existing software projects as well as your upcoming project ideas.
Here is the overview of the list of topics that I have included in this course
Before we proceed with the intense practice sessions, we will have the first few secessions in which we discuss the history and the basic concepts of blockchain distributed applications and smart contracts.
In Session 1, we will discuss the history of blockchain and distributed applications. Also, we will check the basic structure of a block. Which is the building block of the blockchain, which is a chain of these blocks.
In session 2, we will understand with the help of demographics, how these blocks are linked to form a blockchain and the major security measures in the blockchain which makes it this much secure.
In session 3, we will have a small discussion about the types of networks and the concept of cryptocurrencies like bitcoin which is built based on blockchain technology
In session 4, we will have an overview of what is mean by smart contracts based on blockchain and its working. Also, we will discuss the various fields of applications of blockchain at present and in the future.
And once we have enough basics about the concepts, we will jump directly into our first practical blockchain workshop. In which, we will build a working model of a conceptual blockchain out of simple JavaScript and JavaScript runtime called nodejs. Don't worry if you have only basic JavaScript knowledge, I will explain things very clearly that even a novice can understand and follow.
In session 5, we will prepare our computer by installing and configuring node js and visual studio code which will help us in developing the JavaScript blockchain
In sessions 6 we will create the class for a single block, which we will be using to create the blockchain.
And in session 7, we will create our first block in the chain called the genesis block.
In session 8, We will and the functionality to add new blocks so that we can create rest of the blocks
In session 9, we will test the block addition mechanism in our JavaScript block chain
and in session 10, we will implement hash verification, which is the most important security measure inside our blockchain.
In the next session 11, we will include an additional security measure called proof of work to prevent the quick tampering attempts of our JavaScript block chain.
In session 12, we will implement the concept of mining rewards for the minors who mines and validate new blocks for our JavaScript block chain.
And that's all with our simple JavaScript conceptual blockchain application and from the next session onwards we are going to get our hands dirty with some serious business using the actual ethereum blockchain network. In the coming sessions, we will create an ethereum based blockchain and deploy our smart contract within the ethereum blockchain network. For your information, ethereum is the worlds most popular open-source public blockchain platform.
So in session 13, we will be getting our systems ready to build our ethereum blockchain by downloading and installing the dependencies which include nodejs, ganache, metamask solidity language, the truffle framework and sublime text editor for coding.
In session 14, we will configure these dependencies and we will do a basic test to make sure everything is ready to proceed with the development.
We will start building our blockchain smart contract project out of solidity and ethereum. This project is a simple contest application, for finding out the best actor, with two contestants Tom and Jerry. We will have to build a blockchain-based app to find who is getting the maximum viewer support.
In the next session 15, we will create the model and class to use for every contestant in the project and we will include tom and Jerry as contestants and
In session 16, we will fetch the contestant list using web3js, which is the library used to interact with the blockchain.
Since smart contract can be created once and cannot be altered, the testing procedure should be done strictly before deploying it into the blockchain network. If any mistake or bug, the only option you will have is to remove the existing contract and deploy the new one instead, which is very time consuming and inconvenient. So In session 17, the blockchain will be tested by using the truffle framework's testing environment by emulating the transaction of creating users.
Till now, all the blockchain interaction happens over the node js command-line interface and the truffle framework command line. Now its time to make it appear to our customers or on-line users in an attractive web-based front end, using a web page. To proceed with that, we will create the HTML part of the front end application in session 18 and session 19, we will include the JavaScript part of the simple and beautiful HTML page we created and we will list the contestants in our best actor contest to the public by running the lite-server which comes along with the truffle framework.
In session 20, in addition to the contestants listing functionality, we will add the voting functionality also to our blockchain smart contract.
Since the members and non-members of the network may use the voting app, we need to thoroughly check for the conditions and rules we implemented in the smart contract. We will test the functionality until now using the truffle framework testing mechanism in session 21
In session 22, we will include rules and restrictions for our best actor contest. Rules like a user can vote only once and the user cannot vote for any non-existing contestants.
Till now the voting can only be done via a command line. In session 22, in our simple web interface, we will include the functionality to cast vote to any contestant from our web page.
And in the final session, we will create an event watch which will listen for the event of voting and once the voting is done, it will refresh the page and fetch data from the blockchain network so that the winner of the contest can be known every then and there.
Even though these are sample projects, it will surely give enough insight to your mind about how the blockchain can be included in your web or mobile projects. This course will also give you enough knowledge to get yourself ahead of others in the blockchain race which has already started.
After successful completion of the course, we will provide you with a course completion certificate which will add much value to your career as a developer, software engineer or as a software architect.