CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
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.
When Bitcoin was gaining ground as a breakthrough in cryptocurrencies in 2011, one of the earliest people to embrace the innovation was a 17-year-old coding and mathematics prodigy named Vitalik Buterin, a university student and a blogger at the time.
Full Stack Hello World Voting Ethereum Dapp Tutorial — Part 3
In Part 1, we built a simple voting dapp and got it working on our local machine. In Part 2, we moved our app to use truffle framework and deployed it to the public Ropsten testnet and interacted with it through the truffle console and through a webpage. In this tutorial, we will add few more features to our voting dapp in order to learn a few key concepts. Here is what you will learn in this tutorial:
Learn to use new data types like struct to organize and store data on the blockchain.
Learn the concept of tokens and its usage.
Learn to make payments using Ether, the currency of the Ethereum blockchain platform.