Skip to main content
US Army Corps of EngineersInstitute for Water Resources, Risk Management Center
Draft

This web application architecture guidance is still in draft and is subject to change.

Case Conventions by Language

Use these industry-standard casing patterns for identifiers. Follow the target language conventions first, then match existing project style.

Language/ContextTypes / ComponentsFunctions / VariablesConstants
JavaScript / TypeScriptPascalCase classes/constructorscamelCase functions, methods, variablesSCREAMING_SNAKE_CASE
React (components/hooks)PascalCase componentscamelCase props; on*/handle* handlers; use* hooksSCREAMING_SNAKE_CASE
C# / .NETPascalCase types, methods, properties; interface names prefixed with IcamelCase locals and parametersPascalCase (per .NET conventions)
PythonPascalCase classessnake_case functions, variables, modulesALL_CAPS (module-level constants)
RPascalCase only when required by specific packages or S3/S4 class conventionssnake_case functions and variablessnake_case (no strong constant convention)

JavaScript / TypeScript

const MAX_RETRIES = 3;

class ReportBuilder {
buildReport() {}
}

function calculateRiskScore(inputData) {}

const userName = 'Taylor';

React (components and hooks)

function UserCard({ userId, onSubmit }) {
const [isLoading, setIsLoading] = useState(false);

const handleSubmit = () => {
onSubmit(userId);
};

return <UserCardView userId={userId} onSubmit={handleSubmit} />;
}

function useUserData(userId) {}

C# / .NET

public class RiskModel
{
public const int MaxIterations = 100;

public int MaxItems { get; }

public void CalculateRisk() {}
}

public interface IUserService {}

var userName = "Taylor";

Python

MAX_ITERATIONS = 100

class RiskModel:
def calculate_risk(self):
pass

def calculate_risk_score(input_data):
return 0

user_name = "Taylor"

R

calculate_risk <- function(input_data) {
return(0)
}

risk_summary <- list()
max_iterations <- 100