Summary
In this final chapter of the book, we covered the burgeoning MVC specification from the ground up. We covered the essential elements of the models, views, and controllers. We saw that MVC is a layering on top of JAX-RS and it reuses the same annotations, including @GET
, @FormParam
, @Path
, @FormParam
, and @POST
.
In order to establish a method as an MVC controller, we annotated them with @Controller
. We wrote controllers that generate either the response instance or, if they returned a void type, we would annotate the method with @View
.
You learned about the various view technologies that are supported by the MVC reference specification, Ozark. We used the Handlebars Java view template to build the elements of a CRUD example. We also understood that the MVC specification might change in respect to the redirection and validation APIs.