Hello. I build new opensource experimental language named as BayLang.
BayLang is an architecture-oriented language and development platform. It's a programming language designed for building web applications, CRM, ERP, E-Commerce, SaaS.
The main goal is accelerate web development by use ready blocks and components such as Forms, Tables, Buttons, Input, Select and ready plugins Admin panel, Auth manager and etc.
Key idea is Clean Architecture as part of the language, not as a set of guidelines. Architectural patterns are built into the development approach itself and supported by the tools.
Core features:
- Schema-driven data design, forms, APIs, and presentation are built from defined schemas
- Compilation to PHP and Vue (including SPA and SSR)
- Unified model for both backend and frontend
- Minimal boilerplate code, maximum explicit architecture
- Variable typing
Suitable for:
- Enterprise and B2B systems
- Admin panels and backoffice solutions
- SaaS products
- Systems with long lifecycles and high support costs
- Projects where code readability and architectural discipline are important
BayLang is not just a new syntax - it is an attempt to formalize the best practices of enterprise development at the language and compiler level.
Website: baylang.com
Example code of component:
<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>
Code model:
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;
}
}
Top comments (0)