What is Embark? dapp development using Ethereum
Embark is a framework used for developing and deploying DApps (Decentralized Apps) using one or more decentralized technologies. The tools and functionalities provided by the Embark make the DApp development process easy and productive. It reduces the interaction between the front end of application and smart contract so that the application can run faster on the network. The technology uses IPFS protocol to store and manage files across the decentralized network. ‘Whisper’ and ‘Orbit’ communication platforms streamline the communication process in Embark. The platform performs automatic deployment of smart contract and ensures the redeployment if the contract has undergone any changes.
Embark currently integrates with Ethereum, decentralized storages like IPFS, and decentralized communication platforms like Whisper and Orbit. Using embark, it is possible to manage different chains like testnet, private net, livenet etc. And the smart contracts in solidity and serpent can be built and it is deployable with Embark. The dashboard of Embark will provide the tracking information like the current state of the contracts, the environment it is using and what Embark is doing currently etc.
How to Install embark?
Prerequisites:
- geth (1.5.8 or higher)
- node (6.9.1 or higher)
Open the terminal and run the below-given codes
npm -g install embark
To run it on a simulator instead of a real Ethereum node, run the below-given code
npm -g install ethereumjs-testrpc
Creating a DApp with Embark
Generally, a typical DApp in embark consists of 2 sections.
1. Smart contracts
This section will contain the business logic of the DApp. It is written in either solidity or serpent
2. User Interface
The user interface through which the user interacts with the app
To create a DApp in embark simply run this code
embark new <DApp name>
This code will initialize a predefined template and creates a directory structure
Directory Structure
The default directory structure created by the above code.
myDApp/
|____app/
| |___ contracts/ //All smart contract files are placedhere
| |___ css/ //css files of the web page is placedhere
| |___ js/ //js files of the web page is placed here
| |___ index.html //this is the html file of the web interface
|
|____config/
| |___ development/
| |___ testnet/
| |___ blockchain.json //rpc and blockchain configuration files
| |___ contracts.json //ethereum contracts configuration files
| |___ storage.json //ipfs configuration files
| |___ communication.json //whisper/orbit configuration files
| |___ webserver.json //dev webserver configuration files
|
|____test/
| |___ contact_spec.js //contracts tests
|
|____chains.json
|____embark.json
|____package.json
How to run an embark DApp?
There are two options available to run a DApp.
1. Using a real Ethereum node.
The code will run the app on an Ethereum network.
embark blockchain
[keep in mind that at least 2GB of free RAM is required for smooth execution of above operation]… Continue reading on What is Embark? dapp development using Ethereum
Follow us on Twitter @Blockchain_E