Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41247

Kernel > create central constants class for sakai.properties keys and default values

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Awaiting Review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
      None
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      I have a dream...

      ServerConfigurationService is used throughout the code base, with many properties being loaded in multiple different projects. The typical approach to loading these properties is to just pass hard coded values to the service, in every location where the property is needed. The obvious drawback to this is that it's a maintenance issue when a property's name or default value is changed. You would have to search the entire code base for the key and hope you catch them all.

      A better design would be to have a centrally maintained class of static constants provided by the kernel, and anywhere that needs to load sakai.properties can reference the defined property keys and default values from kernel. Using this approach, if a property's name or default value changes, you only have to maintain that change in one place.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bjones86 Brian Jones
                Reporter:
                bjones86 Brian Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Git Source Code