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/Context | Types / Components | Functions / Variables | Constants |
|---|---|---|---|
| JavaScript / TypeScript | PascalCase classes/constructors | camelCase functions, methods, variables | SCREAMING_SNAKE_CASE |
| React (components/hooks) | PascalCase components | camelCase props; on*/handle* handlers; use* hooks | SCREAMING_SNAKE_CASE |
| C# / .NET | PascalCase types, methods, properties; interface names prefixed with I | camelCase locals and parameters | PascalCase (per .NET conventions) |
| Python | PascalCase classes | snake_case functions, variables, modules | ALL_CAPS (module-level constants) |
| R | PascalCase only when required by specific packages or S3/S4 class conventions | snake_case functions and variables | snake_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