- Modal (=DATA)
- Octopus (=Functionality, Filtering)
- View (=DOM)
A Modal
= code the object + properties inside.
An Octopus
= bind the Modal
and View
code together.
In here you find the code logic (
- functionality
- filtering of Modal code into View
A view
code = code the object + methods
NOTE: The View code NEVER changes the Modal directly. All changes related to code functionality are made within the octopus.
This is to:
- not mess up the code
- leave actual data unchanged
- in this way the modal gives the view only the code functionality it needs.
In short: The octopus
code, is the BINDER CODE, to get the data from the Modal to the VIEW code.
- Always separate Modal and View, and use the Octopus to connect the functionality and filtering of the Modal into the View Code Part.