locked
WP Increase Performance XML or CS

    Question

  • Im looking to hire someone to do some modifications to my app but i need to know what is best to ask for.

    Im using background audio in an app im creating, and the layout is as follows

             public static List<Album> Albums = new List<Album>
            {
        new Album("Product ID","Album Name","Album Image",true,new List<AudioTrack>
                {
        new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null), new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null), new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null),
                }),           
        new Album("Product ID","Album Name","Album Image",true,new List<AudioTrack>
                {
              new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null), new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null), new AudioTrack(new Uri("Song URL",UriKind.Absolute), "Song Name", null, null, null),
                }),   

    and so on, now lets say i have 100 albums each with a 100 tracks if i ever need to add an album i have to update the cs file manually and then update the app via the store. when editing the cs file it is so heavily any computer i'm on struggles to go even scroll up and down, i have asked this before and someone suggested XML.

    If that is the best way to go what are the best options either have all the information in one XML file and parse it that way, and have the app check if there are any changes to a xml file online if so download a the new xml file to local storage and use it, or each album in separate xml files have the app check if there are any new xml files download to local storage and use them that way. or is there just a better method altogether

    any advice, or anyone wanting the job

    thanks
    Monday, December 01, 2014 5:45 PM

Answers

  • I don't really understand why adding an entry is so resource intensive on your development computer.

    But that's a separate issue.

    .

    What you have there is data.

    You don't hard code data into a class like that, this is not a professional approach.

    XML is one obvious way forward and you can easily pull xml into memory and manipulate - search it on song, artist, album or whatever.

    And yes, I would just download it into local storage and save it there.

    I think you can arrange stuff on the store so new files are downloaded to existing users.

    Seems a bit odd that everyone gets the same list of music though.

    .

    Another alternative would be a database such as SQLite.

    With that I would think a separate web service to deliver the data is the best approach.

    You'd need a web server ( which can be cloud ) that serves data.

    I guess you're probably not used to developing web services.

    .

    More about storage options:

    http://msdn.microsoft.com/en-us/magazine/jj991982.aspx


    Hope that helps
    Please don't forget to upvote posts which you like and mark those which answer your question.

    Monday, December 01, 2014 8:15 PM