From Notes

Skipped blocks:

Rhythm

  • skip notes

Pitch

  • Y to Pitch

Intervals

  • interval name
  • doubly
Added by meganindya
From Notes

HMVC Framework

  • Class name of controller is same as component, say Comp

  • Corresponding model and view classes should be named CompModel and CompView, respectively, and should be (inner) static (class type) members of Comp

  • When Comp is instantiated, it instantiates CompModel and CompView, imports each member one at a time while deleting it from its own object, and then deleting the model and view instances.

  • The model and view classes shouldn't directly communicate with members of the other.

  • The model and view classes can call any member of controller using this

  • The controller can call members of model and view using this

  • Any inter class variable access should be done using getters/setters only

  • External code can call methods of the sub-components only by instantiating the component class

js.do example

Added by meganindya
From Notes

When members of two or more objects are added to another using importMembers, if any variable name is repeated, only the last entry will be preserved. In fact, importMembers should be used only to add members of Model and View to the component object (Controller), which shouldn't have repeating variable names.

Added by meganindya
From Notes

HMVC w.r.t execution and export

Models
  • data structures to store behavior
  • functions to modify the data structures
Controller
  • execution logic
  • event handling
  • queue handling
  • calls to models' functions
Added by meganindya
From Notes
Models
  • logo: general behavior for execution
  • state: current state in the execution
  • turtle: for each turtle
  • turtle-singer: for music based properties
  • turtle-painter: for graphics based properties
  • turtles: for all turtles
  • note: note specific behavior
Added by meganindya
From Notes
Controllers
  • turtleController
    • execution of turtle commands
    • use members of state, turtle, turtles
  • noteController
    • execution of note blocks
    • use members of note, state
    • (can) invoke turtleController
  • logoController-1
    • execution of blocks from activity/block/blocks
    • use members of logo, state
    • invoke turtleController, noteController
Added by meganindya
From Notes

Export Interface

  • Emulated interface for functions to be used in the exported code
  • Interface functions are implemented in js/js-export/API/ which call the respective methods in turtleactions/
Added by meganindya