Skip to content

Architecture questions #1

@OlegSuncrown

Description

@OlegSuncrown

Thank you for the amazing book. I have a few questions:

  1. Let’s say we have a reusable smart feature inside the ticketing domain, for example an async-search-combobox. Because it performs API calls, it is more of a smart component / feature than a pure UI component. How would you structure this inside the ticketing domain? Would you create something like a feature-common folder, or would you place it in something like feature-search-tickets and reuse it from feature-booking and feature-next-flights?

  2. In the example luggage/feature-luggage/luggage-card, would it make more sense to place luggage-card inside luggage/feature-luggage/luggage-overview, since it is only used there, or is it better to keep the structure flat? Also, do we even need a separate data folder if it is only used by feature-luggage, should that also follow the feature-local approach?

  3. next-flight has its own routing file. Wouldn’t it be better to import it inside ticketing.routes.ts instead of app.routes.ts?
    In the ticketing domain, there is a ticketing.routes.ts file, but I think that if you add a file like this, it gets the root type, according to this issue: Modules should support . placeholder softarc-consulting/sheriff#166. What would be the best structure in that case if, inside a domain, we want to have a component with a router-outlet and its own routes? Should that always live inside a folder?

  4. You placed auth under util, but what if auth is treated as a domain or feature with a login page, a forgot-password feature, and an auth.store? Also, the auth store may need to be used across the app because we always need information about the logged-in user. In some videos, I also saw an API/adapter approach where one domain can talk to another. Could that apply here as well?

Thank you once again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions