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

  • orclev@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    10 months 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.