Skip to content

using API specifications (url , ...) in data layer violates Dependency Rule?! #11

@HamedMohtadi

Description

@HamedMohtadi

Hi.
Thanks for your work I learned a lot from that.
I wonder if we use this 3 layer architecture (Domain-Data-Presentation) as you did, using details from external data sources (such as API Urls, DB table names, DB syntax and etc.) in data layer, doesn't violates Clean Architecture Dependency rule? from Uncle Bob's manifest the last layer contains DB and if we consider that as raw DB and bring DBManager(ORM,...) to inner layer(adapters),It should know about outer details. Should we use Dependency Inversion again?
In your code, API's Url is hard coded in api.dart in data layer and if we consider API as an outer circle component,I think It violates Dependency Rule.
If you want to add DB as a source to this project, How you do that?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions