Now that we've got the model designed, it's time to implement it in code. This particular model will need to go in
Here's the code for the base note model. We've stripped a lot of the preamble and the comments as they appear in the code. In place of the stripped comments, we've added more in-depth commentary where necessary.
Let's start with the shell of the module. We do this by starting with
define. This indicates to RequireJS that we're defining a module. The name of the module is inferred from the filename. We indicate that we'll need YASMF as a dependency. We also create a subclass of YASMF's
BaseObject class. Note that we use
_className here. YASMF objects maintain ...