Scala as a configuration language

The traditional way: config files

java -cp application.jar Application test
java -cp application.jar Application production
  • we could check if something is wrong at compile time rather than runtime?
  • people who wrote new configuration were assisted in knowing which
    values to provide?
  • we got away without having to import and use a configuration library?

More fun for less work

Configuration managed by the application

Decoupled configuration

java -cp application.jar TestConfig
java -cp application.jar MainConfig
java -cp application.jar:test_config.jar TestConfig
java -cp application.jar:main_config.jar MainConfig
scala -cp application.jar MainConfig.scala
scala -cp application.jar TestConfig.scala
scala -cp ... ProductionConfig serialize > production_config.json

Conclusion

References

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Egypt as the Best Country for Software Development Outsourcing

Federation between AWS Cognito — ForgeRock OpenAM using OpenID Connect (OIDC) & SAML

Sitecore Unit Testing Guide — Part 4 : Mocking ServiceLocator

How good software development works

Hadoop Cluster Automation with Ansible!!

Docker in a Day

Twilio Hackathon: Shared (to-do, grocery) lists between friends, family, and businesses

The Fluent Builder Pattern

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jan Christopher Vogt

Jan Christopher Vogt

More from Medium

Mac Scala setup

Preparing Apache Kafka for Scala 3

Clean Architecture in Scala

Our Clean Architecture

The motivation of the actor model for distributed systems