Giter Site home page Giter Site logo

Project changes about musicbrainz HOT 8 CLOSED

avatar29a avatar avatar29a commented on July 29, 2024
Project changes

from musicbrainz.

Comments (8)

avatar29A avatar avatar29A commented on July 29, 2024

1,2,3,5 - good. 👍
4, 6 - Explain please motivation?

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024
  1. Since the urls don't change and aren't supposed to be user configurable, they are perfect candidates for constants.

  2. The values in the Constants.resx file are not localizable - they are just constants. The "Artist" value is only used in the Artist class, so why not just write

WebRequestHelper.CreateLookupUrl("artist", id, CreateIncludeQuery(inc))

instead of

WebRequestHelper.CreateLookupUrl(Localization.Constants.Artist, id, CreateIncludeQuery(inc))

The same holds for the other entries (well, some of them aren't even used (Label, Tag)).

from musicbrainz.

avatar29A avatar avatar29A commented on July 29, 2024
  1. Ok, may be.

  2. I do not like to use string literals directly. What if Constant.resx replace on MusicBrainzConstants.cs or something like that ?

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

Ok. But I think we shouldn't add another class for those constants. What about adding them to the associated class. So Artist class would look something like

public class Artist : Entity
{
    private const string EntityName = "artist";

    // ...
    public async static Task<Artist> GetAsync(string id, params string[] inc)
    {
        return await GetAsync<Artist>(id, WebRequestHelper.CreateLookupUrl(EntityName, id, CreateIncludeQuery(inc)));
    }
    // ...
}

Same for the other affected classes.

from musicbrainz.

avatar29A avatar avatar29A commented on July 29, 2024

Ok, good 👍

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

The latest commits still have the namespace Hqub.MusicBrainz.API. Do you want to keep the API suffix, or should it be dropped?

from musicbrainz.

deepakyadav avatar deepakyadav commented on July 29, 2024

@wo80 Have you fixed task 1?
I am working on creating a new project in this solution by reusing as many files as possible. If you have not done/started, then I can fix this. So I will be able to reuse files.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

@deepakyadav I haven't started yet.

from musicbrainz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.