Bonnes méthodes de nommage des packages en Java

Lorsque vous développez et que vous structurez les différentes parties de votre code dans des packages, il faut respecter une convention d’écriture de ces packages.

Ci-dessous, les critères à respecter :

– le nom du package doit être en minuscule
– le nom du package ne doit pas reprendre des noms déjà utilisés dans le JDK utilisé

Pour faire simple, voilà à quoi doivent correspondre les 3 parties du nom de votre package :

– Le premier mot doit correspondre au suffixe du nom de domaine (.fr, .com, .net, .info, etc…).
– Le deuxième mot doit correspondre au nom de la société.
– Le troisième mot doit correspondre au descriptif du contenu du package.

Bon nommage:

nommage_package_ok_java

Ne surtout pas faire:

nommage_package_nok_java

Pensez à nommer votre package de façon à pouvoir identifier son contenu rapidement…

70 Comments Bonnes méthodes de nommage des packages en Java

  1. Ingrid

    Wow, superb weblog layout! How lengthy have you
    been running a blog for? you made running a blog glance easy.
    The overall glance of your web site is magnificent,
    let alone the content!

    Reply
  2. Freddie

    Hey! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up
    losing many months of hard work due to no back up.

    Do you have any solutions to stop hackers?

    Reply
  3. Joe

    fantasstic points altogether, you simply gained a new
    reader. What would you suggest about your post
    that you made some days ago? Any positive?

    Reply
  4. informasi selanjutnya

    Tһаnks on your marveloսs posting! I actually enjoyed reading it, you happen to be a great author.I will
    make sure tto bookmark your blog and wilⅼ eventuɑlly come back
    ѵery soon. I wantt to encourаge you continue your great job, have a
    nice evening!

    Reply
  5. Selina

    I am not sure where you are getting your information, but
    great topic. I needs to spend some time learning more or understanding more.
    Thanks for fantastic info I was looking for this info for my
    mission.

    Reply
  6. Jurgen

    Hi colleagues, how is the whole thing, and what you wish for to say about this
    paragraph, in my view its genuinely remarkable in support of me.

    Reply
  7. Kristine

    With havin so much written content do you ever run into any issues of plagorism or copyright
    infringement? My blog has a lot of completely unique content I’ve either authored myself
    or outsourced but it looks like a lot of it is popping
    it up all over the web without my permission. Do you
    know any techniques to help protect against content from being ripped off?

    I’d really appreciate it.

    Reply
  8. prevent keylogging

    132329 249164Spot lets start work on this write-up, I truly think this fabulous web site needs an excellent deal a lot more consideration. Ill apt to be again to learn far more, appreciate your that information. 136146

    Reply
  9. homepage

    Wow, fantastic blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is fantastic, as well as the content!

    Reply
  10. Betting

    I just could not go away your website before suggesting that I extremely enjoyed the usual info a person provide to your visitors? Is going to be again regularly in order to investigate cross-check new posts.

    Reply
  11. read

    Hello there, You’ve done a fantastic job. I will certainly digg it and for my part recommend to my friends. I’m sure they will be benefited from this web site.

    Reply
  12. go here

    Howdy! I know this is kinda off topic but I was wondering which blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be fantastic if you could point me in the direction of a good platform.

    Reply
  13. this contact form

    Hi just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

    Reply
  14. source

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My website is in the exact same area of interest as yours and my visitors would certainly benefit from some of the information you present here. Please let me know if this okay with you.

    Reply
  15. browse around this web-site

    Great blog you have here but I was curious if you knew of any discussion boards that cover the same topics talked about in this article? I’d really love to be a part of online community where I can get responses from other experienced individuals that share the same interest.

    Reply
  16. sites

    Hi, I do believe this is a great web site. I stumbledupon it 😉 I may return once again since I book-marked it. Money and freedom is the best way to change, may you be rich and continue to help others.

    Reply
  17. helpful hints

    My spouse and I stumbled over here coming from a different web page and thought I might as well check things out. I like what I see so i am just following you. Look forward to going over your web page again.

    Reply
  18. look at this web-site

    What i don’t understood is actually how you are no longer actually a lot more neatly-appreciated than you might be now. You are so intelligent. You realize thus significantly in the case of this matter, made me in my opinion imagine it from a lot of numerous angles. Its like men and women are not involved except it¡¦s something to do with Woman gaga! Your own stuffs nice. All the time deal with it up!

    Reply

Leave a Reply

Your email address will not be published.