Plans for 2.0

    • tburny escribió...
    • Forum Moderator
    • 2 Feb 2010, 14:19

    Plans for 2.0 has become pretty large and there's old code mixed with new one. Plus I have some ideas(but sadly still no the time atm :( ), with I want to present here.

    First thing to think of is a code cleanup, means to check what things could be done better, including (but not restricted to) request invocation, simplier scrobbling, inheritance strutures, patterns and algorithms and so on.
    For example, the input data for a request are currently mixed with the request data itself, although the result is now seperate.
    What I'd like to do is to make a clean Params in -> Request -> result out pattern, maybe (or approximately) by using delegates. Problem is, this would break nearly all applications using
    Second thing would be to split away the Requests and types from all Manager classes. I think to create a Last.Fm Player SDK instead which should provide easy to use mechanisms for Scrobbling, simple requests and which will include the managers then.
    Part of this SDK is the third idea I have: Classes for Artist, Album and Track which call requests by a kind of lazy evaluation, e.g. if you want to get Similar artists of an artist, you use the following (pseudo(!)-)code:

    Dim myArtist as new Artist("Cher")
    Dim similiar as List(Of Artist) = myArtist.SimiliarArtists

    The first time the getter of SimiliarArtists is called, the Artist class automatically will perform an artist.getSimiliar request and store the list in its memory so if you want to know the similiar artists of this instance again, it will just return the list from memory.
    This idea also will have one big benefit I think: It eleminates the need of shovelling data around. If you have an Artist class, an SimiliarArtist class and so on afaik you ever have to convert types(okay all Artist classes inherit from artist) and if you want to scrobble a track you have to convert to a ScrobblerTrack first, which I hope to eleminate by this.
    Its just no use if all the great applications are occupied 95% of their time by shovelling data.

    Last thing is more a personal issue: I coded lots of Java in the last half year, which led me to some coding issues like I always want to put a semi-colon at each end of line,writing stuff like "if (a=b) { ...}", "ArtistInfo a = new ArtistInfo()" or shortcut issues(especially for code-comletion ...). You can imagine this is really de-motivating. If I would re-write, C# would be the language of my choice :) This would also eleminate the "null"s on constructors for C#-users where in VB are optional parameters(which I now see as much as a sin as the use of propertys...).
    So I'd like to code 2.0 in C# from scratch, using the knowledge I earned in the current version :)

    There is another major issue, also for the current version:
    More developers!
    The time to be invested into fixing bugs and first and foremost into a new version is something I simply cannot efford alone anymore.
    So if you would volunteer for helping me(and if only fixing some tiny bugs) this would be a great help to me!
    If you are interested, just post here or send me a PM.

    I hope to see a hard and heavy discussion of opionions on the points/ideas mentioned above, especially on the C#-Question and the request model!

    Thanks for using and i hope you still enjoy using it!
    Tobias Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
    • erhnam escribió...
    • Usuario
    • 10 May 2012, 22:43
    Hello there!
    I'm currently developing a .NET application where I need to access the API and I've been digging around for a .NET library to do it as I don't feel like reinventing the wheel.
    I have to confess yours wasn't the first one I came across. I experimented with ( but am still looking for other options.
    This post is 2 years old, so it's quite possible that you moved on by now, but did you by any chance moved forward with re-writing your library in C#? I'd be very interested in looking at it if that's the case (I confess that I don't fancy working with Visual Studio at all).

    Looking forward to hearing the news!

Los usuarios anónimos no pueden escribir mensajes. Para participar en los foros inicia sesión o crea una cuenta.