Ticket #700 (new defect)

Opened 14 years ago

Last modified 14 years ago

Vocabularies names are not consistent: vocabularies names should not have a "_voc" suffix

Reported by: madarche Owned by: fguillaume
Priority: P2 Milestone: CPS 3.5.7
Component: CPSDocument Version: CPS 3.3 branch
Severity: minor Keywords: vocabulary vocabularies portal_vocabularies
Cc:

Description (last modified by fguillaume) (diff)

Vocabularies names in portal_vocabularies are not consistent between each other and with the naming convention used in portal_schemas and portal_layouts: vocabularies names should not have a "_voc" suffix.

The names currently found in portal_vocabularies are both of the form "xxx" and "xxx_voc":

cpsportlets_additem_display_voc
cpsportlets_bcs_display_voc
cpsportlets_content_portal_types_voc
cpsportlets_content_search_voc
cpsportlets_content_sort_on_voc
cpsportlets_language_action_voc
cpsportlets_navigation_display_voc
cpsportlets_rss_channels_voc
cpsportlets_syndication_formats_voc
cpsportlets_visibility_range_voc
dummy_voc
forum_tree_voc
forum_wf_display_voc
global_roles
groups
language_voc
members
navigation_display_mode
navigation_filter_listing_ptypes
navigation_filter_review_state
navigation_filter_tree_ptypes
navigation_sort_direction
navigation_sort_listing_by
navigation_sort_tree_by
roles
search_portal_type_voc
search_review_state_voc
search_sort_results_by
subject_voc

Actually the vocabularies which names should be changed are not only in CPSDocument. For example some should be changed in CPSPortlets too and maybe other products.

Change History

comment:1 Changed 14 years ago by madarche

  • Milestone changed from CPS 3.2.5 to CPS 3.3.5

comment:2 Changed 14 years ago by jmorliaguet

Hi!

the '..._voc' names are used in many page templates (e.g. language_voc.(...) just do a grep in the code ...). Renaming vocabulary names would most certainly break customized templates or other 3-rd party products.

So what is needed:

  • a risk analysis
  • a migration path
  • a + / - comparision (is it worth it?)
  • a guideline for the naming of vocabularies.

/JM

comment:3 Changed 14 years ago by fguillaume

  • Description modified (diff)

I tend to agree. The names are not nice but I don't see how we could do a clean migration.

comment:4 Changed 14 years ago by madarche

  • a risk analysis

=> I will do

  • a migration path

=> I will do

  • a + / - comparision (is it worth it?)

Having clean and consistent code is worth some efforts. Do we want other developers to think that CPS is clean and easily understandable? I think so.

And if this is to be done at all, this should be done before CPS 3.4.

  • a guideline for the naming of vocabularies.

=> I will do

comment:5 Changed 14 years ago by jmorliaguet

Then you should do an analysis for each product because the degree of exposure is different. CPSPortlets does not expose the vocabularies names too much outside the layout definitions themselves (except in some rare cases...). But CPSDefault does.

Also consider it as an API change for everything that is not used privately inside the products. It is a bit like renaming public class methods.

/JM

comment:6 Changed 14 years ago by madarche

As for CPSPortlets I also thought that the vocabularies renamming would not hurt anyone. So maybe this can be done just now?

As for the vocabularies in CPSDefault I agree that this is equivalent of changing a public API and I will take great care to find a suitable path for the change.

comment:7 Changed 14 years ago by jmorliaguet

For CPSPortlets, it could already be done in a branch -- and tested.

But I'm going to merge the jmo-before-cps334 branch first, otherwise upcoming merges will be a pain...

comment:8 Changed 14 years ago by madarche

No problem. Take your time. I'm in no hurry. I really care for this cleanup and I won't do it fast and dirty.

And actually I'm not commiting as fast as you do ;-)

comment:9 Changed 14 years ago by fguillaume

  • Milestone changed from CPS 3.3.5 to CPS 3.3.6

comment:10 Changed 14 years ago by fguillaume

  • Milestone changed from CPS 3.3.6 to CPS 3.5.0

comment:11 Changed 14 years ago by madarche

The following changesets renamed some of the inconsistently named vocabularies: [28931] [28937] [28966]

comment:12 Changed 14 years ago by fguillaume

There will be a migration step, right?

comment:13 Changed 14 years ago by madarche

Yes, this will describe in this ticket.

For now only the safe renamings have been done.

comment:14 Changed 14 years ago by madarche

Added a guideline for the naming conventions of vocabularies, schemas and layouts in [31016].

Note: See TracTickets for help on using tickets.