Error and Feedback Handling
As a developer, I know the time it takes to consider every possible situation in which a message will need to be displayed to a user. Whether it is an error or a successful message that you need to display, it is time-consuming to write the code to handle each and every case. On the bright side, with the reusable JavaScript Dialog object from Chapter 19, “Usability Patterns,” we can easily use it instead of an alert, which is what most developers use anyway because of its simplicity. The Dialog object is a good solution for handling all of our front-end messages because it is as simple as writing one line of code in order to use it. Another reason why this object allows us to easily follow best practices is because ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access