3

Is a DApp also hosted like web application. As i know that smart contracts are stored in the blockchain but what happened with the UI part?

4

You need to understand the difference between Ethereum clients such as geth, pyethap, alethzero, etc. and their available interfaces.

See the sketch below:

Local client (127.0.0.1:4000) ------> Local Eth client (http://127.0.0.1:8000) ------> Bootstrap node Eth client (eth://<pub_key>@<IPv4>:30303)

Where the local client is any (web3 code running in a browser, JSONs sent as arguments to command line tools such as curl, wget, etc.) application capable of sending JSON objects in POST requests through a socket to the local Ethereum client (listening by default on 127.0.0.1:8000).

Note that the application sending commands to the local eth client in JSON objects does not have to be running on the same box as the eth client itself. However, as of now, it is recommended since clients do not yet support mutually authenticated TLS tunnels thus being susceptible to MITM attacks.

The web3 (UI) code being written in Javascript can be easily integrated with a web front end thus making interaction with the eth client identical to that of web app.

  • 1
    You mean i can put all the code on web hosting server and inside that i can write the logic to interact with ethereum node & smart contracts using web3. – Aniket Aug 10 '16 at 10:16
  • Yes, the code is only Javascript. – Sebi Aug 10 '16 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.