Dilemma: Where do I store my custom settings?

This week I was developing a plugin that needed to retrieve information from an external system. As the solution in which the plugin is running has to be deployed on a different environment I didn’t want to hard code the connection settings in my solution.

As far as I can see there are three options to store custom settings:

Custom entity for specific settings

+   Friendly interface to maintain settings
+   Secure

–   Looks to me as overkill
–   A lot of work (specify entity + view + form + security)

Use webresource to store settings in XML structure

+   Easy to build
+   Almost no overhead
–   Security: settings are stored in plain xml and might be accessible
–   Fairly unstructured; possibly hard to manage

Central entity to store all custom settings

+   All custom settings centralized
+   Friendly interface to maintain settings
+   Secure
–   A lot of work (specify entity, views, form + security)
–   Only useful in an environment with standardized development (guidelines)

For the plugin I was building I chose the webresource option, as it was a one time job.  In the long run I tend to the central entity option.

What’s your experience? How do you deal with custom settings?  I really would love to hear from you…

Leave a Reply

Your email address will not be published. Required fields are marked *