Album Collection API
Objective
Scenario
Our super hip ironic friend needs an easy way to curate soundscapes for the Italian scooter/coffee hybrid co-op startup at which they volunteer (they also fix old polaroid cameras).
They have tasked us with creating an application that can easily keep track of their EXTENSIVE record collection and access music by artists, albums, or individual tracks. This collection is in a constant state of flux, so it is essential for the users to be able to update the collection and it's elements.
Requirements
API Creation
We are going to create an API using ASP.Net Entity Framework that will handle our DB and interactions with it.
Requirements
-
Create a RESTful API with ASP.Net
-
Endpoints for the following:
-
All
CRUD
operations forartist
s- Create endpoint
- Read endpoint
- Update endpoint
- Delete endpoint
-
All
CRUD
operations foralbum
s- Create endpoint
- Read endpoint
- Update endpoint
- Delete endpoint
-
All
CRUD
operations forsong
s- Create endpoint
- Read endpoint
- Update endpoint
- Delete endpoint
-
-
A database service layer for retrieving and storing
artist
s,album
s, andsongs
s from the database and interacting with the controllers.
Relationships
Our user should be able to:
- access
album
s from theartist
that made them. - access
song
s from thealbum
the song is on.
User Input Fields
Each entity should have fields the user can interact with:
- Should have ratings (rating system can be your own design)
- Should have comments with a way to add them
Front-end
Next we will create our interactive front-end. It should be an SPA (Single Page Application) that uses JS to build out components that our users can interact with. Use modular JS along with WebPack to create reusable components. This application should allow you to create new artists, albums and songs, edit details about each of the items after they have been created, and delete items.
User Interaction
Our users should be able to add new instances of all entities as well as comments and ratings
Entities
artist
- name
- image
- albums
-
any other pertinent info. which could include:
- age
- record label
- hometown
album
- title
- image
- songs
- record label
song
- title
- link (optional)
- duration
Grading:
Your grading will be based on five areas:
- Mastery of RESTful APIs and SPA
- Test Driven Development
- Version Control and GitHub
- Working Software
- Clean Code
Test Driven Development
Ideally, you should write your code by writing tests first. If you do so, each public method you write should have a unit test that covers its behavior. The test classes should also be well maintained and follow the principles of clean code.
In order to receive a PASSING grade, all of the following principles must be met:
- 75% of the public methods you add to any of your classes should be covered by unit tests.
- Tests include appropriate Arrange, Act, and Assert sections.
- All tests pass.
Version Control and GitHub
Your commit history should tell the story of the development of your code.
- Commits were small and had descriptive messages.
- Commit history shows code contribution from both partners.
- New branches were created for each feature.
- Use of pull requests in GitHub to approve the merge of the feature branch into your dev branch, and eventual merge of dev into master.
Working Software
In order to receive a PASSING grade, working software must consist of an application that runs without error and meets all of the Required Features listed above.
Clean Code
Clean code is readable, easy to understand, formatted, and not littered with commented out code.
In order to receive a PASSING grade, all of the following principles must be met:
-
Formatted code
- Use indentations, new lines, brackets, and empty lines to create code that is easy to read and understand.
-
Good naming convention
- Variable, class, and method names should inform the reader of its purpose.
- Variable, class, and method names should use proper casing.
-
Comments are rare and only when absolutely necessary
- If you use descriptive method and variable names, your reliance on comments should be minimal. In addition, you should never leave blocks of commented out code in your committed code.