DEV Community

Cover image for A gentle introduction to dApps in 2022
Pavel Tantsiura
Pavel Tantsiura

Posted on • Originally published at Medium

A gentle introduction to dApps in 2022

What happens on blockchain, stays on blockchain…and so does your dApp.

In the cryptoverse, Bitcoin tends to guzzle all the limelight. But little did we know that Ethereum will not only overtake Bitcoin but also revolutionize the way we build and use applications.

dApps or decentralized apps have become that trailblazer which is accountable for a new type of software. According to the statistics, dApps are now gaining traction with over 3900 applications that account for 913.28k transactions. These positive dynamics make decentralized apps a lucrative business opportunity to tap into.

So, today, I’d like to tell you more about this hyped beast and whether you should jolt into building one for your business.

A Primer on dApps

First things first, let’s flesh out the definition of dApps in case you haven’t heard of it yet.

Well, dApps are decentralized applications that rely on a blockchain. They are similar to apps, but instead of being hosted on one centralized server like Google Play Store or the Apple App Store, they run on a decentralized network of computers.

Ethereum is considered to be the industry-standard protocol for building this type of application since Ethereum was designed to accommodate smart contracts. The latter constitutes a salient part of dApps and facilitates automatic transactions if certain conditions are met without a third-party entity.

Smart contracts — self-executing contracts that can be completed or executed when certain conditions are met. They operate independently and transparently to the outside world. It is potentially a cheaper, faster, and safer alternative to conventional contract law, lawyers, notaries, and other third parties.

What’s the big deal? Well, smart contracts remove the need for a third party to handle and secure transactions between peers. This translates into a faster run, enhanced security, lower costs, and more accuracy. And now imagine that you have it all conveniently packed into a dApp.

Ethereum coin
By David McBee: Pexels

How is dApp different from traditional apps?

All hype aside, there should be something that puts dApps on a pedestal over common mobile solutions.

Just to be clear, a dApp is just like any other software application you use — be it an iOS app or a website. However, its differentiators come from Ethereum, and that is decentralization. The latter stems from smart contracts that are hosted on multiple computer nodes all across the world.

Therefore, Ethereum smart contracts serve as the backend for dApps, which is another differentiator from traditional applications. In layman’s terms, a smart contract replaces a server-side component present in a traditional app. However, once you deploy it, there’s no way back. It can only be deleted to introduce any changes you need.

Also, mind that a large monolithic smart contract isn’t a one-size-fits-all option, since it comes with huge deployment costs. That’s why some developers have an external data source (yes, it kinda makes your dApp centralized).

Now let’s have a look at the Ethereum-specific code. In most cases, developers would use Solidity, Serpent, and Vyper programming languages. Below is an example of a ‘Mission complete’ smart contract in Solidity.

pragma solidity ^0.8.10;
contract MissionComplete {
function printMissionComplete () public pure returns (string) {
return ‘Mission Complete!’;
}
}

Here, your Dapp can execute the code in the smart contract by calling the function printMissionComplete().

As for the frontend, there is no specific language you need to master to make an interface for your dApp. You can use a surefire combo of HTML, CSS, JavaScript, etc or an equivalent stack.

Standard frontend+smart contract backend = Dapp

Why Use dApp as an alternative: Main benefits

When weighing the cons against the pros of decentralized applications, you should never confuse the starting and ending points of innovation. dApps are still at their infancy stage, hence the majority of their current shortcomings can be eliminated in the future.

As for the benefits of using dApps over traditional apps, these include:

  • Enhanced security — Along with its decentralized nature, a dApp is secured with cryptographic tokens to access the application. Also, thanks to blockchain, dApps are inherently able to keep hackers at bay since all of the hosts must approve of the change.
  • Unrivaled data privacy— Information is stored as multiple encrypted copies, while the owner of the key has exclusive access. This prevents the information from being stolen or misused.
  • Zero downtime— Once the smart contract is on the blockchain, your dApp is infallible (unless Ethereum goes down or something like that.)
  • Cost of development— although it’s an arguable advantage, dApp development doesn’t incur regular spending such as cloud server fees, or maintenance costs. The cost includes contract deployment (which is still impressive), while dApp users pay for all transactions linked with your contracts.

However, it’s not all butterflies and rainbows for decentralized applications. First of all, it’s hard to maintain dApps due to their blockchain-based nature. Also, the Ethereum platform is open about the potential performance overheads of its applications. According to Ethereum itself, there is around 1,000,000x overhead of standard computation currently.

Nevertheless, dApps are in vogue because of their capability to integrate with decentralized finance and yield services which used to be accessible to affluent investors exclusively.

How to build dApps on Ethereum

Decentralized applications have smart contracts as their backbone. The latter is powered with code written in special programming languages. For example, Ethereum has the Solidity smart contract language, while the Waves blockchain platform has RIDE. Hence, dApps can run on top of distributed computing systems such as Ethereum or Bitcoin, while also being stored and executed on a blockchain system.

I will not go into the specifics of building a dApp since it should be made as a standalone post. Instead, I’ll chart out the general recommendations for building a decentralized solution:

  1. Create a smart contract, i.e. write your code in Solidity ( it will connect to the client-side of the application). Here, Remix is usually used as an IDE for your Ethereum-friendly and smart contract development.
  2. Connect your IDE to Ganache. The latter is an Ethereum simulator that allows you to test your smart contract on a real-like blockchain.
  3. Take care of the front end. You’ll need a user interface to interact with your blockchain. A popular pick for this is Web3.js, which is a JavaScript library from the Ethereum foundation.
  4. Test the application. Along with common testing types, you can also include smart contract testing as well as transaction testing.
  5. Deploy your dApp on IPFS. The latter is a distributed system for storing your application.

dApps as a driver of Web3 in 2022

In the 2020s, the news about the potentially disruptive internet iteration has blown up the tech community. Web 3.0 is this headline grabber that makes a slew of promises, including uninterrupted service, no central authorities, and data ownership.

It is heralded the third generation of the Internet, where blockchain technology will play a salient role. The latter will lay the ground for a more autonomous Internetverse, meaning no single entity will govern it.

Decentralized applications are also predicted to make the backbone of Web 3.0 by promoting accessible Internet for every user. Web3, in turn, will enable dApps to replace censored centralized social networks, while allowing users to maintain ownership over their data and be compensated for the value they provide.

But all hype aside, it doesn’t matter whether Web 3 will supplement the current digital generation. The core blockchain technologies that power Web3 and dApps are real and powerful and made for the new generation of development practices.

Some dApps have already demonstrated their potential and raised their profiles as a lucrative investment opportunity. Let’s see the most popular ones:

  • Minds: a social media platform that improves value transfer between content creators and consumers.
  • Raydium: Solana’s top decentralized exchange that provides next-level liquidity, and frictionless yield farming.
  • Golem: first decentralized marketplace for computing power combined with flexible tools to help developers securely distribute and monetize their software.
  • Steemit: is a blockchain-based blogging and social media platform that rewards its users for both posting and creating content.
  • Audius: a blockchain-based streaming platform that allows artists to create unique content with a completely unchanging date and time. As you see, dApps can come in numerous flavors — anything from P2P lending services to engaging games to social networks.

The Final Word

Just like anything else in blockchain, dApps are wrapped in myths and legends. However, as they gain more traction and rationale, the stigma around dApps is vanishing. By developing a decentralized application, you can tap into a less-competitive market that is secured for the future.
As for the viability of these solutions, it doesn’t matter whether we’ll have Web 3 as the main Internet version. Today, it’s clear that both realities can successfully coexist together as decentralization is swelling in popularity. Therefore, no matter the future of Web3, dApps will remain as the viable alternative to traditional applications.

Latest comments (0)