Building dapps on Chromia
A decentralized application, or dapp, is software comprised of various components that collectively serve a valuable purpose for its users. A portion of its functionality is decentralized, and you can use it without relying on a single company to control it.
On Chromia, these dapps have two main parts:
- The user-facing side: This is what you see and interact with, like the buttons and screens. It's like the storefront of your dapp.
- The decentralized backend: This is the core that runs on a special database called a blockchain. It is where the real magic happens, ensuring security and transparency.
To build this backend, Chromia has its own language called Rell. Think of Rell as a set of tools designed to build dapp backends on Chromia.
The structure of a decentralized app built in Rell resembles the following:
In Rell, developers handle requests through two types of actions:
- Data-modifying requests (Operations): These operations modify the database state.
- Data-retrieving requests (Queries): These are requests for retrieving data.
Relational operators play a crucial role when dealing with both requests, allowing developers to leverage the power of relational programming idioms.
To learn Rell from the ground up, consider taking the Rell Masterclass.
Once you've developed your dapp, you can quickly deploy and update it to Chromia's public testnet or mainnet. The deployment process is straightforward and well-documented, allowing you to bring your decentralized application to life on Chromia's blockchain network.
But how does the user interface connect to this backend? Chromia provides a postchain-client that enables you to connect the frontend of your dapp to the decentralized backend running on Chromia's blockchain network. This client library allows you to send transactions and retrieve information from a blockchain node running Rell.
You can choose from the following client libraries to interact with their dapps:
Library | Description |
---|---|
JavaScript/TypeScript | The JavaScript/TypeScript client library, known as postchain-client, provides functionality for interacting with a blockchain using JavaScript or TypeScript. |
Kotlin | The Kotlin client library, postchain-client, can interact with a blockchain from a client app written in Kotlin or Java. |
C# | The client library, known as postchain-client, provides functionality for interacting with a blockchain using C#. |