Make the apps of tomorrow with blockchain technology of today

The introduction and enforcement of GDPR, the ever-changing rapid evolution of the software-development eco-system and the rise of blockchain technology; how can developers of today take advantage of the technology that will shape the (IT) world of tomorrow?

Artus Vranken
wearetheledger
7 min readJun 6, 2018

--

https://github.com/search?q=Blockchain+created%3A%3C2018-06-05&type=Repositories

On the 31st of October, 10 years will have passed since the publication of the bitcoin-whitepaper. In that timespan, blockchain has become the next big thing, some people even referring to it as an invention which impact will match that one of the invention of the internet.

Although different cryptocurrencies (1565 different ones, and growing, as of 10 April 2018!) are a big part of the blockchain ecosystem, for developers the real power lies in the possibility to implement decentralized software instead of developing stacks the old way; Decentralization matters. In this article, we will look at some development stacks to get you started with developing applications that run (mainly) on blockchain technology.

Every stack will need a UI layer, mostly a front-end framework. I’m not going to impose a specific one, there are already enough technology related wars.

Traditional development stacks

You’ve probably heard about LAMP or MEAN, which are great development stacks… if you’re building centralized apps. Don’t get me wrong, centralized apps are great too; You wouldn’t build your personal website on a blockchain platform such as Blockstackor would you?

https://codecondo.com/mean-stack-vs-lamp-stack/

If you are trying to get accustomed to using blockchain technology, the amount of options to explore is astounding. And confusing. The field of blockchain is a wide one, so you’ll have to look for a technology that fits your purpose.

One thing to keep in mind that data on a blockchain is immutable, so never push personal, sensitive or data covered by GDPR on a blockchain network!

Some different blockchain technologies

There are a lot of blockchain platforms that you can integrate into your app, and each has its own benefits and/or purpose. There are a lot of differences between blockchain platforms. One difference is some platforms are public and some are permissioned. A public blockchain is a blockchain network that anyone can connect to, as opposed to a permissioned blockchain is a blockchain network where each node needs to be authorized by the network to enter.

https://www.bigchaindb.com

BigchainDB

BigchainDB is a great technology for beginners to get accustomed with integrating blockchain in your app. If you want to know more about BigchainDB, checkout my article! BigchainDB focuses on assets and transactions. An asset is any object you want to store on the blockchain. By using transactions, you can update the ‘state’ of the asset by appending new information. They have great documentation and a lot of drivers to interact with a node. You can find resources on getting started with BigchainBD here and here.

Image result for hyperledger
https://www.hyperledger.org/

Hyperledger

Hyperledger is not one big blockchain platform but actually a collection of blockchain frameworks, like fabric or sawtooth, with each their own special purpose or focus. Hyperledger Fabric is a platform where you can write Turing-complete chaincode to create enterprise applications. Sawtooth’s focus lies more on supply-chain. Choose whichever fits your needs, do some research and get started!

https://www.blockstack.org

Blockstack

Blockstack is a collection of technologies that aim to bring you the decentralized internet of tomorrow. On the blockstack network, each user has complete control of all his or her own data. Another great advantage of Blockstack is that the technology handles all data storage and authentication/authorization, so you (the developer) can focus on making your app great. It also has great documentation and a whole collection of tutorials to get you started.

https://ipfs.io

IPFS

The InterPlanetary FileSystem is actually not a blockchain, but it’s a great candidate for data- or file storage in combination with a blockchain platform. It can be compared to the P2P BitTorrent protocol, where peers share files in a decentralized manner. The documentation and examples are on point, probably the reason that there are already some great apps built on IPFS, like DTube.

Image result for ethereum
https://www.ethereum.org

Ethereum

If we’re talking about decentralized apps, god forbid I forget to talk about Ethereum. It’s designed especially for developing Dapps, by deploying smart assets, which are pieces of code that run in a decentralized way on the Ethereum network. They even created a new programming language, Solidity, for writing these smart contracts. Read the documentation and start writing Dapps by looking at the example here!

Blockchain development stacks

By combining different blockchain platforms or technologies you can create powerful development stacks that will help shape the internet of tomorrow. We’ll look at some example stacks that can help you kickstart your journey into decentralization.

A decentralized development stack by BigchainDB.

Blockchain stack for beginners

A traditional app consists of several different layers; Generally, you’ll need/use a UI layer, a back-end layer, and a data storage layer. When developing a decentralized app you’ll probably use the same layers, but some layers will be replaced with a decentralized or blockchain related technology. Luckily, we’ve seen a technology that provides an (almost full) stack that you can use in a lot of projects: Blockstack!

This stack is great because you don’t need to write code to integrate a lot of different technologies together. You just design the UI and write the logic that will store and retrieve data from the Blockstack storage layer.

  • Front-end framework for UI and business logic
  • Blockstack for all underlying layers

Blockchain stack for working with personal data

Sensitive personal data can never be stored on a blockchain because data on a blockchain is immutable and this could pose some serious issues related to GDPR. The fines for GDPR related infringements are as high as “ up to €20 million or up to 4% of the annual worldwide turnover of the preceding financial year in case of an enterprise”. Yikes!

Therefore, we can prevent infringements by storing sensitive personal data outside of our blockchain network, and refering to the files/data by its hash on the blockchain. This way, we still provide the trust and certainty ensured by blockchain by looking at changes in the hash of the file.

  • Front-end framework for UI and business logic
  • BigchainDB or Hyperledger for storing hashes of data or files
  • Separate storage where data can be updated and/or removed

Blockchain stack for large files or huge amounts of data

Blockchains are great, but there is some overhead. Therefore, it’s generally considered not a good idea to store large files on a blockchain network. We can solve this problem in the same way that we solved the personal data issue previously, but this time by using IPFS; We store files on IPFS and reference them by hash on our blockchain network. This time we aren’t using GDPR-sensitive data, so we can store our files or data on IPFS. This way, our app is still a bit more decentralized than when using a regular storage server.

Blockchain stack for public use with permissioned blockchains

When writing business logic in a front-end application, all your code is exposed. This makes for some security risks when interacting with permissioned blockchains, as authorization information could be intercepted. A possible solution to this problem is to separate the UI and the business logic into 2 layers, which could interact using HTTP or other protocols. The back-end, which is securely quarantined from the outside world, can then interact with the permissioned blockchain network.

  • Front-end framework for UI and interaction with back-end
  • Back-end Rest API (Express or Spring boot are a few examples)
  • (Permissioned) blockchain platform

Everything is up to you

These example stacks are just some guidelines for beginners or developers that are looking for a way to create decentralized applications. The possibilities are endless, and each business case could make use of countless development stacks to provide a stable solution. Some aspects to keep in mind when choosing a development stack are:

  • What is the scope of the project?
  • What budget is available?
  • When is the deadline (if any)?

And perhaps the most important question:

Still not really sure on how to approach the blockchain? At TheLedger, we provide everything that is necessairy to get you and your business started with blockchain technology. Don’t hesitate to contact us, we don’t bite. Let’s talk.

--

--

Artus Vranken
wearetheledger

I'm a developer, passionate about coffee ☕️ and IT 💻. Follow me on GitHub 👉 https://github.com/artus