
Implementor, Consultant
iXiam
We help organizations with their CiviCRM Projects. From Business consultancy to custom CiviCRM development.


Implementor
Spry Digital LLC
Appreciate the shared resources on the CiviCRM website. We continually refer to it for updates and knowledge.


Implementor, Developer, Integrator
Community Builders Australia
CiviCRM enables us and our clients to invest precious funds into configuring the CRM to meet organisational needs, and building innovative new features, rather than paying annual license fees. With access to the source code and tight integration with leading website content management systems, CiviCRM is extremely flexible.


Administrator
Responsive Development Tecnologies
We use CiviCrm to keep track of our customers and to administer our seminars and conferences.

DEVELOPER AND IMPLEMENTER


Implementor, Developer, Trainer
elMobile Inc.
As developers for various OpenSource CRM applications, we learned a lot from CiviCRM on its scalability and ease of customization.
CiviCRM community is truly organic cultivating growth for users and developers.
We wish to continue learning with CiviCRM and to tackle future challenges with CiviCRM.


DEVELOPER
WIKIMEDIA FOUNDATION
At the Wikimedia Foundation, we leverage CiviCRM to maintain millions of records of donors and their contributions. Working with the product and particularly with the community has been a terrific experience. There's nothing quite like two open source organizations working together to meet their respective goals while ultimately strengthening the open source community as a whole.


End-user, Administrator, Trainer
Progressive Technology Project
CiviCRM is helping us serve member-based community organizing groups across the
U.S. to keep better track of their events, fundraising, and membership data. It's helping our community to aim higher in terms of what kind of questions they should be asking and what kind of data they should be collecting. We chose CiviCRM because it's the best all-around tool to do what our groups need, AND because it's open source.


Developer, Implementor
IXIAM
I'm spent a lot of time in project of civicrm and i think that i can contribuite in bugs and development. I see that this weekend is "Bug Smithing Weekend", I will try to collaborate.


Consultant
nfpservices
We use CiviCRM for our own business functions. Nfpservices participate in the development of CiviCRM and contribute enhanced functionality to the community.


Implmentor, Developer
Backoffice Thinking
CiviCRM has allowed us to empower many non-profits to improve their services and become more efficient.



Comments
A few comments...
1. Terminology: "Group Name", "Config File", "Config Branches", "Config Volume", etc
In civicrm_settings, we organize items with "group_name". In the last link, the Drupal Configuration API is described as supporting a function "config($file)" where "$file" is basically the name of a config-file on disk (omitting the file's base directory and extension).
The two serve basically the same purpose -- e.g. the group_name or $file indicates ownership and purpose (e.g. what module created the group and why), and it helps manage performance (D8 reads an entire file on-demand; Civi can fetch from settings based on group_name).
Within each group_name or $file, there are several more individual pieces of configuration data.
What terminology should we use for these concepts? How about:
* "ConfigGroup" for a volume, file, or list of closely related settings
* "ConfigItem" for some a record or subtree stored inside a ConfigGroup
2. Standardized access to config
The notations in #1 and #2 of the blog post look a little different to me:
* Get one root object; all ConfigGroups and ConfigItems can be accessed as properties (e.g. "$config->system->cms->framework_version")
* Get an object for the ConfigGroup ($config = config('civicrm.system.cms')) and then access ConfigItems as properties ("$config->framework_version")
It looks like the first notation ("$config->system->cms->framework_version") might just be an introductory example, and the second more fully formed. The second also aligns better with the designs in civicrm_settings (group_name) and D8 Config API (file).
3. Heirarchy
It's a good idea to come up with one naming convention that captures our myriad packages (core code, components, native CiviCRM extensions, Drupal modules, Joomla plugins, etc). In the cases of hook_civicrm_managed and the Resources API, we had similar issues and used these conventions:
* Each string is "an extension key"
* For "native CiviCRM extensions", the key is a reverse-domain
(like "nz.co.fuzion.omngateway" which is mentioned in info.xml)
* For core code and components, the key is "civcrm"
* For Drupal modules, the key is "drupal.{$module_name}"
* For Joomla plugins, the key is "joomla.{$plugin_name}"
The "extension key" (with those conventions) would be a good candidate for ConfigGroups.
4. Richness of metadata
In 4.3, Eileen's done a lot of work to produce much richer metadata about our configuration. This goes deeper than D8's approach. For example, each setting is decalred with default values, data-types, validation, etc. This is enough to create web configuration forms without any extra coding for each configitem:
* https://github.com/eileenmcnaughton/eu.tttp.setting
* http://svn.civicrm.org/civicrm/trunk/settings/
Drupal's approach to this metadata is... more lazy? Although some folks have tried to add it in via module:
* http://drupal.org/project/variable
It's cool functionality -- would be nice to keep it.
5. I don't think it would be a good idea to store the DB credentials for staging/production in the same file. For starters, one splits staging and production due to a lack of trust. For example, you may trust a developer enough to work on staging sites -- but not enough to work on production. If you put the credentials in the same file, then the developer gets access to both. Similarly, you expect bugs to go into staging -- e.g. the staging system might "accidentally" read the credentials for the production system -- and proceed to trample on production data. If the staging/production systems store their DB credentials independently, then these risks go away.
If we have config categorised
#1. By ConfigItem you mean to hold meta data info for a particular group / level ? ConfigGroup sounds good.
Just thinking, if it would be better for individual pieces / columns of config data be also part of returned object.
Example $config = config('civicrm.system.cms');
$config->created_id;
$config->created_date;
...
#2. The idea is config('level') also retrieves sub-levels. And properties are accessed in the hierarchical way they appear.
#3. For configs drupal is also trying to use module.my-module.* and system.module.module-name.* naming convention.
Exact extension-key being part of branch name is fine too.
#4. We might also need consider permissions (to write / change a config) as another metadata.
I haven't checked the eilleen's work, but like the idea of defaults (and others) in db. Will check.
#5. How about civicrm.settings.{$Environment}.xml files in that case, that is each environment has its own settings file.
The drupal variable module
The drupal variable module (above) turns on an interface for editing variables. However, it relies on the variables metadata being declared by hook. From what I see most drupal modules of significance declare their variables in this way.
Deepak - one thing I found
Deepak - one thing I found when I looked at declaring the settings metadata (in the settings directory as per Tim's comment) was that xml did not easily cope with the custom separator character - which is the default for a bunch of fields.
One reason why the settings metadata needs to be declared if settings are to be set by something other than the form layer (e.g the setting.create api call) is that there are arrays stored as arrays and arrays stored as separated strings in the settings table. So, prior to 4.3 the information as to how to serialize the array was only in the form layer.
I also looked at the possibilities of hooks wanted to change the defaults for settings with the thinking being that if you installed a 'India' extension it could change the defaults for all the India settings & you could view & revert them to those defaults as appropriate (which is what the CiviConfigure extension is about).
NB for 4.3 is is possible to set settings using the api / drush
drush civicrm-api setting.create debug_enabled =1 userFrameworkLogging=1
civicrm_api('setting', 'create', array('debug_enabled'=> 1, 'userFrameworkLogging=1));
etc
My notes are here
http://wiki.civicrm.org/confluence/display/CRM/Settings+Metadata+and+Usage#SettingsMetadataandUsage-Drush
As a bit of an aside (but relevant if refactoring stuff)- it would be good to keep on our radar that we should try to get the DSNs out of the variables which are exposed when you use smartyDebug to make leaving debugging on less risky.