Skip to content

Commit 2979a8b

Browse files
authored
Revive processes under the mark "deprecated" (feature-sliced#571)
1 parent b72281d commit 2979a8b

File tree

7 files changed

+63
-24
lines changed

7 files changed

+63
-24
lines changed

i18n/en/docusaurus-plugin-content-docs/current/get-started/overview.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In FSD, a project consists of <mark>layers</mark>, each layer is made up of <mar
2424

2525
![themed--scheme](/img/visual_schema.jpg)
2626

27-
The **layers** are standardized across all projects and vertically arranged. Modules on one layer can only interact with modules from the layers strictly below. There are currently six of them (bottom to top):
27+
The **layers** are standardized across all projects and vertically arranged. Modules on one layer can only interact with modules from the layers strictly below. There are currently seven of them (bottom to top):
2828

2929
1. `shared` — reusable functionality, detached from the specifics of the project/business.
3030
<small>(e.g. UIKit, libs, API)</small>
@@ -35,7 +35,9 @@ The **layers** are standardized across all projects and vertically arranged. Mod
3535
4. `widgets` — compositional layer to combine entities and features into meaningful blocks.
3636
<small>(e.g. IssuesList, UserProfile)</small>
3737
5. `pages` — compositional layer to construct full pages from entities, features and widgets.
38-
6. `app` — app-wide settings, styles and providers.
38+
6. `processes` (deprecated) — complex inter-page scenarios.
39+
<small>(e.g., authentication)</small>
40+
7. `app` — app-wide settings, styles and providers.
3941

4042

4143
Then there are **slices**, which partition the code by business domain. This makes your codebase easy to navigate by keeping logically related modules close together. Slices cannot use other slices on the same layer, and that helps with high cohesion and low coupling.

i18n/en/docusaurus-plugin-content-docs/current/reference/layers.mdx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ On this page, a _module_ refers to an internal module in the application — a f
1515

1616
Every layer carries special semantic meaning to help you determine how much responsibility you should allocate to a module in your code. The names and meanings of layers are standardized across all projects built with Feature-Sliced Design.
1717

18-
There are 6 layers in total, arranged from most responsibility and dependency to least:
18+
There are 7 layers in total, arranged from most responsibility and dependency to least:
1919

2020
<img alt="" src="/img/layers/layers.svg" width="128" height="240" style={{ float: "right", margin: "0 2em" }} />
2121

2222
1. App
23-
2. Pages
24-
3. Widgets
25-
4. Features
26-
5. Entities
27-
6. Shared
23+
2. Processes (deprecated)
24+
3. Pages
25+
4. Widgets
26+
5. Features
27+
6. Entities
28+
7. Shared
2829

2930
You don't have to use every layer in your project — only add them if you think it brings value to your project.
3031

@@ -154,6 +155,18 @@ This layer is similar to Widgets in its compositional nature, albeit on a larger
154155
<li>Branches in a repository</li>
155156
</ul></td></tr></tbody></table>
156157

158+
### Processes
159+
160+
:::caution
161+
162+
This layer has been deprecated. The current version of the spec recommends avoiding it and moving its contents to `features` and `app` instead.
163+
164+
:::
165+
166+
Escape hatches for multi-page interactions.
167+
168+
This layer is deliberately left undefined. Most applications should not use this layer, and keep router-level and server-level logic on the App layer. Consider using this layer only when the App layer grows large enough to become unmaintainable and needs unloading.
169+
157170
### App
158171

159172
All kinds of app-wide matters, both in the technical sense (e.g., context providers) and in the business sense (e.g., analytics).

i18n/ru/docusaurus-plugin-content-docs/current/get-started/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ FSD подходит для проектов и команд любого раз
3434
4. `widgets` (виджеты) — композиционный слой для соединения сущностей и фич в самостоятельные блоки
3535
<small>(например, IssuesList, UserProfile)</small>.
3636
5. `pages` (страницы) — композиционный слой для сборки полноценных страниц из сущностей, фич и виджетов.
37-
6. `app` — настройки, стили и провайдеры для всего приложения.
37+
6. `processes` (процессы, устаревший слой) — сложные сценарии, покрывающие несколько страниц.
38+
<small>(например, авторизация)</small>
39+
7. `app` — настройки, стили и провайдеры для всего приложения.
3840

3941
Затем есть **слайсы**, разделяющие код по предметной области. Они группируют логически связанные модули, что облегчает навигацию по кодовой базе. Слайсы не могут использовать другие слайсы на том же слое, что обеспечивает высокий уровень [_связности_][refs-wiki-cohesion] (cohesion) при низком уровне [_зацепления_][refs-wiki-coupling] (coupling).
4042

i18n/ru/docusaurus-plugin-content-docs/current/reference/layers.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ pagination_next: reference/slices-segments
1515

1616
Каждый слой несет в себе особый семантический смысл, помогающий определить, какую ответственность следует возложить на модуль в вашем коде. Названия и значения слоёв стандартизированы для всех проектов, построенных с использованием Feature-Sliced Design.
1717

18-
Всего существует 6 слоёв, расположенных от наибольшей ответственности и зависимости к наименьшей:
18+
Всего существует 7 слоёв, расположенных от наибольшей ответственности и зависимости к наименьшей:
1919

2020
<img alt="" src="/img/layers/layers.svg" width="128" height="240" style={{ float: "right", margin: "0 2em" }} />
2121

2222
1. App (Приложение)
23+
2. Processes (Процессы, устаревший слой)
2324
2. Pages (Страницы)
2425
3. Widgets (Виджеты)
2526
4. Features (Фичи/функции)
@@ -153,6 +154,18 @@ pagination_next: reference/slices-segments
153154
<li>Ветки в репозитории</li>
154155
</ul></td></tr></tbody></table>
155156

157+
### Processes
158+
159+
:::caution
160+
161+
Этот слой считается устаревшим. Текущая версия спецификации рекомендует избегать его и перемещать его содержимое в `features` и `app`.
162+
163+
:::
164+
165+
Выход из ситуаций, когда требуется сложное многостраничное взаимодействие.
166+
167+
Этот уровень намеренно оставлен не очень определенным. Большинству приложений этот слой не пригодится, логику на уровне роутера и сервера следует оставить на уровне App. Рассмотрите возможность использования этого слоя только тогда, когда слой App вырастет настолько, что станет неподдерживаемым и потребует разгрузки.
168+
156169
### App
157170

158171
Всё, что касается всего приложения, как в техническом смысле (например, провайдеры контекста), так и в бизнес-смысле (например, аналитика).

static/img/layers/layers.svg

Lines changed: 23 additions & 14 deletions
Loading

static/img/visual_schema-ru.jpg

20.3 KB
Loading

static/img/visual_schema.jpg

20.2 KB
Loading

0 commit comments

Comments
 (0)