Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
What does wrapping configuration information behind thin API mean?

On reading Pragmatic Programmer, the authors recommend that we wrap configuration information behind a thin API as it decouples the details of the representation of the configuration.

Quote from the book about Configuration.

Commonly, this data structure is made global, the thinking being that this makes it easier for any part of the code to get to the values it holds. We prefer that you don't do that. Instead wrap the configuration information behind a (thin) API. This decouples your code from the details of the representation of the configuration.

I am not sure how that decouples the details of the representation of the configuration. For example, If I have a javascript object that stores a configuration value, the client could access the configuration value via object.<someConfigKey>. Wouldn't wrapping this configuration value inside an object result in the client calling something like config.<getSomeConfigKey>() ?

Since configuration objects are usually represented as a data structure (I.e json like), how does wrapping configuration information behind a thin API result in decoupling ?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda