Back to Academy
coding principles
Convention Over Configuration
Convention Over Configuration (CoC) is a design paradigm that decreases the number of decisions developers need to make by providing sensible defaults. The framework or system assumes reasonable conventions (file locations, naming patterns, default behaviors) so that explicit configuration is only required when deviating from the norm. This reduces boilerplate, speeds up development, and makes projects more consistent and easier for new developers to understand.
Use Cases
- •Framework routing that maps URL paths to controller files automatically based on directory structure
- •ORM tools that infer table names from class names and column names from field names
- •Build tools that look for source files in conventional directories (src/, test/) without configuration
- •Dependency injection frameworks that auto-wire beans by type when there is only one candidate
Visualization
Implementation
Output
Click "Run Code" to see output...