Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a Constant Class for Property Keys #37

Open
arkaprovob opened this issue Oct 17, 2023 · 0 comments
Open

Introduce a Constant Class for Property Keys #37

arkaprovob opened this issue Oct 17, 2023 · 0 comments

Comments

@arkaprovob
Copy link
Contributor

Description:
Currently, in our codebase, we have multiple instances where property keys are declared and used across different classes. This leads to redundancy and makes the code less maintainable. To address this issue and improve code consistency, I propose creating a constant class to hold all the property keys.

Proposed Solution:
Creating a dedicated constant class that will house all property keys as constants. This way, any class that requires a particular property key can simply fetch it from the constant class rather than declaring it separately. This approach will streamline our codebase, reduce redundancy, and enhance code maintainability.

Benefits:

  • Eliminates redundancy in property key declarations.
  • Promotes code consistency.
  • Improves codebase maintainability.
  • Enhances overall code quality.

Implementation Guidelines:

  1. Create a new constant class or utilize an existing one for this purpose (ApplicationConstants.java).
  2. Define all property keys as public static final constants within the constant class.
  3. Update all existing classes that use property keys to fetch them from the constant class.

Additional Information:
Please ensure that all new code contributions follow this practice, and consider updating existing code where appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants