sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
588 stars 823 forks source link

Identify and/or fix high-level inconsistencies #2767

Open meganindya opened 3 years ago

meganindya commented 3 years ago

Music Blocks is being built from the ground-up, to address several architectural problems with this run. Since Music Blocks is a fork of Turtle Blocks JS, musical functionality was added on top of it. However, music is fundamental to Music Blocks. Besides, the Turtle Blocks JS started initially with handful of features, and was written without a complex architecture. As Music Blocks got built on top of that, it got incrementally complex, but the architecture remained simple, thus resulting in a monolith. Also, the functionality is tightly coupled with the interface and native client API (Web API).

Keeping these problems in mind, we have considered a foundational rebuild that will address all these issues, whilst adding buffers for future additions. We'll also be using a more elegant tech-stack to develop and maintain this project given its scale. After the core is built, we'll be porting features from this application to it.

The newer build shall replace this as the current iteration of Music Blocks, but this is here to stay. It is perhaps not worth adding new features to this. However, there are some wrap up work that can be done before the new build is completed and this is archived. This iteration incorporates plenty of contributions by lots of people over the last 5+ years of its development and it better be retired in good shape.

Objectives (roughly)

Codebase

UI

Considering the way Music Blocks has been built, the DOM is tightly sandwiched with the logic. The architecture is not hierarchical; all files (irrespective of usage) are imported by the old Require JS style of importing modules, effectively creating a monolith — when the application is loaded, the behavior is as if the code of the all files have been appended one after the other in one big file. Therefore, there is no possibility of unit-testing due to global dependencies and GOD objects. To test anything, please rely on the development tools in the browser. Breakpoints will help a lot during debugging. But, at any time, there will be a lot of variables identified at each breakpoint; please be patient.

meganindya commented 3 years ago

Please feel free to address any of these arbitrarily. You don't need to ask. You can always discuss if you are improvising on something.

khushal87 commented 3 years ago

@meganindya Any pending work which I can pick up here and improvise/work on?