Modules naming : Best practices ?

View: New views
7 Messages — Rating Filter:   Alert me  

Modules naming : Best practices ?

by David V.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by Prasad-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by David V.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Prasad.

So I understand in your answer that we just shouldn't mind about the s in modules name and only adjust display using translation.
(please correct me if I'm wrong)

When you say that we should prefix our tables. It is definitely a good idea but I would like to suggest something here :

Some people are allowed to use only one database and use it for different things. So keeping "vtiger_" in front of the the tables name is still a good idea.
What we should do as external developpers is : adding a prefix to the vtiger's one.

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

David V.



2009/9/28 Prasad <prasad@...>
Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by Prasad-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi David,

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

I would recommend, custom_myprefix_mytable, just to make sure vtiger_tablename can always be considered as a standard/core tables.

Regards,
Prasad
vtiger Team

On 9/28/09, David V. <davidv.net@gmail.com> wrote:
Thank you Prasad.

So I understand in your answer that we just shouldn't mind about the s in modules name and only adjust display using translation.
(please correct me if I'm wrong)

When you say that we should prefix our tables. It is definitely a good idea but I would like to suggest something here :

Some people are allowed to use only one database and use it for different things. So keeping "vtiger_" in front of the the tables name is still a good idea.
What we should do as external developpers is : adding a prefix to the vtiger's one.

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

David V.



2009/9/28 Prasad <prasad@...>

Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by Prasad-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Following are the revised conventions. (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables (with custom_yourmodule) related to modules as well. This is very important.
  - Example: custom_mycompany_basetable.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

On 9/30/09, Prasad <prasad@...> wrote:
Hi David,

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

I would recommend, custom_myprefix_mytable, just to make sure vtiger_tablename can always be considered as a standard/core tables.

Regards,
Prasad
vtiger Team

On 9/28/09, David V. <davidv.net@gmail.com> wrote:
Thank you Prasad.

So I understand in your answer that we just shouldn't mind about the s in modules name and only adjust display using translation.
(please correct me if I'm wrong)

When you say that we should prefix our tables. It is definitely a good idea but I would like to suggest something here :

Some people are allowed to use only one database and use it for different things. So keeping "vtiger_" in front of the the tables name is still a good idea.
What we should do as external developpers is : adding a prefix to the vtiger's one.

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

David V.



2009/9/28 Prasad <prasad@...>

Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com



_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by David V.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Prasad,

Thank you for your reply.

I do understand your point. But another good practice of Vtiger is to use the vtlib to develop new modules. And with the current version of Vtlib if I name a custom module :

myprefix_mymodule

I will end up with tables like vtiger_myprefix_mymodule. IMHO this is not be a big problem. If myprefix is unique theses tables will never clash with others.

For example : "tsolucio" is a unique (and well known ;-) ) prefix. A table named vtiger_tsolucio_timesheet will never clash with a table from another provider or from Vtiger itself. Same thing for crmnow for exemple.

And I like the idea of having all the vtiger related tables in a database (being from custom modules or not) prefixed with "vtiger_". So you can make a clear difference with for example "jos_" tables.

David V.


2009/9/30 Prasad <prasad@...>
Following are the revised conventions. (Let us improve it as we go along, so feel free to add)


* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables (with custom_yourmodule) related to modules as well. This is very important.
  - Example: custom_mycompany_basetable.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

On 9/30/09, Prasad <prasad@...> wrote:
Hi David,

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

I would recommend, custom_myprefix_mytable, just to make sure vtiger_tablename can always be considered as a standard/core tables.

Regards,
Prasad
vtiger Team

On 9/28/09, David V. <davidv.net@gmail.com> wrote:
Thank you Prasad.

So I understand in your answer that we just shouldn't mind about the s in modules name and only adjust display using translation.
(please correct me if I'm wrong)

When you say that we should prefix our tables. It is definitely a good idea but I would like to suggest something here :

Some people are allowed to use only one database and use it for different things. So keeping "vtiger_" in front of the the tables name is still a good idea.
What we should do as external developpers is : adding a prefix to the vtiger's one.

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

David V.



2009/9/28 Prasad <prasad@...>

Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com



_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com 

Re: Modules naming : Best practices ?

by Prasad-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi David,

And I like the idea of having all the vtiger related tables in a database (being from custom modules or not) prefixed with "vtiger_". So you can make a clear difference with for example "jos_" tables.

I agree with you on this.

Regards,
Prasad

On 9/30/09, David V. <davidv.net@gmail.com> wrote:
Prasad,

Thank you for your reply.

I do understand your point. But another good practice of Vtiger is to use the vtlib to develop new modules. And with the current version of Vtlib if I name a custom module :

myprefix_mymodule

I will end up with tables like vtiger_myprefix_mymodule. IMHO this is not be a big problem. If myprefix is unique theses tables will never clash with others.

For example : "tsolucio" is a unique (and well known ;-) ) prefix. A table named vtiger_tsolucio_timesheet will never clash with a table from another provider or from Vtiger itself. Same thing for crmnow for exemple.

And I like the idea of having all the vtiger related tables in a database (being from custom modules or not) prefixed with "vtiger_". So you can make a clear difference with for example "jos_" tables.

David V.


2009/9/30 Prasad <prasad@...>

Following are the revised conventions. (Let us improve it as we go along, so feel free to add)


* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables (with custom_yourmodule) related to modules as well. This is very important.
  - Example: custom_mycompany_basetable.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

On 9/30/09, Prasad <prasad@...> wrote:
Hi David,

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

I would recommend, custom_myprefix_mytable, just to make sure vtiger_tablename can always be considered as a standard/core tables.

Regards,
Prasad
vtiger Team

On 9/28/09, David V. <davidv.net@gmail.com> wrote:
Thank you Prasad.

So I understand in your answer that we just shouldn't mind about the s in modules name and only adjust display using translation.
(please correct me if I'm wrong)

When you say that we should prefix our tables. It is definitely a good idea but I would like to suggest something here :

Some people are allowed to use only one database and use it for different things. So keeping "vtiger_" in front of the the tables name is still a good idea.
What we should do as external developpers is : adding a prefix to the vtiger's one.

It would be vtiger_myprefix_mytable instead of only myprefix_mytable

David V.



2009/9/28 Prasad <prasad@...>

Hi David,

Following are few conventions I would like to suggest: (Let us improve it as we go along, so feel free to add)

* Please have a short-prefix for the module developed by you
  - The short-prefix could be a name of your company or reverse domain name like java package. This helps in avoiding name-clashes over a long time.
  - Example: From mycompany.com, the preferable module name would be: MyComModule
* Prefix your tables related to modules as well. This is very important.
* Avoid module or table names without the prefix. This might clash with standard modules/tables.
* You can control the display name of module through translation.
  - This helps in controlling suffixing with 's' or not accordingly.

Regards,
Prasad

On 9/27/09, David V. <davidv.net@gmail.com> wrote:
Hi !

Are there any naming conventions for the modules in Vtiger.

Most modules in Vtiger have to deal with multiples entities :

Contacts
Accounts
Potentials

So they are named accordingly with and ending "s" (plural form)

But some others don't have the ending "s"

It's normal for Calendar if you see it as one calendar and not as a group of activities.
And also for HelpDesk.

But it's curious that following modules don't have an "s"
Invoice
SalesOrder
PurchaseOrder

I came across this when trying to make a new "Computers" module using the example in Vtlib.pdf as a basis.

In this documentation the PaySlip example is without an "s" but I wanted to have my new module just like Accounts and Contacts (with this trailing s).
So I tried to put Computer in some places and Computers in some others places.

I spent a while trying to make it work but it wouldn't :-(
(I probably missed something)
Finaly I had to stick with the name Computer.

Actually the users don't mind. Once everything is translated no one will read the addresses in the browser's adress bar and call you because they see "house" instead of "houses" (or "cow" instead of "cows") but I just wanted to understand what was the convention in Vtiger and stick to the other developers best practices.

So how do you guys do it ?
Do you put an "s" or no ?

Disclaimer : I'm a true fan of Vtiger. I'm not critisizing here. Just trying to provide some constructive feedback. :-)

David V.

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com



_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com


_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com