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

dmit-2018-sep-2022-a02-workbook-JaredJ13 created by GitHub Classroom
0 stars 0 forks source link

General Planning Implementation Tasks of Managing Playlist in Chinook #1

Open JaredJ13 opened 2 years ago

JaredJ13 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.

JaredJ13 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)

JaredJ13 commented 2 years ago

Chinook ERD for Transactional Form

chinook oltp erd

JaredJ13 commented 2 years 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;}
}
JaredJ13 commented 2 years 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)