Full Stack Hello World Voting Ethereum Dapp Tutorial — Part 1
In the last post, we explained the high level architecture of Ethereum platform comparing it to a web application. As a developer, the best way to learn any new technology is by diving in and building toy applications. In this post, let’s build a simple ‘Hello World!’ application which is a Voting application.
The application is extremely simple, all it does is initialize a set of contestants, let anyone vote for the candidates and display the total votes received by each candidate. The goal is not to just code an application but to learn the process of compiling, deploying and interacting with it.
We have deliberately avoided using any DApp frameworks to build this application because the frameworks abstract away lot of the details and you fail to understand the internals of the system. Also, when you do use a framework, you will have more appreciation for all the heavy lifting the framework does for you!
When several smart contracts are working in harmony, they can produce complex outcomes in a strict and exact way as programmed by the creator. When this happens, the group of smart contracts can be referred to as a decentralized application, or dApp.
To find out what the blockchain can enable us to do, it is important to note that the Ethereum blockchain gives us three types of dApps.
Money based applications allow us to trade in money, transferring it from wallet to wallet, peer to peer, at a fraction of traditional costs.
Applications that involve money allow for the transfer of other types of data, including records, licenses, certificates, etc. in exchange for that money.
Other applications that do not necessarily involve the transfer of money but can give absolute provenance and security of other types of assets are also possible — for example, government systems like voting, opinion polls, and surveys.