The Book Search application is designed to search for books using the Open Library API. Users can search by Title, Author, Subject, or with no selected criteria and receive matching results retrieved from the API. Clicking on a book from the search results will open a new window with more information about the book, including publishing date, description, and author’s name. Users can also view more details about the author, such as their date of birth, website link, and biography if available. The application also uses isolated storage to store the user’s search history, which is then used to reload previous results when returning to the Search Page.
- Introduction
- Architecture
- Class Design
- API Logic
- API Call Example
- Features
- Technologies Used
- Installation
- Usage
- Screenshots
- Documentation
The Book Search application is designed to search for books using the Open Library API. Users can search by Title, Author, Subject, or with no selected criteria and will be given the matching results retrieved from the API. Clicking on a book from the search results will open a new window with more information about the book, including publishing date, description, and author’s name. The author’s name can be clicked to view more details about the author, such as their date of birth, website link, and biography if they have one. The application also uses isolated storage to store the user’s search history. The search history is then used to reload previous results when returning to the Search Page. All the pages can be easily navigated between using back buttons.
This application is created using the MVVM design pattern, and the main components are separated into Views, ViewModels, Models, and Services.
- Views: Display the UI and trigger events in the ViewModels.
SearchPage
: Allows the user to enter their text and criteria and then search for books accordingly.BookDetailsPage
: Displays more data about the book selected from theSearchPage
.AuthorPage
: Displays more information about the author.
- ViewModels: Handle the logic and data-binding for each view.
SearchPageViewModel
: Manages theSearchPage
and calls methods to get books.BookDetailViewModel
: Manages theBookDetailsPage
and extracts more information about the book.AuthorPageViewModel
: Manages theAuthorPage
and retrieves more information about the author.
- Models: Define the data structure.
BookModel
: Used to hold book information.AuthorModel
: Used to hold author information.SearchHistoryItemModel
: Used to store search history information.
- Services: Handle API communication.
OpenLibraryService
: Executes API requests and returns data in the correct model format.
- SearchPage
- The loading page that allows users to search for books and displays results.
- BookDetailsPage
- Displays more detailed information about a selected book.
- AuthorPage
- Displays detailed information about an author.
- SearchPageViewModel
- Manages and controls the
SearchPage
.
- Manages and controls the
- BookDetailViewModel
- Manages and controls the
BookDetailsPage
.
- Manages and controls the
- AuthorPageViewModel
- Manages and controls the
AuthorPage
.
- Manages and controls the
- BookModel
- Defines the format for books.
- AuthorModel
- Defines the format for authors.
- SearchHistoryItemModel
- Stores information about search history.
- OpenLibraryService
- Handles API communication and data retrieval.
All the ViewModels in this project rely on the OpenLibraryService
class to facilitate communication between the UWP app and the Open Library API. The service can search for books, retrieve book descriptions, and get author details.
Search Books: Search for books by Title, Author, Subject, or no criteria. View Book Details: Detailed information about selected books. View Author Details: Information about authors including their biography and website links. Search History: Store and reload previous search results.
Front End and Logic: UWP, C# Back End and Data Storage: Open Library API, Isolated Storage
- Clone the repository: git clone https://github.com/JayWoodroffe/BookSearch.git
- Open the project in Visual Studio.
- Restore the NuGet packages.
- Build and run the app.
Search Books: Enter search criteria and view results. View Details: Click on a book to see detailed information. Author Information: Click on an author’s name to view their details.
Search Page
Book Details Page
Author Page
For more detailed information, you can refer to the Project Documentation.