Business Language#
Business Language is the domain language used by Nezam ERP modules. It models data shape, configurable policy, executable behavior, user interfaces, integration surfaces, deployment resources, and user-facing failures in a single package.
File roles#
| File suffix | Purpose |
|---|---|
.fields.bl | Reusable field types and scalar constraints |
.tables.bl | Persistent entities and configuration tables |
.functions.bl | Queries, commands, validations, and orchestration |
.services.bl | Service-facing operations and integration boundaries |
.messages.bl | Declared message catalog for user-facing failures |
.validations.bl | Validation rules when separated from command logic |
Grammar-backed areas#
The language grammar currently covers these authoring areas:
| Area | Start here |
|---|---|
| Packages and modules | Modules and namespaces |
| Syntax basics | Syntax basics |
| Declarations | Declarations |
| Data declarations | Data modeling |
| Table schemas | Table schema reference |
| Types and literals | Types and literals |
| Expressions | Expressions |
| Statements | Statements and control flow |
| SQL-like operations | Queries and DML |
| Function declarations | Function declarations |
| Function and service patterns | Functions and services |
| Classes and interfaces | Classes and interfaces |
| Rules, tests, and errors | Rules, tests, and errors |
| Validation declarations | Validation rule blocks |
| Test declarations | Test declarations |
| Test coverage patterns | Testing language behavior |
| Lifecycle subscriptions | Lifecycle subscriptions |
| Services and HTTP APIs | Services and APIs |
| Forms and app UI | Apps, forms, and controls |
| Source UI layouts | Source UI layouts |
| Infrastructure declarations | Resources and deployments |
| Annotations | Annotations |
| Configuration declarations | Configuration declarations |
| Configuration tables | Configuration tables |
| Configuration resolver patterns | Configuration resolver patterns |
| Messages and errors | Messages and errors |
| Grammar assets | Grammar reference |
Minimal module#
field VendorId: string {
max_length: 40;
key: true;
}
table Vendor {
field vendor_id: VendorId key origin;
field company_code: CompanyCode key;
field vendor_name: string max_length(120);
field active: bool default(true);
}
public function get_vendor(vendor_id_param: VendorId): Vendor? {
select var vendor: Vendor
where Vendor.vendor_id = vendor_id_param;
return vendor;
}Core rule#
If behavior can vary by company, tenant, country, process, or date, represent it as configuration data and resolve it explicitly. Do not hide missing configuration behind defaults.