Adding structure with CDL
For many simple CorDapps, including the ones in the Corda example repos, you may not need a special way of representing CorDapp designs. If you have a simple state, with a single implied status and only one or two commands, you can probably just write the contract code, which will fit on one screen, and see exactly what’s going on.
However, if you want to do anything beyond a basic proof of concept, things are likely to get more complicated, especially if you are writing production grade CorDapps that need to deal with many different scenarios.
As complexity increase it quickly becomes difficult to ’think in code’ and the corresponding risk of making mistakes goes up. The primary benefit of CDL is that it provides a level of abstraction that allows you to think about more complicated designs without having to hold all the details in your head.
The way the abstraction works is to split the elements of the Smart Contract design into a standard set of considerations, such as:
- What’s my state data?
- What different statuses can the data be in?
- Who are the participants for each status?
- How can I move between each status?
By splitting the design process into these different predefined considerations, you can add structure and robustness to your design thinking. Providing a standardised way to represent each of these considerations in a neat single-page view further empowers you to communicate and reason about the design.
Defining standardised ways to implement and test each consideration can increase confidence in the faithful implementation of the design.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.