I work at Company
, creating project Project
that implements a functionality. Let's name it Newsletter
. It could be used in further projects.
I need to create a new Plone Product, but I don't know the best way to do it. I thought about company.project.newsletter
. I've read somewhere (@acl开发者_如何学Pythonark answer remembered the link) to not use nested namespaces in my product name "unless I'm 100% certain in what I'm doing".
Can someone guide me with some references about properly naming my Plone packages? I miss a guide like pep8 with some convention. (Specially when there are completely different opinions about this).
Generally speaking, you are asking about a convention (versus something technical). In short, it doesn't matter. I prefer flat or short namespaces, but they can be as long as you like e.g. https://github.com/aclark4life/viewlets_dont_suck.
In the case of nested namespaces, e.g. plone.*, and plone.app.* the convention has meaning. plone.* are ideally able to be reused out of Plone, whereas plone.app.* packages can only be used in Plone.
Similarly, it's quite common to see company branded namespaces. In your case, I'd probably go with company.newsletter.
See: http://www.martinaspeli.net/articles/the-naming-of-things-package-names-and-namespaces for more information.
精彩评论