11Implementing Enumeration Attributes in a Plain JS Web App
In this chapter, we show how to build a front-end web application with enumeration attributes, using plain JavaScript. In addition to the topic of enumeration attributes, we also show how to deal with multi-valued attributes because in many cases, enumeration attributes are multi-valued.
11.1New Issues
Compared to the Validation App137 discussed in Part 2, we now deal with the following new issues:
- We replace the ES5 constructor-based class definition of our model class
Book
with a corresponding ES6class
definition. - Instead of defining explicit setters we now make use of the ES5 feature of defining implicit
get
/set
methods for properties. - Enumeration datatypes have to be defined ...
Get Web Applications with Javascript or Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.