Skip to content

Commit 49d6f43

Browse files
authored
feat: refresh the FAQ (feature-sliced#628)
1 parent 92ffe2c commit 49d6f43

File tree

2 files changed

+62
-132
lines changed
  • i18n
    • en/docusaurus-plugin-content-docs/current/get-started
    • ru/docusaurus-plugin-content-docs/current/get-started

2 files changed

+62
-132
lines changed

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

Lines changed: 31 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,97 +7,62 @@ pagination_next: guides/index
77

88
:::info
99

10-
You can ask your question in [telegram chat](https://t.me/feature_sliced) / [github-issues](https://github.com/feature-sliced/documentation/issues) / [github-discussions](https://github.com/feature-sliced/documentation/discussions)
10+
You can ask your question in our [Telegram chat][telegram], [Discord community][discord], and [GitHub Discussions][github-discussions].
1111

1212
:::
1313

14-
### Structure = Architecture?
14+
### Is there a toolkit or a linter?
1515

16-
Architecture defines abstractions and relations between them (shared/features/pages/...)
16+
There is an official ESLint config — [@feature-sliced/eslint-config][eslint-config-official], and an ESLint plugin — [@conarti/eslint-plugin-feature-sliced][eslint-plugin-conarti], created by Aleksandr Belous, a community member. You're welcome to contribute to these projects or start your own!
1717

18-
*But without a proper structure, it's difficult to design a good architecture*
19-
20-
### Do I need a methodology only for "understanding and clarity" of what is happening in the project?
21-
22-
Rather yes than no
23-
24-
*Otherwise, you have to read huge directories `components/`...*
25-
26-
### Does a novice developer need an architecture/methodology?
27-
28-
Rather yes than no
29-
30-
*Usually, when you design and develop a project in one person, everything goes smoothly. But if there are pauses in development, new developers are added to the team - then problems come*
31-
32-
### Why do we need another methodology when everything is based on principles?
33-
34-
Answered [here](/docs/about/motivation)
35-
36-
### Where can I find examples of applying the methodology?
37-
38-
There are only such ones in the public domain so far, not all of them have been fully adapted to the latest version
39-
40-
*In the near future, the list will be updated and will be placed in a separate section*
41-
42-
- [Internal Examples](https://github.com/feature-sliced/examples)
43-
- [External Examples](/examples)
18+
### Where to store the layout/template of pages?
4419

45-
*Also, you can get acquainted with our [guides](/docs/guides) and [tutorials](/docs/get-started)*
20+
If you need plain markup layouts, you can keep them in `shared/ui`. If you need to use higher layers inside, there are a few options:
4621

47-
### Are there some useful resources / articles / etc about FSD and related things?
22+
- Perhaps you don't need layouts at all? If the layout is only a few lines, it might be reasonable to duplicate the code in each page rather than try to abstract it.
23+
- If you do need layouts, you can have them as separate widgets or pages, and compose them in your router configuration in App. Nested routing is another option.
4824

49-
<https://github.com/feature-sliced/awesome>
25+
### What is the difference between a feature and an entity?
5026

51-
### The project is written on feature-slices v1, how to update and is it worth it?
27+
An _entity_ is a real-life concept that your app is working with. A _feature_ is an nteraction that provides real-life value to your app’s users, the thing people want to do with your entities.
5228

53-
Answered [here](/docs/guides/migration/from-v1)
29+
For more information, along with examples, see the Reference page on [slices][reference-entities].
5430

5531
### Can I embed pages/features/entities into each other?
5632

57-
Answered [here](/docs/reference/slices-segments#slices)
33+
Yes, but this embedding should happen in higher layers. For example, inside a widget, you can import both features and then insert one feature into another as props/children.
5834

59-
### How do I work with the authorization context?
60-
61-
Answered [here](/docs/guides/examples/auth)
35+
You cannot import one feature from another feature, this is prohibited by the [**import rule on layers**][import-rule-layers].
6236

6337
### What about Atomic Design?
6438

65-
The current version of the methodology does not oblige, but also does not prohibit the use of Atomic Design together with Feature-Sliced Design
66-
67-
At the same time, Atomic Design [is well applied](https://t.me/feature_sliced/1653) for the `ui` segment of modules
68-
69-
### What is the difference between feature and entity?
39+
The current version of the methodology does not require nor prohibit the use of Atomic Design together with Feature-Sliced Design.
7040

71-
- `Entity` - business **entity**
72-
- blog-post / user / order / product / ...
73-
- `Feature` - business feature, **action on an entity**
74-
- create-blog-post / login-by-oauth / edit-account / publish-video / ...
41+
For example, Atomic Design [can be applied well](https://t.me/feature_sliced/1653) for the `ui` segment of modules.
7542

76-
See also [comparison reference](/docs/reference/layers), [viewer implementation of logic by layers](/docs/guides/examples/auth)
43+
### Are there any useful resources/articles/etc. about FSD?
7744

78-
### Where to store the layout/template of pages?
79-
80-
It is better to store general templates for markup in `shared/ui`, but there are [different cases](https://github.com/feature-sliced/documentation/discussions/129)
45+
Yes! <https://github.com/feature-sliced/awesome>
8146

82-
### Will there be a toolkit / linters?
47+
### Why do I need Feature-Sliced Design?
8348

84-
It will be, at the moment - in development =)
49+
It helps you and your team to quickly overview the project in terms of its main value-bringing components. A standardized architecture helps to speed up onboarding and resolves debates about code structure. See the [motivation][motivation] page to learn more about why FSD was created.
8550

86-
> For now, to sort / prohibit imports, you can use
87-
>
88-
> - `eslint-plugin-import`
89-
> - `eslint-plugin-simple-import-sort`
90-
> - `eslint-plugin-boundaries`
91-
> - `dependency-cruiser`
92-
>
93-
> See [basic config example](https://gist.github.com/azinit/4cb940a1d4a3e05ef47e15aa18a9ecc5)
51+
### Does a novice developer need an architecture/methodology?
9452

95-
### Can I store the features used on one page directly in the page directory?
53+
Rather yes than no
9654

97-
The methodology strongly recommends against doing this, since each module has a corresponding place in the structure.
55+
*Usually, when you design and develop a project in one person, everything goes smoothly. But if there are pauses in development, new developers are added to the team - then problems come*
9856

99-
Otherwise , there is a risk of complicating the project's code base
57+
### How do I work with the authorization context?
10058

101-
> *"Today, the feature can only be used on one page. Next week - on three. And in a month - it may be removed at all. We cannot predict the future, and we need to refrain from premature optimizations every time"*
59+
Answered [here](/docs/guides/examples/auth)
10260

103-
*See also the example from [tutorial](/docs/get-started/tutorial#normal-approach)*
61+
[import-rule-layers]: /docs/reference/layers#import-rule-on-layers
62+
[reference-entities]: /docs/reference/layers#entities
63+
[eslint-config-official]: https://github.com/feature-sliced/eslint-config
64+
[eslint-plugin-conarti]: https://github.com/conarti/eslint-plugin-feature-sliced
65+
[motivation]: /docs/about/motivation
66+
[telegram]: https://t.me/feature_sliced
67+
[discord]: https://discord.gg/S8MzWTUsmp
68+
[github-discussions]: https://github.com/feature-sliced/documentation/discussions

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

Lines changed: 31 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,97 +7,62 @@ pagination_next: guides/index
77

88
:::info
99

10-
Свой вопрос можно задать в [telegram-чате](https://t.me/feature_sliced) / [github-issues](https://github.com/feature-sliced/documentation/issues) / [github-discussions](https://github.com/feature-sliced/documentation/discussions)
10+
Свой вопрос можно задать в [Telegram-чате][telegram], [Discord-сообществе][discord] и [GitHub Discussions][github-discussions].
1111

1212
:::
1313

14-
### Структура = Архитектура? {#structure--architecture}
14+
### Существует ли тулкит или линтер? {#is-there-a-toolkit-or-a-linter}
1515

16-
Архитектура - про абстракции и выстраивание связей между ними (shared/features/pages/...)
16+
Есть официальный конфиг для ESLint — [@feature-sliced/eslint-config][eslint-config-official], и плагин для ESLint — [@conarti/eslint-plugin-feature-sliced][eslint-plugin-conarti], созданный участником сообщества Александром Белоусом. Мы будем рады вашим вкладам в эти проекты или созданию своих!
1717

18-
*Но без надлежащей структуры - хорошей архитектуры не сделать*
19-
20-
### Нужна ли мне методология только для "понимания и ясности" что происходит в проекте? {#do-i-need-a-methodology-only-for-understanding-and-clarity-of-what-is-happening-in-the-project}
21-
22-
Скорее да, чем нет
23-
24-
*Иначе приходится читать огромные директории `components/`...*
25-
26-
### Нужна ли архитектура/методология начинающему разработчику? {#does-a-novice-developer-need-an-architecturemethodology}
27-
28-
Скорее да, чем нет
29-
30-
*Обычно, когда проектируешь разрабатываешь проект в одно лицо - все идет гладко. Но если появляются паузы в разработке, добавляются новые разработчики в команду - тогда-то и наступают проблемы*
31-
32-
### Зачем нужна еще одна методология, когда все строится на принципах? {#why-do-we-need-another-methodology-when-everything-is-based-on-principles}
33-
34-
Ответили [здесь](/docs/about/motivation)
35-
36-
### Где найти примеры применения методологии? {#where-can-i-find-examples-of-applying-the-methodology}
37-
38-
В открытом доступе пока есть только такие, не все до конца адаптированы до последней версии
39-
40-
*В ближайшее время список будет пополняться и будет вынесен в отдельный раздел*
41-
42-
- [Internal Examples](https://github.com/feature-sliced/examples)
43-
- [External Examples](/examples)
18+
### Где хранить layout/template страниц? {#where-to-store-the-layouttemplate-of-pages}
4419

45-
*Также можно ознакомиться с [гайдами](/docs/guides) и [туториалами](/docs/get-started)*
20+
Если вам нужны простые шаблоны разметки, вы можете хранить их в `shared/ui`. Если вам нужно использовать более высокие слои, есть несколько вариантов:
4621

47-
### Есть ли какие-нибудь полезные ресурсы/статьи/и т.д. по FSD и связанным вещам? {#are-there-some-useful-resources--articles--etc-about-fsd-and-related-things}
22+
- Возможно, вам вообще не нужны лейауты? Если макет состоит всего из нескольких строк, разумно будет дублировать код в каждой странице, а не пытаться абстрагировать его.
23+
- Если вам нужны лейауты, вы можете хранить их как отдельные виджеты или страницы, и компоновать их в конфигурации роутера в App. Вложенный роутинг — еще один вариант.
4824

49-
<https://github.com/feature-sliced/awesome>
25+
### В чем отличие feature от entity? {#what-is-the-difference-between-feature-and-entity}
5026

51-
### Проект написан на feature-slices v1, как обновиться и стоит ли? {#the-project-is-written-on-feature-slices-v1-how-to-update-and-is-it-worth-it}
27+
_Entity_ — это понятие из реальной жизни, с которым работает ваше приложение.. _Feature_ — это взаимодействие, представляющее реальную ценность для пользователей; что-то, что люди хотят делать с сущностями.
5228

53-
Ответили [здесь](/docs/guides/migration/from-v1)
29+
Для получения дополнительной информации, а также примеров, см. страницу [про слайсы][reference-entities] в разделе Reference.
5430

5531
### Могу ли я вкладывать страницы/фичи/сущности друг в друга? {#can-i-embed-pagesfeaturesentities-into-each-other}
5632

57-
Ответили [здесь](/docs/reference/slices-segments#slices)
33+
Да, но это вложение должно происходить в более высоких слоях. Например, внутри виджета вы можете импортировать обе фичи, а затем вставить одну фичу в другую через пропсы/вложение.
5834

59-
### Как мне работать с контекстом авторизации? {#how-do-i-work-with-the-authorization-context}
60-
61-
Ответили [здесь](/docs/guides/examples/auth)
35+
Вы не можете импортировать одну фичу из другой фичи, это запрещено [**правилом импортов для слоёв**][import-rule-layers].
6236

6337
### А что с Atomic Design? {#what-about-atomic-design}
6438

65-
Текущая версия методологии не обязывает, но и не запрещает использовать Atomic Design вместе с Feature-Sliced Design
66-
67-
При этом Atomic Design [хорошо применяется](https://t.me/feature_sliced/1653) для `ui` сегмента модулей
68-
69-
### В чем отличие feature и entity? {#what-is-the-difference-between-feature-and-entity}
39+
Текущая версия методологии не обязывает, но и не запрещает использовать Atomic Design вместе с Feature-Sliced Design.
7040

71-
- `Entity` - бизнесовая **сущность**
72-
- blog-post / user / order / product / ...
73-
- `Feature` - бизнесовая фича, **действие над сущностью**
74-
- create-blog-post / login-by-oauth / edit-account / publish-video / ...
41+
При этом Atomic Design [хорошо применяется](https://t.me/feature_sliced/1653) для `ui` сегмента модулей.
7542

76-
См. также [справочную информацию по сравнению](/docs/reference/layers), [реализация viewer логики по слоям](/docs/guides/examples/auth)
43+
### Есть ли какие-нибудь полезные ресурсы/статьи/т.д. по FSD? {#are-there-any-useful-resourcesarticlesetc-about-fsd}
7744

78-
### Где хранить layout/template страниц? {#where-to-store-the-layouttemplate-of-pages}
79-
80-
Общие шаблоны для разметки лучше хранить в `shared/ui`, но бывают [разные случаи](https://github.com/feature-sliced/documentation/discussions/129)
45+
Да! <https://github.com/feature-sliced/awesome>
8146

82-
### А будет тулкит / линтеры? {#will-there-be-a-toolkit--linters}
47+
### Зачем мне нужен Feature-Sliced Design? {#why-do-i-need-feature-sliced-design}
8348

84-
Будет, на данный момент - в разработке =)
49+
Он помогает вам и вашей команде быстро ознакомиться с проектом с точки зрения его основных компонентов, приносящих бизнес-ценность. Стандартизированная архитектура помогает ускорить онбординг и разрешать споры о структуре кода. См. страницу [Мотивация][motivation], чтобы узнать больше о том, почему FSD был создан.
8550

86-
> Пока что, для сортировки / запрета импортов можно воспользоваться
87-
>
88-
> - `eslint-plugin-import`
89-
> - `eslint-plugin-simple-import-sort`
90-
> - `eslint-plugin-boundaries`
91-
> - `dependency-cruiser`
92-
>
93-
> См. [базовый пример конфига](https://gist.github.com/azinit/4cb940a1d4a3e05ef47e15aa18a9ecc5)
51+
### Нужна ли архитектура/методология начинающему разработчику? {#does-a-novice-developer-need-an-architecturemethodology}
9452

95-
### Могу ли я хранить фичи используемые на одной странице прямо в директории страницы? {#can-i-store-the-features-used-on-one-page-directly-in-the-page-directory}
53+
Скорее да, чем нет
9654

97-
Методология крайне не рекомендует так делать, поскольку каждому модулю есть соответствующее место в структуре
55+
*Обычно, когда проектируешь разрабатываешь проект в одно лицо - все идет гладко. Но если появляются паузы в разработке, добавляются новые разработчики в команду - тогда-то и наступают проблемы*
9856

99-
Иначе - есть риск усложнения кодовой базы проекта
57+
### Как мне работать с контекстом авторизации? {#how-do-i-work-with-the-authorization-context}
10058

101-
> *"Сегодня фича может использоваться только на одной странице. На следующей неделе - на трех. А через месяц - ее может не быть совсем. Мы не можем предсказывать будущее, и нужно каждый раз воздерживаться от преждевременных оптимизаций"*
59+
Ответили [здесь](/docs/guides/examples/auth)
10260

103-
*См. также пример из [tutorial](/docs/get-started/tutorial#usual-approach)*
61+
[import-rule-layers]: /docs/reference/layers#import-rule-on-layers
62+
[reference-entities]: /docs/reference/layers#entities
63+
[eslint-config-official]: https://github.com/feature-sliced/eslint-config
64+
[eslint-plugin-conarti]: https://github.com/conarti/eslint-plugin-feature-sliced
65+
[motivation]: /docs/about/motivation
66+
[telegram]: https://t.me/feature_sliced
67+
[discord]: https://discord.gg/S8MzWTUsmp
68+
[github-discussions]: https://github.com/feature-sliced/documentation/discussions

0 commit comments

Comments
 (0)