Discussion:
[Erp5-dev] naming consistency
Yoshinori Okuji
2005-04-12 14:57:44 UTC
Permalink
I think I have said this before, but some names are not consistent
unfortunately again.

Do not use Id, id or iD. Use ID all the time. For example,
TemplateTool_importBusinessTemplate and BaseCategory_view use Id instead of
ID. These are not consistent and problematic for the message translation.

I hope you would respect this naming issue from now on. When you make new a
new skin, please make sure that you use the same terminology as the rest.

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Sebastien Robin
2005-04-12 20:13:42 UTC
Permalink
Post by Yoshinori Okuji
I think I have said this before, but some names are not consistent
unfortunately again.
Indeed, the 25 aug 2004, and I'm sorry to not have noticed the problem
discussed below at that time.
Post by Yoshinori Okuji
Do not use Id, id or iD. Use ID all the time. For example,
TemplateTool_importBusinessTemplate and BaseCategory_view use Id
instead of ID. These are not consistent and problematic for the message
translation.
I tried to guess about what you where talking about, and I guess this is
about the title of the StringField my_id in forms.

I looked at many places, and this is some titles found for many different
fields:

City
Description
Group
Role
...

Usually, the capital letter is only for the first caracter, so, why are we
doing exception for id ? Why it should be only capital letters ?

When it is possible, we should try to not have exceptions, so it will
prevent many errors. Is it possible to use 'Id' everywhere instead of
'ID' ?

Seb.
Post by Yoshinori Okuji
I hope you would respect this naming issue from now on. When you make
new a new skin, please make sure that you use the same terminology as
the rest.
YO
--
Sebastien Robin, Nexedi Technical Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Yoshinori Okuji
2005-04-13 10:27:30 UTC
Permalink
Post by Sebastien Robin
Indeed, the 25 aug 2004, and I'm sorry to not have noticed the problem
discussed below at that time.
I didn't intend to be offensive. If you feel so, I appologize it.
Post by Sebastien Robin
I tried to guess about what you where talking about, and I guess this is
about the title of the StringField my_id in forms.
You are right.
Post by Sebastien Robin
I looked at many places, and this is some titles found for many different
City
Description
Group
Role
...
Usually, the capital letter is only for the first caracter, so, why are we
doing exception for id ? Why it should be only capital letters ?
When it is possible, we should try to not have exceptions, so it will
prevent many errors. Is it possible to use 'Id' everywhere instead of
'ID' ?
The reason is that "ID" is an abbriviation of "identifier". My way of thinking
is that real words should be capitalized only at their first characters,
while abbriviations should be written in uppercase entirely. For example,
"city" is a real word. So it should be written as "City". "VAT" is an
abbriviation, so it should be written as "VAT" instead of "Vat".

Some examples:

- VAT
- BIC
- TEL
- FAX
- ID

- Name
- Address
- Title
- Tax
- Destination

"ID" is actually a bit complicated, because even some native speakers use
"Id". Probably they think "id" is like a real word nowadays. In fact, some
Zope code (not all!) use "Id". But, according to a survey on the Internet,
"ID" is more common than "Id", and, once we accept using "Id", it would make
our rule quite ambiguous (e.g. Is "tel" like a real word?).

I will summerize this rule in a document today. If you have any objection, let
me know as soon as possible. I'd like to reach a good agreement before
enforcing the rule.

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Yoshinori Okuji
2005-04-13 12:03:41 UTC
Permalink
I have updated the ERP5 Naming Conventions:

https://www.erp5.org/sections/documentation/guidelines/naming.stx/view

I added User Interface Conventions and more about Coding Conventions. This
still does not cover all, but I think most important matters are addressed.

Basically, the document only makes our custom very explicit.

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Sebastien Robin
2005-04-13 13:33:10 UTC
Permalink
Post by Yoshinori Okuji
https://www.erp5.org/sections/documentation/guidelines/naming.stx/view
I added User Interface Conventions and more about Coding Conventions.
This still does not cover all, but I think most important matters are
addressed.
Thank you for your update.

By the way, I guess there is not yet a good rule for the id of modules.
For our customer, all new modules id finishes with '_module'. For
example:

sale_order_module
sale_packing_list_module

This way of doing is very nice to make sure that the id of a module is not
used for another object (a base category for example).

Seb.
Post by Yoshinori Okuji
Basically, the document only makes our custom very explicit.
YO
--
Sebastien Robin, Nexedi Technical Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Yoshinori Okuji
2005-04-14 10:37:26 UTC
Permalink
Post by Sebastien Robin
By the way, I guess there is not yet a good rule for the id of modules.
For our customer, all new modules id finishes with '_module'. For
sale_order_module
sale_packing_list_module
This way of doing is very nice to make sure that the id of a module is not
used for another object (a base category for example).
It sounds nice to me, but it means that we must change Nexedi ERP5... And, I
guess some skins are hardcoded with module names (in particular, account,
person, organisation and currency).

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Sebastien Robin
2005-04-13 12:46:18 UTC
Permalink
Post by Yoshinori Okuji
Post by Sebastien Robin
Indeed, the 25 aug 2004, and I'm sorry to not have noticed the
problem discussed below at that time.
I didn't intend to be offensive. If you feel so, I appologize it.
I didn't feel so :-)
Post by Yoshinori Okuji
The reason is that "ID" is an abbriviation of "identifier". My way of
thinking is that real words should be capitalized only at their first
characters, while abbriviations should be written in uppercase
entirely. For example, "city" is a real word. So it should be written
as "City". "VAT" is an abbriviation, so it should be written as "VAT"
instead of "Vat".
Ok, great, I know understand why you prefer 'ID'. I didn't know this rule.
Post by Yoshinori Okuji
- VAT
- BIC
- TEL
- FAX
- ID
- Name
- Address
- Title
- Tax
- Destination
"ID" is actually a bit complicated, because even some native speakers
use "Id". Probably they think "id" is like a real word nowadays. In
fact, some Zope code (not all!) use "Id". But, according to a survey on
the Internet, "ID" is more common than "Id", and, once we accept using
"Id", it would make our rule quite ambiguous (e.g. Is "tel" like a real
word?).
I will summerize this rule in a document today. If you have any
objection, let me know as soon as possible. I'd like to reach a good
agreement before enforcing the rule.
This rule is ok. Thank you for your explanation.

Seb.
Post by Yoshinori Okuji
YO
--
Sebastien Robin, Nexedi Technical Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Chris Purves
2005-04-15 01:19:37 UTC
Permalink
Post by Sebastien Robin
Post by Yoshinori Okuji
The reason is that "ID" is an abbriviation of "identifier". My way of
thinking is that real words should be capitalized only at their first
characters, while abbriviations should be written in uppercase
entirely. For example, "city" is a real word. So it should be written
as "City". "VAT" is an abbriviation, so it should be written as "VAT"
instead of "Vat".
Ok, great, I know understand why you prefer 'ID'. I didn't know this rule.
I think you mean "OK" not "Ok". ;-)
--
Chris Purves
Product Manager
Dowslake Microsystems Corporation
Loading...