Шина-01 | Bus-01
This commit is contained in:
46
en/news/2024-01-05_bus-01.md
Normal file
46
en/news/2024-01-05_bus-01.md
Normal file
@@ -0,0 +1,46 @@
|
||||
Title: Bus-01
|
||||
Date: 2024-01-04 00:00
|
||||
Category: News
|
||||
Slug: bus-01
|
||||
Lang: ru
|
||||
|
||||
# On the way to portable code
|
||||
|
||||
To gain code portability, we have to divide whole code into two parts:
|
||||
|
||||
* repeatable: logic
|
||||
* unique: environment
|
||||
|
||||
To simplify portable code construction, we want to be able to place any code -
|
||||
both repeatable and unique - without hierarchy requirements of operating
|
||||
systems. Bus design pattern seems to be the best option. The Bus makes all
|
||||
code chunks equal because they interact through the Bus only.
|
||||
|
||||
# Bus-01
|
||||
|
||||
Currently we have:
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/XAlIlG9tVL4?si=5HYRDkNuYE0zeoyo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||
|
||||
Module structure:
|
||||
|
||||
![Module's YML][yml]
|
||||
|
||||
<yml>
|
||||
|
||||
Part of the visual representation:
|
||||
|
||||
![Visual representation][v]
|
||||
|
||||
Main functionality:
|
||||
|
||||
1. Format input to leave only digits
|
||||
1. Activate the button when at least 3 digits are present
|
||||
1. Simulate loading when pressing the button
|
||||
|
||||
This was an example of a single instance of an entity.
|
||||
|
||||
Next we're going to deal with multiple instances of an entity.
|
||||
|
||||
[yml]: ../../images/2024_bus-01_yml.jpg
|
||||
[v]: ../../images/2024_bus-01_v.jpg
|
||||
Reference in New Issue
Block a user