Dot Net FM Chris Zamanillo Ana Rodriguez Allen Lee Peter Singh Allen Vega Robert Lyn Software and...

24
DotNetFM Chris Zamanillo Ana Rodriguez Allen Lee Peter Singh Allen Vega Robert Lyn Software and Object Design

Transcript of Dot Net FM Chris Zamanillo Ana Rodriguez Allen Lee Peter Singh Allen Vega Robert Lyn Software and...

DotNetFM

Chris ZamanilloAna Rodriguez

Allen LeePeter SinghAllen VegaRobert Lyn

Software and Object Design

Problems with sharing music Large disk space requirements Slow downloads Complicated software

Our solution Small amount of disk space Listen while you download Easy to use interface

Problem Statement

Current Software Architecture

Winamp Windows Media Player SHOUTcast iTunes

Winamp & Windows Media Player

Several audio & video formats Streaming Internet radio Playlists Customizable interface through skins Winamp

No sharing without plug-ins Media Player

has Jukebox functionality

SHOUTcast

Listener needs to play streaming mp3 Host uses Winamp with SHOUTcast plug-

in Music transmitted to server which

broadcasts to listeners Access to server can be expensive!

http://www.hosting4less.com 100 listeners at 128Kbps is $250/month

iTunes

Jukebox Automatically manages music library

Playlists Internet radio

No favorite stations Shares library

available only on LAN

Proposed Software Architecture

All in one design Cleaner interface

Playlists Station lists Customizable skins

Simple to switch between client - server Sharing not dependent on plug-ins Ease of use!

Subsystem Decomposition

Playback List Error I/O Configuration

Packages

DotNetFM

Playback

ErrorConfiguration I/O

List

Global Software Control

User interface classes do not have direct access to entity classes

Entity classes do not communicate

directly with any other classes

Control classes do not communicate directly with interface classes

GUI classes subscribe events

Design Goals

Modifiability Ease of use Efficiency Low response time Low-cost and Reuse of Components

Design Patterns

Singleton Error, Controllers, Preferences

Bridge SoundData, Visualizations

Façade Controllers

Observer SkinController

Hardware/Software Mapping

nBass Class Library .Net Windows Forms Extensible Mark-up Language (XML)

Deployment Diagram

Component Diagram

Access Control and Security

No user authentication Security handled by nBass Access Matrix

Access Control Matrix

ObjectsActors

Playlist StationList Station MusicInfo CustomSkin

Listener <<create>>AddMusicInfo

GetSongs

GetLists<<create>>

GetName

<<remove>>GetName

<<create>>GetFileName

<<create>>GetFilename

DJ <<create>>AddMusicInfo

GetSongs

GetLists<<create>>

SetName

<<remove>>SetName

<<create>>GetFileName

<<create>>GetFilename

Persistent Data Management

Identifying persistent data objects StationList PlayList Preferences Log MusicInfo Station XMLFile

Selecting a storage strategy XML

Boundary Conditions

Configuration use cases Start-up and Shutdown use cases Exception use cases

Object Design Trade-offs

Buy vs. Build

Memory space vs. Response time

Subsystem Services (1/2)

List services Manages play lists and station lists.

Error services Handles error reporting to user and to file.

I/O services Allows configuration and list data to be

outputted to XML files.

Subsystem Services (2/2)

Configuration services Manages user preferences and works with the

I/O subsystem to save these settings from session to session.

Playback services Provides playback of local files as well as

broadcasting and playback of audio streams.

Class Interfaces

DotNetFMGUI

RefreshSkin()

LocalSoundData

StreamSoundData

<<property>> Address : string

Listen() : bool

CustomSkinGUI

ViewList()ChooseSkin()

CustomSkin

Name : stringFilename : stringComponents : Map

CustomSkinController

LoadSkinFromFile(filename : string) : boolGetCurrentSkin(name : string, filename : string, components : string) : boolSetCurrentSkin(name : string, filename : string, components : string) : boolAddSkin(name : string, filename : string, components : string) : boolGetSkinNames() : string[]

OGLVisualization

DXVisualization

GDIVisualization

BroadcastGUI

ToggleBroadcast()

ListenToBroadcastGUI

SelectStation()Play()

SoundData

Filename : String

Play() : boolStop() : boolPause() : boolSetPosition(pos : long) : boolLoadFromFile(filename : string) : bool

MusicController

<<property>> MusicData : byte[]

ToggleBroadcast() : boolStartBroadcast() : boolStopBroadcast() : boolGetCurrentSong() : MusicInfoPlayStation(station : string) : boolPlaySong(song : string) : bool

ListenToMusicGUI

SelectSong()Play()Stop()Pause()Next()Previous()

BaseVisualization

Name : string

Initialize() : boolRelease() : boolRender() : bool

VisualizationController

Names : string [ ]

GetVisualization(name : string) : Form

Class Interfaces

DotNetFMGUI

RefreshSkin()

StationListGUI

AddStation()DeleteStation()

StationListController

<<property>> Stations

AddStation(name : string, address : string, descripion : string, dj : string) : boolDeleteStation(pos : int) : boolCreateStationList(name : string) : boolDeleteStationList(name : string) : boolGetStation(pos : int, name : string, address : string, description : string, dj : string) : boolSetStation(pos : int, name : string, address : string, description : string, dj : string) : boolGetCurrentStationCount() : intSetCurrentStationList(name : string) : bool

Station

<<property>> Name : string<<property>> Address : string<<property>> Description : string<<property>> DJ : string

StationList

<<property>> Name : string

AddStation(station : Station) : boolGetStation(pos : int) : StationRemoveStation(station : Station) : boolGetStations() : Station[]

PlayListGUI

AddSongToPlaylist()RemoveSongFromPlaylist()EditPlaylist()

PlayList

<<property>> Name : string

AddMusicInfo(info : MusicInfo) : boolGetMusicInfo(pos : int) : MusicInfoRemoveMusicInfo(info : MusicInfo) : boolGetSongs() : MusicInfo[]

MusicInfo

<<property>> Title : string<<property>> Filename : string<<property>> Album : string<<property>> Artist : string<<property>> Genre : string<<property>> Length : string

PlaylistController

<<property>> PlayLists

AddMusic(title : string, filename : string, album : string, artist : string, genre : string, length : string) : boolDeleteMusic(pos : int) : boolCreatePlayList(name : string) : boolDeletePlayList(name : string) : boolGetMusic(pos : int, title : string, filename : string, album : string, artist : string, genre : string, length : string) : boolSetMusic(pos : int, title : string, filename : string, album : string, artist : string, genre : string, length : string) : boolSetCurrentPlayList(name : string) : boolGetCurrentMusicCount() : int

XMLFile

<<static>> Read(filename : string, obj : object) : object<<static>> Write(filename : string, obj : object) : bool

Log

entries : string [ ]

Append(message : String)

ErrorManager

<<property>> Instance

Report(message : string, type : int) : bool

Preferences

<<property>> PreferenceNames : string [ ]PreferenceMap : Hashtable<<property>> Instance : Configuration

SetPreference(name : string, value : string) : boolGetPreference(name : string) : stringClearPreference(name : string) : bool

PreferencesGUI

SavePreferences()