@@ -7,101 +7,72 @@ A complete overhaul of [Music Blocks](https://github.com/sugarlabs/musicblocks).
7
7
The aim of the new architecture is modularity and extensibility. The idea is to create a core visual
8
8
programming platform, and extend it with other features.
9
9
10
- - The source code for the components specific to the application wil reside in this
10
+ - The source code for the components specific to the application resides in this
11
11
[ ** musicblocks-v4** ] ( https://github.com/sugarlabs/musicblocks-v4/ ) repository.
12
12
13
- - The source code for the programming framework will reside in the
13
+ - The source code for the programming framework resides in the
14
14
[ ** musicblocks-v4-lib** ] ( https://github.com/sugarlabs/musicblocks-v4-lib/ ) repository.
15
15
16
16
- ** musicblocks-v4-lib** is bundled as an _ npm_ package and imported as a dependency in
17
17
** musicblocks-v4** .
18
18
19
19
### Components
20
20
21
- ![ Component Architecture] ( docs/images/architecture/components.jpg )
21
+ ![ Component Architecture] ( docs/images/architecture/components.png )
22
22
23
- #### Core
23
+ ** Note: ** The greyed out components haven't been built yet.
24
24
25
- 3 core components: ** Interface** , ** Syntax** , ** Integration**
25
+ This is a highly pluggable architecture — except for application level functionality, anything related
26
+ to project building and execution are features which shall be dynamically pluggable (they may or may
27
+ not be configured to load).
26
28
27
- - ** Interface** component shall contain the UI components. These are the ones which use _ React_ and
28
- follow _ Model-View-ViewModel_ (_ MVVM_ ) architecture.
29
+ Components can be strictly or partially dependent on other components. In case of strict dependency,
30
+ a depending component needs to be loaded for a dependent component to be loaded. In case of partial
31
+ dependency, a dependent component adds extra functionality to the depending component if it is loaded.
29
32
30
- - ** Menu** shall handle top level operations like running projects, managing projects, undo/redo,
31
- application settings.
33
+ #### Programming Framework
32
34
33
- - ** Config** shall be used to configure the feature configurations.
35
+ This is reponsible for defining the _ syntax constructs_ (_ syntax elements_ , _ syntax tree_ ) and
36
+ utilities (_ syntax specification_ , _ syntax warehouse_ ), and contains the _ execution engine_
37
+ (_ scheduler_ , _ interpreter_ , _ parser_ , _ symbol table_ ) for running the program represented by the
38
+ _ syntax tree_ . See
39
+ [ ` musicblocks-v4-lib/README.md ` ] ( https://github.com/sugarlabs/musicblocks-v4-lib/blob/develop/README.md )
40
+ for details.
34
41
35
- - ** Status ** shall display the application status .
42
+ The components in ` musicblocks-v4 ` shall use the constructs exposed by ` musicblocks-v4-lib ` .
36
43
37
- - ** Info ** shall display logs.
44
+ #### View Framework
38
45
39
- - ** Console ** shall provide an interactive tool to run application level commands and
40
- display messages (like a terminal) .
46
+ This is responsible for creating the skeleton of the UI — components that have a view shall request
47
+ component wrappers from the _ view framework _ and encapsule their DOM inside the wrappers .
41
48
42
- - ** Debugger ** shall be used to debug Music Blocks programs by monitoring states.
49
+ #### Integration
43
50
44
- - ** Editor** shall be responsible to building Music Blocks programs in text form.
51
+ This is responsible for adding general application-wide functionalities like _ internationalisation_ ,
52
+ _ project management_ , and _ activity history_ .
45
53
46
- - ** Planet ** shall be a repository for openly shared projects.
54
+ #### Plugin - UI
47
55
48
- - ** Syntax** component shall contain the programming framework. These are responsible for internal
49
- representation and execution of Music Blocks programs. This shall come with a factory set of program
50
- building syntax elements.
56
+ This contains UI components for application-wide interactive/informative functionality.
51
57
52
- - ** Elements** shall describe the rudimentary syntax element constructs — ** data** , ** expressions** ,
53
- ** statements** , and ** blocks** .
58
+ #### Plugin - Art
54
59
55
- - ** Specification ** shall describe the ambient configurations (label, selective connectivity, etc.)
56
- for syntax elements .
60
+ This is responsible for artwork generation. It shall contain a set of _ syntax elements _ of
61
+ instructions and arguments related to artwork generation and artboard (artwork canvas) states .
57
62
58
- - ** Warehouse ** shall instantiate and maintain a table of syntax element instances.
63
+ #### Plugin - Music
59
64
60
- - ** Tree ** shall respresent the syntax tree by maintaining the interconnections between syntax
61
- elements .
65
+ This is responsible for music generation. It shall contain a set of _ syntax elements _ of
66
+ instructions and arguments related to music generation, composition, and music states .
62
67
63
- - ** Symbol Table ** shall maintain the set of program variables.
68
+ #### Plugin - Bricks
64
69
65
- - ** Parser ** shall handle the sequential traversal of syntax elements .
70
+ This is responsible for building Music Blocks programs using graphical bricks (blocks) .
66
71
67
- - ** Interpreter ** shall orchestrate running Music Blocks programs — exeution of syntax elements.
72
+ #### Config
68
73
69
- - ** Integrations** component shall contain the components responsible for handling application
70
- configurations and other bookkeeping.
71
-
72
- - ** Config** shall handle application specific configurations and loading of configured plugins.
73
-
74
- - ** i18n** shall handle internationalisation — managing language strings.
75
-
76
- - ** Projects** shall handle for creating, loading, merging, and exporting projects.
77
-
78
- - ** History** shall handle maintaining a log of application-level operations for rollback.
79
-
80
- In addition, a ** Broker** component shall be responsible for inter-component communication.
81
-
82
- #### Plugins
83
-
84
- 2 kinds of plugins: ** Features** and ** Syntax Builders**
85
-
86
- - ** Features** add new functionality to the application. These may add interface components and new
87
- set of syntax elements.
88
-
89
- - ** Syntax Builders** add interfaces to build Music Blocks programs.
90
-
91
- Plugins may be extended themselves to add more optional functionalities.
92
-
93
- ##### Plugin (Feature) - Painter
94
-
95
- This shall add artwork generating functionality, and a set of syntax elements to interact with them.
96
-
97
- ##### Plugin (Feature) - Singer
98
-
99
- This shall add music generating functionality, and a set of syntax elements to interact with them.
100
- This shall be extended to add widgets for generating syntax element stacks.
101
-
102
- ##### Plugin (Syntax Builder) - Bricks
103
-
104
- This shall add the functionality to build Music Blocks programs using visual bricks.
74
+ This is responsible for conditionally loading the pluggable components dynamically and sharing instance
75
+ references between them.
105
76
106
77
### Wireframe
107
78
0 commit comments