BayLang Technology is an architecture-oriented language and development platform. It's a programming language and technology stack designed for building applications with a clear architecture and separation of layers.
BayLang's key idea is Clean Architecture as part of the language, not as a set of guidelines. Architectural patterns (DTOs, Models, ViewModels, Adapters, Repositories, Contracts, Components) are built into the development approach itself and supported by the tools.
What makes BayLang different:
Suitable for:
BayLang does not attempt to replace popular frameworks. It offers a language as an architectural tool, where the application structure is explicitly defined and remains stable as the project and team grow.
This is not just a new syntax - it is an attempt to formalize the best practices of enterprise development at the language and compiler level.
Component example:
<class name="App.Components.Pages.IndexPage.IndexPage">
<use name="Runtime.Widget.Button" component="true" />
<use name="Runtime.Widget.Section" component="true" />
<style>
.main_section{
padding-top: 20px;
padding-bottom: 20px;
background-position: center top;
background-repeat: no-repeat;
background-size: cover;
}
</style>
<template>
<div class="main_page">
<Section class="main_section">
<h1 class="page_title">Index page</h1>
<div class="page_text">Hello {{ this.model.message }}</div>
<Button @event:click="this.onClick()">Click</Button>
</Section>
</div>
</template>
<script>
/**
* Click button
*/
void onClick()
{
this.model.setMessage(this.model.message ~ "!");
}
</script>
</class>
Model example
namespace App.Components.Pages.IndexPage;
use Runtime.BaseModel;
use Runtime.Serializer.MapType;
use Runtime.Serializer.StringType;
use Runtime.Web.RenderContainer;
use App.Components.Pages.IndexPage.IndexPage;
class IndexPageModel extends BaseModel
{
string component = classof IndexPage;
string message = "Hello World!";
/**
* Serialize object
*/
static void serializer(MapType rules)
{
parent(rules);
rules.addType("message", new StringType());
}
/**
* Init widget
*/
void initWidget(Dict params)
{
parent(params);
}
/**
* Build title
*/
void buildTitle(RenderContainer container)
{
this.layout.setPageTitle("Index page");
}
/**
* Set message
*/
void setMessage(string message)
{
this.message = message;
}
}