DMIT-2018 / dmit-2018-sep-2022-a02-workbook-jthompsonnait

dmit-2018-sep-2022-a02-workbook-jthompsonnait created by GitHub Classroom
1 stars 3 forks source link

General Planning Implementation tasks of Managing Play List in Chinook #2

Open jthompsonnait opened 2 years ago

jthompsonnait commented 2 years ago

This task list area will be completed once the implementation plan has been outlined. This area is where one creates the task list that is associated with the milestone. The tasks that are outlined in this area, are the tasks that are counted for the milestone.

jthompsonnait commented 2 years ago

UI Experience

This comment outlines the action that can happen on the forms. Action are in response to the user interacting with the form, pressing button, or controls.

PRG Post Redirect Get

PLayList Management screen shot (1)

jthompsonnait commented 1 year ago

Chinook ERD for Transactional Form

chinook oltp erd

jthompsonnait commented 1 year ago

Data Models (CQRS)

The data models are the C# classes that will be coded in the class library project/application (folder: ViewModels) that holds the public data classes in our solution. These classes represent the query class models and the command class models (CQRS)

CQRS image (1)


Query Models

Artist and Album Tracks fetch (TrackService_FetchTracksBy)

public class TrackSelection
{
    public int TrackId {get; set;}
    public string SongName {get; set;}
    public string AlbumTitle{get; set;}
    public string ArtistName{get; set;}
    public int Milliseconds {get; set;}
    public decimal Price {get; set;}
}

Current Playlist fetch (PlaylistTrackService_FetchPlaylist)

public class PlaylistTrackInfo 
{
    public int TrackId {get; set;}
    public int TrackNumber {get; set;}
    public string SongName {get; set;}
    public int Milliseconds {get; set;}
}

Command Models

Add Track

No model class, individual parameters

Remove/Move Tracks (shared command model due to the web page handling of BindProperty)

Remove Tracks

for the Remove Tracks functionality, the SelectedTrack and TrackId will be required for transactional processing

Move Tracks (re-sequence playlist)

for the Move Tracks functionality, the TrackId, TrackNumber and TrackInput will be required for transactional processing

public class PlaylistTrackTRX
{
    public bool SelectedTrack {get; set;}
    public int TrackId {get; set;}
    public int TrackNumber {get; set;}
    public int TrackInput {get; set;}
}
jthompsonnait commented 1 year ago

Business Processing Requirements

This comment will describe the various methods that will be used for Commands (CQRS) that alter the database. Queries are read only and require on average no complex processing. You may in another comment outline your query methods. However, commands require business rules, data validation and manipulations of one or more tables and/or records. Therefore, the processing of commands could required extensive logic to be outlined.

include the method signature and a bullet list of processing (pseudo-code)

Add Track

void PlaylistTrackService_AddTrack(string playlistname, string username, int trackid)


Remove Track

void PlaylistTrackService_RemoveTrack(string playlistname, string username, int trackid)