Skip to content

Releases: feature-sliced/documentation

v2.1: Pages come first!

13 Nov 20:08
dd7be18
Compare
Choose a tag to compare

The new revision of Feature-Sliced Design is here! The main difference with FSD 2.0 is the new approach to decomposition — “pages first”.

What's “pages-first”?

You do “pages first” by keeping more code in pages. For example, large blocks of UI, forms and data logic that are not reused on other pages should now stay in the slice of the page that they are used in. The division by segments (ui, api, model, etc.) still applies to all this code, and we encourage you to further split and organize code into folders inside of segments — don't just pile all the code into a single file.

In the same way, widgets are no longer just a compositional layer, instead they should also store code that isn't currently needed outside of that widget, including its own stores, business logic, and API interactions.

When you have a need to reuse code in several widgets or pages, consider putting it in Shared. If that code involves business logic (i. e. managing specific modal dialogs), consider breaking it up into infrastructural code, like the modal manager, and the business code, like the content of the modals. The infrastructure can then go to Shared, and the content can stay in the pages that use this infrastructure.

How is it different?

In FSD 2.0 we explained how to identify entities and features in your application, and then combine them in widgets and pages. Over time we started disliking this approach, mostly for the following reasons:

  • Code cohesion is much worse in this approach
    • You need to jump around several folders just to make changes to a single user flow
    • Unused code is harder to delete because it's somewhere else
  • Finding entities and features is still an advanced skill that needs to be developed over time
    • It requires understanding of the business context, which not all developers want to bother with
    • On the other hand, splitting by pages is natural and requires little training
    • Different developers have different understandings of these concepts, which leads to everyone having their own idea of FSD, which causes conflict and misunderstanding

Is it hard to migrate from FSD 2.0?

This is a non-breaking change, so you don’t even necessarily need to migrate your current FSD projects to FSD 2.1, but we still think the new way of thinking will lead to a more cohesive and less opinionated structure. We’ve compiled a few steps you can take in the migration guide.

What else happened since the last release?

Another exciting new thing in the FSD ecosystem is our architectural linter, Steiger. It's still in active development, but it is production-ready.

A couple more minor clarifications to the docs were made as well:

  1. Application-aware things like the route constants, the API calls, or company logo, are now explicitly allowed in Shared. Business logic is still not allowed, but these things are not considered to be business logic.
  2. Imports between segments in App and Shared were always allowed, but it's been made explicit too.

And here's what happened to the documentation website:

Added

  • Slightly rewritten and expanded overview page to give some details about FSD right away (#685).
  • New partial translations: Korean (#739, #736, #735, #742, #732, #730, #715), Japanese (#728).
  • The tutorial was rewritten. Technical details were stripped out, more FSD theory has been added (#665).
  • Guides on how to deal with common frontend issues like page layouts (#708), types (#701), authentication (#693).
  • Guides on how to use FSD with Nuxt (#710, #689, #683, #679), SvelteKit (#698), Next.js (#699, #664, #644), and TanStack Query (#673).
  • A new feedback widget, powered by PushFeedback! Go give it a try and let us know what you think of the new pages (#695).
  • Comparison of FSD with Atomic Design (#671).

Changed

  • The migration guide from a custom architecture (formerly known as "from legacy") has been actualized (#725).

Removed

  • The decomposition cheatsheet is now unlisted for an undefined period of time. It proved to be more harmful than useful, but maybe it can be saved later (#649).

Stable release, version-tracked from now on

01 Oct 17:59
e6fd4a2
Compare
Choose a tag to compare

This is, technically, the first ever stable release of Feature-Sliced Design! However, the methodology has been stable for quite a while now, and is used in production by quite a few companies. From now on, FSD will keep a proper changelog so that you can stay up-to-date with what's happening in the project. Below is a summary of the changes that have happened at some point in time over the last 2 years:

Deprecated

  • The Processes layer is now deprecated. If you're using this layer, consider moving the code to the Features layer, with the help of the App layer if you need to access pages.

Added

  • The docs are now available in the Uzbek language! The translation is a work in progress, so feel free to contribute (#597, #603, #605).
  • Layers, slices, and segments now have strict definitions to avoid ambiguity (#547).
  • We now have a multi-lingual Discord community! Feel free to join and ask questions in English, Spanish, German, Ukrainian, Russian, and Japanese.
  • The Telegram community is now making use of forum topics to enable conversations in multiple languages: English, Spanish, Ukrainian, Russian, Japanese, Kazakh, Uzbek, and Serbian.

Changed

  • The documentation is now English-first. Other languages are, of course, still supported (#509).
  • A new decomposition cheatsheet has been released (#627).
  • The FAQ section has been updated, outdated questions have been removed (#628).
  • The visual depiction of layers has been updated to reflect their folder-based nature (#583).
  • The README has been refreshed, now it features official badges that you can use in your projects (#569).
  • The pages about naming and knowledge types have been rewritten for clarity (#550, #551).
  • The documentation has been thoroughly reorganised. The old URLs will redirect to the right places (#471, #531).
  • The first page of the docs is now a helpful index with a prominent first step (#525).
  • The overview page has been rewritten to be more concise and informative (#512, #515, #516).
  • FSD has updated its branding, and there are now guidelines to the brand usage. The standard spelling of the name is now "Feature-Sliced Design" (#496, #499, #500, #465).

v2.0-beta released (MVP)

17 May 12:07
Compare
Choose a tag to compare
Pre-release

Прошло много времени, и наконец - v2.0-beta версия методологии готова увидеть свет!

Поскольку остается еще много не разрешенных моментов и кейсов - этот релиз скорее представляет из себя промежуточную версию методологии и ее фундаментальные концепции.

Примечание: Поскольку работа над v2.0 версией методологии еще в процессе - не рекомендуется использовать текущую версию в рабочих проектах (только на свой страх и риск)

https://feature-sliced.design/

Changelog

Полный список изменений см. здесь

image

Feedback