The screen to add a new book to the database is a simple form. What we need to implement is:
There is no need to implement two different methods here because based on the arguments passed to the method we can decide whether to return a form or to process the submitted contents of the same form. Although it may be considered bad form to design a method to do two things, it does keep related functionality together.
addbookform class variable contains the template that refers to a number of string variables to interpolate. There ...