With reference to this recent addition to next-gen Lucee:
add system properties and system environments setting to server scope
This creates two structs under the server scope:
server.system.environment; for all the local OS environment variables puled from enumerating
server.system.properties; for all the JVM system properties pulled from enumerating
Firstly, i think this is a great idea. While at first it feels icky to stick anything into the server scope, upon reflection it seems like an elegant way of doing a little bit of plumbing we’d otherwise have to do in the
Application.cfc constructor. It’s a wonder this hasn’t always been part of server scope as it feels very CFML.
The general nomenclature is environment variables and system properties so I can understand the naming decision. However, both come from the
System class, and the names are often used interchangeably; for example, JVM environment properties. This has caused considerable debate amongst the developers in our office – naming things is always hard.
A less ambiguous naming of the variable scopes might be:
server.env; marries up to the function call
server.properties; marries up to the function call