11

Sorry for my English

I think that sometimes it is necessary.

In my opinion search_result_list, location_provider are easier to read than searchresultlist, locationprovider.

What does the documentation say?

Leonid Semyonov
  • 473
  • 2
  • 6
  • 18
  • 1
    *"I'm interested in your opinion"* => SO isn't for opinions. – Denys Séguret Mar 03 '14 at 11:29
  • These look more like a class names, not the package names... Packages name should be hierarchical and roughly group classes by some feature (like functionality or structural similarity). – Cromax Mar 03 '14 at 11:33
  • We usually use camelCase for packages and PascalCase for classes/interfaces; in your case it'll be "SearchResultList" and "LocationProvider" – Dmitry Bychenko Mar 03 '14 at 11:35
  • @DmitryBychenko You're free to do that but that's not the official convention. – Denys Séguret Mar 03 '14 at 11:36
  • @Cromax but sometimes a class could use many helper-classes so I need to separate this class with its helpers from others by moving them to a new package named as this class. – Leonid Semyonov Mar 03 '14 at 11:38
  • @LeonidSemyonov Do other classes use these helpers? Or just one? Maybe you could actually put all of their methods into a class, that actually use it. Or you can use "main" class name as prefix in helper class names, i.e. `MyClass`, `MyClassResultList`, `MyClassHelper`, `MyClassWhateverProvider`, etc. – Cromax Mar 03 '14 at 11:42
  • @Cromax Just one class uses these helpers. But often class names already are too long so I cannot use "main" class name as prefix in helper class names. And these helpers are created in order to simplify big "main" class by separating the logic from the helper methods. – Leonid Semyonov Mar 03 '14 at 11:51
  • Class or packages naming, and I don't mean conventions, sometimes is really cumbersome. On one hand names should be short, on the other hand they should be descriptive. It's not easy task to accomplish both. However maybe you should consider, if you really need to have this long `search_result_list` instead of just `result`. Try to pick just most important noun. You actually know, what are these classes for. – Cromax Mar 03 '14 at 14:52

1 Answers1

9

Code Conventions could be found here!

I think code conventions are nothing to vary, so stick to such conventions if there exist any...

PrR3
  • 1,250
  • 1
  • 18
  • 26