Table of Contents
We replace the ES5 constructor-based class definition of our
Book with a corresponding ES6
Instead of defining explicit setters we now make use of the
ES5 feature of defining implicit
methods for properties.
Enumeration datatypes have to be defined in a suitable way as part of the model code.
Enumeration attributes have to be defined in model classes and handled in the user interface with the help of suitable choice widgets.
In terms of coding, the new issues are:
In the model code we now have to take care of
defining an ES6
class (instead of a constructor function) for
set methods for
all properties of the
defining the enumerations with the help
of a utility (meta-)class
Enumeration, which is
defining the single-valued enumeration
category together with their check functions
defining the multi-valued
publicationForms together with their
extending the methods
Book.prototype.toString such that they take care
of the added enumeration attributes.
In the user interface ("view") code we have to take care of
adding new table columns in
retrieveAndListAllBooks.html and suitable choice
creating output for the new attributes in the
setupUserInterface() method of
allowing input for the new attributes in the
setupUserInterface() methods of