kof / feature-driven-architecture

Defining boundaries for a large application.
https://codesandbox.io/s/github/kof/feature-driven-architecture/tree/master/demos/scoped-redux
37 stars 4 forks source link

Define documentation #11

Open azinit opened 3 years ago

azinit commented 3 years ago

Hi everyone! I have text version of kof's Berlin talk. https://www.notion.so/Summary-YouTube-Feature-Driven-Arhitecture-b8609fd4452b41f499703c841e56b8e9

Maybe, it'll be useful for someone 🤷‍♂️

Yeah, I know that there are repo's issues as documentation for a while (before common doc composing)

azinit commented 3 years ago

But there are still some open questions (which issues and articles - can't explain fully):

1. Does it make sense to group features by page?

According to experience - no, but it wasn't clear and obviously at start

2. How to impl communication between (isolated) features?

I found for my self:

But it isn't clear - what approach is recommended...

or is there exist some better methods

3. How to impl share date between (isolated) features?

I read that it's recommend to share data on page level (it's logical) in format: feature1 => page => {other features} But it isn't clear - how store and pass this data

UPD: Other variation of question - How to share page context/state between (isolated) features? (for example, auth data, entity mutation state - create/edit/view/delete, and etc. - something meaningfull for page and that should impact to features)

azinit commented 3 years ago

If someone has opinion about some of questions above - please, share it here =)

At the moment I have little misunderstanding with Feature Driven Development, namely - with cross-features communication

azinit commented 3 years ago

@kof Does it exists example based on FDD, with multi-page logic and cross-feature communication and data sharing?

(example at repo - unfortunately, doesn't demonstrate this aspects enough)

Main questions:

I already doubt, that there is a perfect solution resolving all FDD principles enough

kof commented 3 years ago

The main principle is that isolated features should not know about each other. There are multiple ways to achieve that:

  1. In case it's a unique case betweet 2 features on a singlle page, that page should be handling communication between the features without letting them know about each other feature 1 > page > feature 2
  2. In case there are 2 features which are often used together and you want that logic to be reusable on different pages, consider "cluster" concept I described here a little bit https://github.com/kof/feature-driven-architecture/issues/9. Cluster is allowed to know both features and it handles the communication between them.