Simple Model View Controller application
This is a simple library or book store application that follows the Model View Controller design pattern. It's intended to illustrate how the pattern can be used to develop web applications.
The application consists of the following classes:
Model classes
- Book.php – The main model class; represents a Book
- BookManager.php – Contains methods to create, read, update, and delete Book objects from the database
View classes
- ViewBook.php – Main view for a book; a read-only view of a book object
- ViewEditBook.php – An editable view of a single book
- ViewBookList.php – Displays a list of book objects
- ViewAddBook.php – Displays the "Add a Book" screen
Controller classes
- LibraryController.php – The Controller class for the project; performs actions passed by the View classes
Other files
- index.php – Start page for the application; forwards the browser to the main index view (through the LibraryController)
- library.sql – Script to create the database