Up until this point, the controllers we wrote for our application were extremely basic. They were started with the simple task of sending text responses to the client. In the preceding chapter, we updated the controllers so that they render an HTML view and send the HTML code to the client instead of a simple text response. The primary job of a controller is to act as an entity which holds the logic that makes all of the necessary decisions to properly render a response to the client. In our case, this means retrieving and/or generating the data necessary for a page to appear completely.
In this chapter, we will discuss the following topics:
- Modifying the controllers so that they generate a data model and pass it to a view
- Including logic to support uploading and saving image files
- Updating the controllers to actually render dynamic HTML
- Including...