Code Monkey home page Code Monkey logo

Comments (2)

jorge07 avatar jorge07 commented on June 14, 2024 1

You're totally right here. This is a trade off. My models are also my DB schema. And it doesn't have to be like that. When I did the project thought that decouple until the infinite wasn't worth it the time I've to spend. We're paid to deliver anyway. After some years I've to say that you can couple to a very trusted library if the api is stable and the building and maintenance time of the opposite is too much. In the other hand, your domain model doesn't care about your DB scheme or the DB itself so projections are a game changer
To accomplish this generate projections by collecting domain events, like I do here https://github.com/jorge07/symfony-4-es-cqrs-boilerplate/blob/master/src/Infrastructure/User/Query/Projections/UserView.php
Event Sourcing is optional BTW.
I hope you find this helpful

from ddd-playground.

aswierc avatar aswierc commented on June 14, 2024

I did, that what you talked about - I created the interface for collection in the domain, and next to I created, for example, myCollection in infra, 'extends ArrayCollection implements MyInterfaceFromDomain'.

👍

from ddd-playground.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.