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.
Full Stack Hello World Voting Ethereum Dapp Tutorial — Part 2
In Part 1 of this tutorial, we built a simple voting application in our development environment using testrpc. Now, let’s get this application on the real blockchain. Ethereum has 2 public blockchains.
Testnet (also called Ropsten): This is a test blockchain. Think of this as a QA or a staging server, it is used for testing purposes only. All the Ether you use on this network is fake.
Mainnet (also called Homestead): This is the blockchain which the entire world transacts on for real. There is real value to the Ether you use on this network.
In this tutorial, we will accomplish the following:
Install geth — the client software used to download the blockchain and run the Ethereum node on your local machine.
Install the Ethereum dapp framework called Truffle which will be used for compiling and deploying our contract.
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!
There is no doubt that the Ethereum blockchain platform is a game changer. There are lots of resources (articles, videos, platform documentation) about it, yet it’s still easy to get overwhelmed. Furthermore, many of them are outdated understandably because the platform is still evolving at a rapid pace.
It takes time to piece together and get a complete picture of what Ethereum is and how it works. Talking to developers in meetup groups and other online communities, it feels like there are many people who would like to get their hands dirty with this new technology but have the same issue. This article is our attempt at explaining Ethereum from a web developer’s point of view.
If you are a web developer, you know how a webapp with it’s client server architecture works at a very high level.