Why are packages labled com.person.mypackage rather than just person.mypackage

    • orclev@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      arrow-down
      1
      ·
      1 year ago

      Further it isn’t always com, you’ll often see net, org, and rarely even io show up as the base package. All that said with the introduction of modules and some of the other recent changes I’m not sure how much longer we’re going to see the reversed DNS naming system stick around.

      • qaz@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        edit-2
        1 year ago

        I’ve quite often seen people shoehorn their Github account into this format. com.github.username.projectname is quite a common sight for Flatpak packages. Reverse DNS naming assumes every package is created by a company while nowadays a large portion of popular packages were created by individuals.

        • RiderExMachina@lemmy.ml
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          It doesn’t check for an actual DNS entry though, right? Would it be possible to do person.developer.app?

          • orclev@lemmy.world
            link
            fedilink
            English
            arrow-up
            12
            ·
            1 year ago

            Correct, there’s no actual validation done. You can literally make the package anything you want, you don’t even need to follow the convention if you don’t want to, although it is of course considered best practice to do so. The entire reason it exists is just as a convenient way to namespace Java classes without worrying about collisions. I personally think using com.github.username.projectname is a perfectly fine way to use the system and is completely within the spirit of it. Likewise if you wanted to use person.developer.app you could, although that’s a little weirder. You might be better off using something like dev.person.app, although you’d need to be careful you don’t accidentally step on someones toes if someone actually has the registration for person.dev.