Ethereum for Web Developers

Source: Internet
Author: User


I've been studying ethereum blockchain for some time now, and this really makes me more excited. There is a lot of information about Ethereum (articles, videos, platform website), which we can easily get, because the platform is still fast iterative so the relevant data content generally lag. I've compiled a diagram of what ethereum is and how he works based on what he learned. People who want to learn about these new technologies in the Developer forum and online community also encounter a lot of problems while learning. This article attempts to explain Ethereum from the perspective of a web developer. If you are a web developer, know how to architect the WebApp client as well as the server.



You have a Web application hosted on a hosting server, like Aws,heroku,vps, and all clients communicate through a central application. The client can be a Web browser, or other API that consumes your program. When a client initiates a request like a service, the server will drink the database to communicate like magic, and then the database can be changed and then the corresponding client requests.   This structure works well in most cases, but if the database is publicly accessible to anyone, there are some apps that can be useful so I don't have to rely on the webapp to get my own personal data, which means I can get my personal data from other sources.   The following examples: For example, ebay, if you are a super seller, has gained hundreds of praise. Ebay has blocked your account for some reason. It's a bad thing that can seriously affect your business. It would be a great thing if you could transfer this hundreds of to other platforms (ebay's competitors). ebay provides a third-party trust service between buyers and sellers. And both buyers and sellers will be charged a commission. Is there a way for buyers and sellers to completely ignore ebay when trading, so that both parties can save commission while you have access to your trading data? This is what the following image suggests for the de-centric application. Ethereum makes it easy to create dapps (de-centralized apps).   Below is a high-level view of Ethereum Dapp: Do you find that every client communication uses its own instance of the application. None of the clients are linked to a centralized server on the server. This means that every person who wants to interact with a central application needs to have a complete copy of the blockchain on their computer or mobile phone. This means that before you can use the app, you need to download the full blockchain and start using the app. The first time I heard it was ridiculous, but one of the benefits is that there is no need to rely on a centralized service, and this centralized service may not exist tomorrow.   In reality you don't need to spend a lot of memory and hard disk to download the full blockchain. There have been some workarounds or optimizations for the application to be centralized to ensure that the interaction is convenient and fast.   Now what exactly is a blockchain? It contains: 1,database (database): Every transaction that occurs on the Ethereum network is packaged into a block, and each chunk is connected to the next block. The block chain is a series of blocks that contain all the transaction data connected. If we go back to the example of ebay just now, both sellers, refunds and disputes will be recorded on the blockchain and can be seen by everyone. To ensure that the network node has the same copy of the information on the Ethereum network,and to ensure that the data is written in this database (chunks of blockchain), Ethereum uses an algorithm called proof to do the job.


1,(Http://ethereum.stackexchange.com/questions/14/what-proof-of-work-function-does-ethereum-use)

2,code: The database portion of the blockchain just stores the data, but where is the logic of the operation like buying, buying, canceling, and refunding? In the Ethereum world, you can use a language called solidity to write application (contract) code. You can then use the solidity compiler to compile the code into an ethereum binary file, and then deploy the binary code to the blockchain. In addition, there are few other interactions with solidity, but solidity is the most popular development language in the current development contract. So fundamentally: The blockchain stores the data, stores the code, and runs the code in EVM (Ethereum Virtual machine). Build web,ethereal based on Dapps There is a handy JavaScript package called Web3.js, which can be connected to your blockchain contacts. So you need to introduce this package in your JavaScript framework (REACTJS, ANGULARJS, etc.), and then you can start building the app.another big and important aspect of application is the financial capabilities of the platform. What would you do if I told you that you had a built-in bank account when you were using Dapp? In fact not a bank account, you can create multiple accounts within a minute. These bank accounts are called wallets, which you can use to save money (used in the Ethereum ecosystem's currency) and trade. There are a lot of internal details about the blockchain that I deliberately left behind because I wanted to focus on comparing the blockchain-based Dapp with the webapp of the hub. Hopefully this article will be a good illustration of what ethereum is and how to build a hub-and-go application. I have now written 3 tutorials to build a full stack of Dapp   Part1 Part2 Part3Extended reading:
    • 1,for in depth details about how Ethereum works can read the Ethereum white paper.
    • 2,more about the solidity language solidity language
    • 3,for all questions, for course you have Ethereum Stack Exchange
    • Super helpful community at Gitter:4,https://gitter.im/ethereum/solidityand 5,https://gitter.im/ethereum/web3.js


Ethereum for Web Developers


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.