Browse Source

feat: draft proposal for interactive tour

feat/clarity-interactive-tour
Ludovic Galabru 4 years ago
parent
commit
d6afe99456
No known key found for this signature in database GPG Key ID: 5DF6EC48EB679736
  1. 83
      src/pages/smart-contracts/interactive-tour.md
  2. 3
      src/pages/smart-contracts/overview.md

83
src/pages/smart-contracts/interactive-tour.md

@ -0,0 +1,83 @@
---
title: Interactive Tour
description: Learn the basics of Clarity.
duration: 18 minutes
experience: beginners
tags:
- tutorial
images:
large: /images/pages/hello-world-app.svg
sm: /images/pages/hello-world-sm.svg
---
## Introduction
In this section, you learn about Clarity language reference. By the end of the tutorial, you will be familiar with:
- Functional programming basics,
- Control flow functions,
- Primitive data types,
- Response and optional types and associated control flow,
- Arithmetic and Logic functions,
- Bounded collection, data types and functions,
- Cryptographic functions,
- Environment functions,
- Tokenized data and associated functions,
- Inter Contract Communication functions,
- Clarity best practices.
This tour is powered via Jupyter notebooks. Each section above is a chapter that can be studied, independently from the others.
## Basics
In this chapter, we will dissect some hello world programs and learn the basics of Clarity and its functional programming syntax. We will learn how to define a function and the fundamental control flow functions.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-01.ipynb)
## Data types
In this chapter, we will gradually learn about the data types powering Clarity, from the most basic ones, to the most sophisticated. This chapter will gives us the fundamental keys to approach the next chapters.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-02.ipynb)
## Data storage
In this chapter, we will be introducing two primitives for storing, updating and retrieving stateful data in Clarity programs, along with their associated functions.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-03.ipynb)
## Arithmetic and Logic functions
In this chapter, we will learn about all the arithmetic and logic functions available natively in Clarity.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-04.ipynb)
## Sequence functions
In this chapter, we will have a closer look at a family of types, the sequences (list, buffer and strings), and see how the functions map / reduce can be combined and leveraged for solving problems.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-05.ipynb)
## Token Oriented Programming
In this chapter, we will introduce another type of data storage primitive, designed to simplify the structure and reduce the amount of code of programs manipulating Fungible and Non Fungible Tokens.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-06.ipynb)
## Cryptographic and Blockchain functions
In this chapter, we will learn about the handful of native cryptographic functions available natively with Clarity, along with some of the very unique functions that can be used for exploring the state of the chain, past and present.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-07.ipynb)
## Inter-Contract Communication functions
In this chapter, we will learn how contracts can safely dispatch inter contract calls and exchange data with other programs, statically and dynamically through the use of traits.
[Open the notebook](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-08.ipynb)
## Best practices and recommandations
In this chapter, we will learn about smart contracts best practices. We will be suggesting design patterns and recommandations aiming at maximizing security.
Open the notebook (Coming soon)

3
src/pages/smart-contracts/overview.md

@ -61,7 +61,8 @@ Note some of the key Clarity language rules and limitations.
## Learning Clarity
The tutorials are ordered from "beginner" to "advanced." Start with the [Hello World tutorial](/smart-contracts/hello-world-tutorial),
You can experiment Clarity directly from your browser, without any setup thanks to our [Interactive tour](/smart-contracts/interactive-tour).
Once familiar with Clarity's syntax, you can learn see how Smart contracts can be written and deployed, using the [Hello World tutorial](/smart-contracts/hello-world-tutorial),
then learn how to construct [a counter](/smart-contracts/counter-tutorial), and finally, learn how to
[test your smart contracts](/smart-contracts/testing-contracts) using Mocha.

Loading…
Cancel
Save