You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment cat-angular has a lot of hard-coded naming conventions throughout it's code. Especially for somebody who hasn't used it before these are quite daunting as they don't follow any particular pattern. (Note: this is not entirely true, and there have been reasons for all of the current conventions at the time, but it should still be cahnged)
A way to get rid of all these strange patterns would be to replace them by function calls to a dedicated service. This would mean that the only thing the user provides would be a single string at the entry point of listAndDetailView which will then be passed to different service methods.
The above code is just a first idea of how it could look like (no real though has gone into it).
The actual implementation should be quite straight forward and probably don't transform the name at all and just use it as is, and concatenate with parent names where applicable.
For the legacy part i would just add a separate module cat-legacy-naming in cat-angular (but not part of the cat module dependencies) which decorates the service to provide the current naming conventions.
A more sophisticated approach could be to provide multiple naming strategies.
Improving on the single cat-naming-service one could even go a step further and split the different parts where the name is used into different services like cat-template-source, cat-state-service etc. which would probably better handle separation of concerns.
Furthermore we should get rid of all our uglywindow.cat.util stuff ;)
The text was updated successfully, but these errors were encountered:
At the moment
cat-angular
has a lot of hard-coded naming conventions throughout it's code. Especially for somebody who hasn't used it before these are quite daunting as they don't follow any particular pattern. (Note: this is not entirely true, and there have been reasons for all of the current conventions at the time, but it should still be cahnged)A way to get rid of all these strange patterns would be to replace them by function calls to a dedicated service. This would mean that the only thing the user provides would be a single string at the entry point of
listAndDetailView
which will then be passed to different service methods.The above code is just a first idea of how it could look like (no real though has gone into it).
The actual implementation should be quite straight forward and probably don't transform the name at all and just use it as is, and concatenate with parent names where applicable.
For the legacy part i would just add a separate module
cat-legacy-naming
in cat-angular (but not part of thecat
module dependencies) which decorates the service to provide the current naming conventions.A more sophisticated approach could be to provide multiple naming strategies.
Improving on the single
cat-naming-service
one could even go a step further and split the different parts where the name is used into different services likecat-template-source
,cat-state-service
etc. which would probably better handle separation of concerns.Furthermore we should get rid of all our ugly
window.cat.util
stuff ;)The text was updated successfully, but these errors were encountered: