Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 5.62 KB

pip-0008.md

File metadata and controls

76 lines (51 loc) · 5.62 KB
PIP: 0008
Title: Boilerplate Application
Authors: Atlantic Blockchain Company
- Keegan Francis (keegan@atlantic-blockchain.com)
- Mrugkakshee Palwe (mrugakshee@atlantic-blockchain.com)

Status: Draft    
Type: Protocol
Created: 2019-10-03

Abstract

The intention of a boilerplate application is to greatly accelerate the development of all future dApplications on the Peerplays Blockchain. This PIP shall articulate the business case, as well as the technical details and requirements necessary for the development of a boilerplate application.

We define boilerplate, as sections of code that are required in many locations, and those many locations are the multitude of dApplications built for the Peerplays Blockchain. Boilerplate code is useful to ensure that dApplication developers can focus on what they care about most, their dApplication.

The sections of boilerplate code are defined in the specifications.

In general, most of the above functionalities exist in the current dApplications ( Wallet, BookiePro, 50/50 Labs, RPS )

In order to reduce redundancy, and improve the strength of all future dApplications created for the Peerplays Blockchain, this PIP intends on providing a common codebase for all dApplication developers to use, and improve upon for the benefit of all developers.

Motivation

The barriers that exist for writing an application for the Peerplays Blockchain have existed for some time. Each of the existing dApplications have different boilerplate sections. Developers that create new boilerplate code for their dApplications are creating the wheel, and thus violating the common software principle of DRY (Don't Repeat Yourself).

Rather than have future dApp developers recreate common functionality, and risk mistakes, and wasted time, this PIP intends on providing the boilerplate dApplication code in an aim to create a thriving developer ecosystem. Developers need not start from 0% when creating a new application, because the first 20% of their application can be forked from the boilerplate code.

Rational

There are two reasons why this is an effort worth supporting by the Peerplays community and involved partners. The reasons are as follows.

  1. Speed up development time

    • Developers will not need to recreate important sections of code that exist within all Peerplays dApplication codebases.
    • Developers can optimize their process and work within a common base framework on which to build applications.
  2. Reduce Barrier to Entry

    • A potential barrier to entry is not knowing how to write the base, required boilerplate code. A developer may have an idea, but may not be able to execute because of their limited knowledge of the boilerplate requirements.
    • A reduced barrier to entry will entice new and existing developers to develop on the Peerplays Blockchain by offering an accelerated development experience.
  3. Increase Portability - An application is more portable to the Peerplays Blockchain in the event that domain specific boilerplate code is required for the application to function. - Developers are more likely to port, or build their apps for Peerplays in the event that they have an "application shell" that they can plunk their own application into, rather than learn, and build boilerplate code in order to function.

Specifications

The boilerplate will consist of the following functionalities.

1. Connection

Establishing a connection to one of the nodes provided by the witnesses of the Peerplays Blockchain. This aspect of the boilerplate will leverage the existing low-latency node chooser from the peeprlays-core-gui

2. Operation Handler

The operation handler will be the most complex aspect of the boilerplate, as well as the aspect that will need the most customization by future developers. The BookiePro dApplication has the most comprehensive operation filtration system of all the Peerplays dApps thus far. The filtration system in BookiePro will be modified, generalized, and extended for the newer 50/50 operations.

3. Log In / Key Storage

The login in and key storage functionality will be provided by the BookiePro dApplication. BookiePro has fluid and well put together key management systems.

4. Deposit / Withdraw / Transfer

The peeprlays-core-gui has decent functionality for deposits / withdraws / transfers. The boilerplate PIP intends on auditing the functionality, and improving it for generalized functionality.

5. Referral Code Injection

The BookiePro dApplication currently provides sufficient functionality for injecting referral codes into deployed applications. This functionality will be extended and generalized for future applications.

6. Electron

The BookiePro dApplication currently has a well defined development pipeline for packaging and deploying a electron Desktop Application for users.

Demo Application

A demo application, that uses the boilerplate code, will be included within this PIP as to ensure the utility of the boilerplate code. The demo application will demonstrate the newly added random number generator and 50/50 functionality in a Dice application.

Discussion

Summary for Voters

Copyright

See Also