Skip to content

Commit f2c01ee

Browse files
committed
Docs update
1 parent e9c3069 commit f2c01ee

4 files changed

Lines changed: 88 additions & 3 deletions

File tree

‎docs/brief/en/Brief.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,20 @@ Which branch: `language` — statement / operator syntax; `paradigm` — concept
3030
- A project is composed of **modules**; how data is stored and made fast is the
3131
physical model, and exchange with anything outside is integration.
3232

33-
Two misreadings worth pre-empting, because everything downstream depends on
34-
them:
33+
Three misreadings worth pre-empting, because everything downstream depends
34+
on them:
3535

3636
- A class does not map to a table. A table holds property values; its key
3737
fields hold object ids and are typed by the parameter classes of those
3838
properties.
3939
- The system modules are a library of ordinary properties and actions, not
4040
built-in language operators. Only `System` is implicit; the rest need
4141
`REQUIRE` before their declarations are reachable.
42+
- `.lsf` is not a shell around code in another language. The application —
43+
its model, computations, checks, reactions to changes, forms and access
44+
rights — is written in these elements; Java and JavaScript enter it only
45+
where the platform itself admits them (`INTERNAL`, `EXTERNAL`, `FORMULA`,
46+
`CUSTOM`) and for what those operators are for.
4247

4348
## The brief articles — which one to open
4449

‎docs/brief/ru/Brief.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ slug: "/Brief"
2929
- Проект собирается из **модулей**; как данные хранятся и за счёт чего работают
3030
быстро — это физическая модель, а обмен с чем угодно снаружи — интеграция.
3131

32-
Два непонимания, которые стоит снять заранее, потому что от них зависит всё
32+
Три непонимания, которые стоит снять заранее, потому что от них зависит всё
3333
дальнейшее:
3434

3535
- Класс не отображается в таблицу. Таблица хранит значения свойств; её
@@ -38,6 +38,11 @@ slug: "/Brief"
3838
- Системные модули — это библиотека обычных свойств и действий, а не
3939
встроенные операторы языка. Неявно подключается только `System`, остальным
4040
нужен `REQUIRE`, чтобы их объявления стали доступны.
41+
- `.lsf` — не оболочка над кодом на другом языке. Приложение — его модель,
42+
вычисления, проверки, реакции на изменения, формы и права доступа —
43+
пишется этими элементами; Java и JavaScript попадают в него только там,
44+
где их допускает сама платформа (`INTERNAL`, `EXTERNAL`, `FORMULA`,
45+
`CUSTOM`), и по назначению этих операторов.
4146

4247
## Статьи brief — какую открыть
4348

‎docs/rules/en/Rules.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,43 @@ the name in the first column.
5959
the user which area went unread, and MUST NOT present the result as
6060
rule-checked.
6161

62+
## Choice of mechanism (MANDATORY)
63+
64+
1. PLATFORM MECHANISMS FIRST. An application on lsFusion is
65+
written in `.lsf`. Wherever the platform provides a
66+
mechanism — the data model, computations, constraints,
67+
events, actions, session control, forms, access rights —
68+
the assistant MUST implement it with that mechanism:
69+
classes, properties, actions, `CONSTRAINT`, `WHEN`,
70+
`NEWSESSION` / `APPLY`, `FORM`, the security policy.
71+
The assistant MUST NOT use `.lsf` as a shell over its own
72+
implementation of these mechanisms in Java, JavaScript or
73+
another language: a separate server part, a separate
74+
interface with its own data operations, a computation or
75+
a check duplicated outside the platform.
76+
77+
2. WHAT IS NOT APPLICATION CODE. The rule concerns the
78+
application's own code. It does not concern the platform's
79+
own Java implementation (the server and the clients),
80+
auxiliary development tooling (build, test and verification
81+
scripts), or the operators through which the platform itself
82+
admits code in another language, used for what they are for:
83+
`EXTERNAL` and `INTERNAL` for reaching a system outside the
84+
platform or a component of its own deployment, `FORMULA` for
85+
an SQL expression, `CUSTOM` and a custom view on a React
86+
component for rendering that the standard views do not
87+
provide. Java or JavaScript present in the project is not a
88+
violation in itself; business logic moved out of `.lsf` is.
89+
90+
3. WHEN CODE OUTSIDE `.lsf` IS ALLOWED. Only at an established
91+
limitation of the platform or an explicit requirement of the
92+
user, and only for the part that limitation or requirement
93+
covers. A documentation search with no suitable result does
94+
not establish a limitation: before deciding on such code the
95+
assistant MUST read the area's brief
96+
(`lsfusion_get_guidance(brief='<name>')`) and search
97+
`paradigm` and `how-to`.
98+
6299
## Mandatory workflow
63100

64101
1. ELEMENT IDENTIFICATION ORDER (MANDATORY)

‎docs/rules/ru/Rules.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,44 @@ slug: "/Rules"
6161
ОБЯЗАН сказать пользователю, какая область осталась непрочитанной, и
6262
НЕ ДОЛЖЕН выдавать результат за проверенный на соответствие правилам.
6363

64+
## Выбор механизма (ОБЯЗАТЕЛЬНО)
65+
66+
1. СНАЧАЛА МЕХАНИЗМЫ ПЛАТФОРМЫ. Приложение на lsFusion пишется
67+
на `.lsf`. Везде, где платформа предоставляет механизм —
68+
модель данных, вычисления, ограничения, события, действия,
69+
управление сессиями, формы, права доступа, — ассистент
70+
ОБЯЗАН пользоваться этим механизмом: классами,
71+
свойствами, действиями, `CONSTRAINT`, `WHEN`,
72+
`NEWSESSION` / `APPLY`, `FORM`, политикой безопасности.
73+
Ассистент НЕ ДОЛЖЕН использовать `.lsf` как оболочку над
74+
собственной реализацией этих механизмов на Java, JavaScript
75+
или другом языке: отдельной серверной частью, отдельным
76+
интерфейсом со своими операциями над данными, вычислением
77+
или проверкой, продублированными вне платформы.
78+
79+
2. ЧТО НЕ ЯВЛЯЕТСЯ ПРИКЛАДНЫМ КОДОМ. Правило касается
80+
собственного кода приложения. Оно не касается штатной
81+
Java-реализации самой платформы (сервера и клиентов),
82+
вспомогательных инструментов разработки (сценариев сборки,
83+
тестирования и проверки) и операторов, которыми сама
84+
платформа допускает код на другом языке, при использовании
85+
по назначению: `EXTERNAL` и `INTERNAL` — для обращения к
86+
системе вне платформы или к компоненту её собственной
87+
поставки, `FORMULA` — для выражения на SQL, `CUSTOM` и
88+
пользовательское представление на компоненте React — для
89+
отрисовки, которой не дают стандартные представления.
90+
Наличие Java или JavaScript в проекте само по себе не
91+
нарушение; нарушение — бизнес-логика, вынесенная из `.lsf`.
92+
93+
3. КОГДА КОД ВНЕ `.lsf` ДОПУСТИМ. Только при установленном
94+
ограничении платформы или явном требовании пользователя и
95+
только в объёме этого ограничения или требования. Поиск по
96+
документации без подходящего результата ограничения не
97+
устанавливает: прежде чем решить в пользу такого кода,
98+
ассистент ОБЯЗАН прочитать brief области
99+
(`lsfusion_get_guidance(brief='<имя>')`) и выполнить поиск
100+
по `paradigm` и `how-to`.
101+
64102
## Обязательный порядок работы
65103

66104
1. ПОРЯДОК ИДЕНТИФИКАЦИИ ЭЛЕМЕНТОВ (ОБЯЗАТЕЛЬНО)

0 commit comments

Comments
 (0)