You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jan Lehnardt (JIRA)" <ji...@apache.org> on 2015/02/27 20:47:05 UTC

[jira] [Commented] (COUCHDB-2629) Hide internal config details from other applications

    [ https://issues.apache.org/jira/browse/COUCHDB-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340700#comment-14340700 ] 

Jan Lehnardt commented on COUCHDB-2629:
---------------------------------------

+1

> Hide internal config details from other applications
> ----------------------------------------------------
>
>                 Key: COUCHDB-2629
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2629
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Russell Branca
>
> Throughout the code base we do things like `config:get("couch_httpd_auth", "authentication_db", "_users")` which exposes internal details to other applications that don't need to be aware of the particulars. This duplicates code unnecessarily and causes problematic typos to go unnoticed like in COUCHDB-2628.
> One possible approach that I'm a fan of is to go into the application responsible for relevant config value, and add a function to hide the details. For instance, this is done in `cassim_metadata_cache:metadata_db`: https://github.com/apache/couchdb-cassim/blob/windsor-merge/src/cassim_metadata_cache.erl#L58-L59



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)