DMIT-CSD-Eugeniu-Ceban / practiceProject-2018

0 stars 0 forks source link

Practice Documentation task #1

Open DMIT-CSD-Eugeniu-Ceban opened 2 years ago

DMIT-CSD-Eugeniu-Ceban 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.

DMIT-CSD-Eugeniu-Ceban commented 2 years ago

UI Experience

This comment outlines the actions that can happen on the forms. Actions are in response to the user interacting with the form, pressing buttons or controls

PRG Post Redirect Get

  • Using Routing Parameter {searchtype?}/{serachvalue?}/{playlistname?}
  • PRG Clicking the Clear empties bound properties and routing parameters (page only)
  • PRG Clicking the Fetch will retrieve the existing playlist for the specified playlist name {playlistname?}
  • PRG Clicking the Fetch Artist tracks, or Fetch tracks will retrieve the tracks for the indicated search and display in a table {searchtype?}/{searchvalue?}
  • Post/PRG Clicking the Add [+] on the track will attempt to add the track to the playlist: Playlist_AddTrack( ... )
  • Rule: Unique track on the playlist
  • Rule: Playlist name needs to be unique for the user
  • Rule: Appended track to the playlist
  • Post/PRG Clicking the Remove Tracks will attempt to remove 1 or more tracks from the playlist: Playlist_RemoveTracks( ... )
  • Rule: Re-sequence the playlist track number leaving no gaps
  • Post/PRG Post/PRG clicking the Move Tracks will attempt to reorganize the order of the playlist: Playllist_MoveTracks( ... )
  • Rule: all tracks require a re-sequence track number
  • Rule: track numbers must be greater than 0
  • Rule: track numbers must be unique
  • Rule: track numbers must not introduce holes

Track selection for Artist or Album

1

Managing the Addition and Removing of tracks from a specified playlist

2

DMIT-CSD-Eugeniu-Ceban commented 2 years ago

Data Models

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

3


Query Models

Artist and Album Tracks fetch

4

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 Tracks

5


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

6

No model class, individual parameters

Remove Tracks

7

UserName and PlaylistName are individual parameters. Requires track id list in a List <PlaylistTracksMove>

Move Trakcs (re-sequence playlist))

8

public class PlaylistTrackMove
{
     public int TrackId {get; set;}
     public bool SelectedTrack {get; set;}
     public int TrackNumber {get; set;}
     public int TrackInput {get; set;}
}
DMIT-CSD-Eugeniu-Ceban 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. However, commands require business rule validations and manipulations of one or more tables and/or records. Therefore, the processing of commands should be outlined.

include the method signature and a bullet list of processes

Add Track

void PlaylistTrack_AddTrack(string playlistname, string username, int tracked)


Remove Tracks

void PlayList_RemoveTracks(string playlistname, string username, List <PlaylistTrackMove> trackstoremove)


Move Tracks

void PlayList_MoveTracks(string playlistname, string username, List <PlayLlstTrackMove> trackstomove)