SalesforceLabs / survey-force

88 stars 63 forks source link

Please consolidate and rename classes #72

Closed dschach closed 4 years ago

dschach commented 4 years ago

I realize that this is not technically an issue, but we cannot update SurveyForce to this version for a few reasons:

  1. Far too many classes, and so many are short utility classes. Please consolidate classes where possible so it has a far smaller footprint in an org.
  2. Class naming convention should be followed - prefix all classes with SurveyForce, Survey or something (not SF, as that's too generic) so that they are all in one section of a class list. We can't namespace, and this is too much.
  3. Generic names like "Utilities" are terrible for applications like this. We might have Utilities already. This package doesn't realize that it needs to fit in. Survey_Utilities could be better.

In general, please be aware that you're asking people to install this into an org with other items, so please keep your footprint as small as possible.

jrattanpal commented 4 years ago

Hi,

Thank you for your feedback. I completely agree with you. Here is a bit of history for this app:

Since then, I have made many changes but have to be careful to keep similar structure so it's easier for existing subscribers to take my changes and implement those (hopefully easy copy/paste).

If it were a managed package then it'd be easier as customer could upgrade their app. But as this is un-managed, I have to leave a simpler way for them to take my changes and add to their own.

However, I am slowly making some bigger changes. For example, in latest change, I deleted all code from Utilities Class (https://github.com/SalesforceLabs/survey-force/blob/master/src/classes/Utilities.cls). I will delete that in next iteration.

I also plan to delete that SFDC Access class and use "WITH SECURITY_ENFORCED" option of SOQL in Apex. That will also allow me to change Util class.

So these changes will get rid of 2 classes and rename Util class (as per your suggestion). Slowly I will try to simplify this code further but I still have to be careful to not make drastic change.

Hopefully that satisfies some of your issues with this app.

Having said that, as you own the code (un-managed package), you are free to rename those classes if it's a blocker (for now)

jrattanpal commented 4 years ago

I have renamed/deleted some classes. I will continue to do so as and when I work on it. For now, your immediate concern of Util and Utilities classes should be resolved.