Examine the Use Case in Figure 4 and explain the MVC architecture of the online bookstore (the model, the view and controllers) needed to Lookup Books and Add to Shopping Cart.
From the CSU forum, the Figure 4 should be change into Figure 10.
For the MVC architecture, model is for maintaining data, view for displaying the data and the controllers for handling events affect the model or view.
In the online bookstore case, if we are going to explain the MVC architecture for the Lookup Books and Add to Shopping Cart part, the result will be illustrated as below:
For the Lookup Books:
Model will be the online bookstore's books database
View will be at least a "search book" view (by categories, author and publisher), a "lookup result" view and a link to the Add to Shopping Cart View
Controller will be the coding that query the books database by different search criteria (categories, author and publisher), selecting the book(s) from the search result and export to the next stage (Add to the Shopping Cart)
For the Add to Shopping Cart:
Model will be the Shopping Cart List from the customer's database
View will be the "Shopping Cart" view which contains the selected book(s) result from the Lookup Books part and a link to the Purchase Book view
Controller will be the coding that imports the selected books from the Lookup Books part.
No comments:
Post a Comment