Closed uguryilmazunified closed 1 year ago
Decoupling I believe. I really don't have much programming experience, but if you google it you will find an infinity of reasons why not. I ended up using ORM, but than having a mapping from/to domain/orm instances. Here a two places where you can see what I mean:
hello, amazing book so far. I really enjoy what i am reading. Just one thing i am trying to wrap my head around
why do we have a domain level separately and we use mappers to declaratively map database models to those domain models. I usually use SqlAlchemy models and domain kind of connected together by inheriting a Model class. something like this -for us we would have the same classes for product or order line
i understand that having a domain level almost acts as a documentation for new developers who join to projects. It easily tells what's going on at our core domain logic but it just feels like we are also creating more complexity. I want to understand if there is more advantage to using mapper and table from sql alchemy instead of ORM funcitonalities. Thanks!