Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This concept page is to discuss the topics that are shared between ConfigByCode and ConfigByFile.

Purpose

From:Frontend Vision - Management Overview

A Fundamental Problem

It’s handy 1. It can be convenient to work on things in admincentral - but it’s an inherent anti-pattern that changes made in adminCentral are not in your “project”. 

It causes additional headaches & work:

  • You must make the same changes in your files (resources&templates). You might forget.

  • You must export changes to configuration to bootstraps. You might forget.

  • You must import bootstraps or reinstall modules. You might forget.

  • You must write module version handlers to handle the configuration changes on update.

  • You must write tests for the module version handlers.

  • The module version handlers and tests must be reviewed and qa’d.

  • How can a team work together, and deal with version control on a "shared" configuration?

2. Also the workflow for configuration is completely different then that for code, which slows down productivity.

3. Many developer are very efficient at working in their IDE - faster then in AdminCentral.

Analysis

ConfigByFile vs ConfigByCode

...

ImplicationsCurrent: Config in AdminCentralProposal: ConfigByFile or ConfigByCode 
UI

See the entire running configuration.
Search the running configuration. 
Access it from anywhere by website.
Easy to find.  
Could provide dialog/wizards.
Could provide help.
Could provide "extends insight" - tooling to understand extends.
Could be linked to from other apps, like Page Editor. 

Have multiple files (views) open.
Copy & paste
Same familiar work processes as templates & files
 

 
Instant updatesChange the config of ANY module.
Instantly see the impact.
Change only your module.
Would need tooling to reload changed config file. 
 
Version ControlPain that you have to export (often forget)
Bootstrap diff / merge are difficult to understand
Pain to apply changes from others - import / reinstall. 
Seamless, works like other files. 
Module version updates MVHPain to write & test & review.Not necessary. 
UninstallNo clean uninstall.Uninstall would be easy because configuration of other modules was not overwritten. 
Changing config of other modulesYes.Yes. You could create a file that overwrites the changes from other files. 
Agile changesYes.Would require additional changes to distribute files. But one could still edit the config tree directly. 
Deployment   
Publishing Would work.What to publish? The ConfigFiles as well? Must you push new Jars? Could you publish the "active configuration"? 

Alternative Approaches and benefits

...

  1. Handle it like Inplace Templating: An extra property on the changed node, "preserve=true" prevents the ConfigByX from overwriting that node.
  2. Or, all manual changes are actually written to yet another repository: "manualconfig".
    • These changes are applied to the active configuration after ConfigByX runs. 
    • Benefit: With additional tooling: it would be easier for a user to see what manual changes should be merged back to files in source control.

...

Resources 

...