modular-monolith-with-ddd | Full Modular Monolith application with Domain-Driven Design | Architecture library

 by   kgrzybek C# Version: Current License: MIT

kandi X-RAY | modular-monolith-with-ddd Summary

kandi X-RAY | modular-monolith-with-ddd Summary

modular-monolith-with-ddd is a C# library typically used in Architecture applications. modular-monolith-with-ddd has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Full Modular Monolith application with Domain-Driven Design approach.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              modular-monolith-with-ddd has a medium active ecosystem.
              It has 8547 star(s) with 1299 fork(s). There are 340 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 41 open issues and 59 have been closed. On average issues are closed in 60 days. There are 12 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of modular-monolith-with-ddd is current.

            kandi-Quality Quality

              modular-monolith-with-ddd has 0 bugs and 0 code smells.

            kandi-Security Security

              modular-monolith-with-ddd has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              modular-monolith-with-ddd code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              modular-monolith-with-ddd is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              modular-monolith-with-ddd releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of modular-monolith-with-ddd
            Get all kandi verified functions for this library.

            modular-monolith-with-ddd Key Features

            No Key Features are available at this moment for modular-monolith-with-ddd.

            modular-monolith-with-ddd Examples and Code Snippets

            No Code Snippets are available at this moment for modular-monolith-with-ddd.

            Community Discussions

            QUESTION

            Best practice on determining an aggregate root vs child entities (DDD Modelling)
            Asked 2021-Nov-25 at 15:45

            I am attempting to model a set of entities and am seeking best practices on determining if a domain object is a candidate for an aggregate root or as a list of child entities under another aggregate root.

            I have a Game object that represents a played game of a generic sport. The Game aggregate currently has a list of child entities titled GamePlayers. These GamePlayer entities also have a list of child entities titled GamePlayerHits which record where a player was hit during a game of this generic sport.

            Methods exist on the Game aggregate such as AddPlayer() and RemovePlayer(). The child entities under GamePlayer of type GamePlayerHit also have methods such as AddHit().

            The problem I'm facing is whether GamePlayers should be an aggregate root of its own with a reference to the Game entity. A Game can technically exist without a list of GamePlayers initially, at some later stage it may get populated. The Game could also be deleted or cancelled without any players ever being registered. This leads me to believe that GamePlayers should be it's own aggregate based on examples I've see online.

            This is the example where I began to question the best practices surrounding this subject:

            https://github.com/kgrzybek/modular-monolith-with-ddd

            Here, the Meetings aggregate has a list of child MeetingAttendee entities however the Meetings commenting feature MeetingComment is it's own aggregate with a reference back to the Meeting it belongs to. For ease of referencing:

            The Meeting class with MeetingAttendee child entities

            The MeetingComment class as it's own aggregrate

            In this example why is MeetingComment not a list of child entities under the Meeting aggregate with a suitable AddComment() and DeleteComment() methods on the main aggregate? My assumption is either comments are optional and are not required to validate the aggregrate and/or these entities need referencing elsewhere via an identifier/key which wouldn't be possible as being a member of a child collection.

            How does one determine taking in to account my example above regarding games which is the correct way to models these aggregates and entities? What determines if entities should exist as child entities or as a separate aggregate root?

            ...

            ANSWER

            Answered 2021-Nov-25 at 15:45

            How does one determine taking in to account my example above regarding games which is the correct way to models these aggregates and entities? What determines if entities should exist as child entities or as a separate aggregate root?

            The existence of a domain constraints connecting information.

            If all we needed was to capture a bunch of information provided to us, we wouldn't need a domain model; a database is more than adequate for data capture.

            We introduce the domain model because either (a) we need to ensure that new information is compatible with information that we have already captured and/or (b) there are derived values that we want to compute locally (ex: because computing them locally reduces the error rate).

            Rule: If we have a constraint that must always hold, and that constraint spans multiple pieces of information, then that information must all be contained within a single "aggregate".

            The justification for the rule: information subject to a constraint like this must be changed atomically. In other words, we want all of this information to be part of a single unit for the purpose of data changes. Therefore, the domain entities that manage this information must all be part of the same "aggregate".

            In the cargo shipping example taken from the blue book (Evans, 2003), we have a constraint on the misdirected property of a shipment: it must be true if the most recently recorded handling event for a container is inconsistent with the most recently assigned itinerary. It follows that these three pieces of information must be stored atomically (otherwise we risk inconsistencies in our stored data), and therefore that the domain entities that manage this information must all be part of the same aggregate.

            I tend to imagine a graph - the data are nodes, and each constraint implies edges connecting the data subject to that constraint. Our rule then becomes "every graph must be contained entirely within a single aggregate".

            A single aggregate can contain more than one of these graphs, but in doing that you are also introducing contention that is not inherent to the domain -- this is one of the forms of "accidental complexity".

            Source https://stackoverflow.com/questions/70111821

            QUESTION

            Domain Driven Design CQRS and the save button
            Asked 2021-Nov-05 at 15:24

            This may be a dumb question, but I don't know how to solve this.

            I am moving from CRUD to Domain-Driven Design with CQRS.

            I have seen many DDD examples like this. You could find many more on Github.

            The domain model has methods like changeDetails, addSomething, removeSomething, etc., and the commands could be just like that.

            But in the UI, I have only 1 page with all its information, and everything is updated by clicking a single Save button.

            How could I trigger all of the commands in 1 click?

            If all commands are triggered and 1 fails, could the information be inconsistent?

            ...

            ANSWER

            Answered 2021-Nov-05 at 15:24

            When you get to this problem, I think you need to redesign your UI and create a more task based UI, you do change one thing at the time. Just like for example when you buy something on Amazon.com, then you don't complete your order with just one big save button, instead it takes you on a journey, adding credit card details, selecting shipping, adding address, confirming the order.....

            see this video Finding your service boundaries: a practical guide

            Source https://stackoverflow.com/questions/69818764

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install modular-monolith-with-ddd

            Download and install .NET Core 3.1 SDK

            Support

            The API only communicates with Modules in two ways: during module initialization and request processing. Each module has a static Initialize method which is invoked in the API Startup class. All configuration needed by this module should be provided as arguments to this method. All services are configured during initialization and the Composition Root is created using the Inversion-of-Control Container. Each module has the same interface signature exposed to the API. It contains 3 methods: command with result, command without result and query. Note: Some people say that processing a command should not return a result. This is an understandable approach but sometimes impractical, especially when you want to immediately return the ID of a newly created resource. Sometimes the boundary between Command and Query is blurry. One example is AuthenticateCommand - it returns a token but it is not a query because it has a side effect.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kgrzybek/modular-monolith-with-ddd.git

          • CLI

            gh repo clone kgrzybek/modular-monolith-with-ddd

          • sshUrl

            git@github.com:kgrzybek/modular-monolith-with-ddd.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link