Environments

Last updated 18 days ago

'Environments' is the folder where we store all of our environments. Each environment is a project that we can open in our IDE or code editor.

We can imagine the environments folder as a "work surface", which gives access to all of the environments in our workspace.

The RealWorld "work surface" contains a single environment called 'development'

Environments are where we collect a set of building blocks in one place, to work on them. They are how we create the "monolithic" development experience, which allows us to work efficiently with our code. In this example, development is the root folder that you would open in your IDE/code editor.

An environment is the place to work with the building blocks

This centralisation of building blocks in one place is achieved through the magic of symbolic links (notice the little arrows on the src folders). The symbolic links refer to the corresponding folders for each component and base, which live in their respective "drawers". For example, the user symbolic link in environments/development/src/clojure/realworld/user points to the components/user/src/clojure/realworld/user folder.

We use the same approach with symbolic links to centralise docs, interfaces, project-files, resources and test from the corresponding components and bases.

This 'development' environment contains all eight components ...
... and the one base

When you open an environment in your IDE/code editor, and make changes to a component or base, those changes actually take place in the component and base "drawers". In other words, the symbolic links mean that we're directly editing the code that lives in the components and basesfolders.

This gives us the option to have several environments, each one with a different set of components and bases.