Title: Bus-01 Date: 2024-01-04 00:00 Category: News Slug: bus-01 Lang: en # 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: Module structure: ![Module's 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