I would like a feature where we can tag sources to keep them in the right categories. For EASYCommerce, there would be categories like:
Order History
Order Creation
Catalog
I would use those if lets say there are in total 5 different widgets in use on the order history pages. but from their name its not immediately apparent because they are generally named like:
ShippingAddressWidget
BillingAdddressWidget
DocumentsDownloadWidget
Currently, I try to use a naming convention that starts general and goes more specific:
Pattern: [Area of Site][Specific Thing the Method Does]
AddressImportDownloadDataFromJDE
ImpersonationStart
AddressRestrictionMaintainUserAddresses
but for each of these, I would take the first part of it and make it a tag on the source instead.
I recently had another case where this would be helpful. We are adding EASYPay into EASYCommerce. Since the 2 need to integrate, it makes it difficult to make them separate applications. So the EASYCommerce application is having all these EASYPay sources added to it. Since the application is called EASYCommerce, it can be assumed that all sources that dont start with EASYPay were for EASYCommerce. That puts extra responsibility on the EASYPay developers to use a longer name. Since long names are not desirable, the pattern for EASYPay is:
Pattern: [Application][Specific Thing the Method Does]
EASYPayJDEConnect
EASYPayAuthorization
This loses the [Area of Site] which could be further categorized in the EASYPay methods to help understanding the design and how sources are used (which new developers struggle with).
This all is fine so far, but EASYPay is actually using a method that is part of EASYCommerce. We could do one of 2 things:
- Name the sources with a new pattern to satisfy both rules. but this results in longer names: EASYPayECAddressImportDownloadDataFromJDE
- Copy sources needed from EC and rename them to be solely EASYPay methods. This duplicates logic though and if a bug is found and fixed in one, it might not be applied to the other (not best programming best practices)
This all highlights that the place to categorize sources shouldnt be solely in the name.