About


KeepTrack


KeepTrack is a demo application, developed with ASP.NET MVC 5, which provides basic functionality to manage a music collection. The application aims to demonstrate the use of some ASP.NET MVC development practices that I've used on larger applications.

The application stores basic details for artists and albums in a SQL Server database. It also provides CRUD capability, and allows for sorting, searching and paging as appropriate. For a selected album, the application can attempt to display its tracklist by retrieving this from Spotify, if this exists in the Spotify catalogue.

The following areas are featured within the application.


View Models

Each view in the application uses a View Model containing the data it needs. This aids security by preventing overposting (or mass assignment), and also keeps the model classes free from data annotations relating to display or validation.


Entity Configurations

Entity Configurations have been used to keep the model classes free from configuration annotations, and decouple the model from the persistence mechanism.


Object Mapping

Automapper has been used to minimise the code required to map data between business objects and view models.


Repository & Unit of Work Patterns

The Repository Pattern helps provide separation of concerns (such that a controller in the application is no longer responsible for specific data access logic), and also helps decouple the application from the specific data store (SQL Server) and data access technology (Entity Framework). Repositories can also help minimise duplicated query logic across actions or controllers, since this is now centralised.

The Unit of Work pattern is often used in conjunction with repositories, providing the means to manage a group of related changes and coordinate saving these as a unit.

Using these patterns in conjunction with Interfaces and Dependency Injection allows the application to be decoupled from the persistence framework.


Dependency Injection

Ninject has been used to provide Dependency Injection capability.


OAuth2

The Client Credentials authorisation flow has been implemented to authenticate against the Spotify API.