My Blog Posts

What is Domain Driven Design ?

What is Domain Driven Design ?

What is Domain ?

To define this, we first need to determine what we mean in this context and in development in general. The dictionary definition of this is" An information or activity area." If we go down a little bit from this, the field of software engineering usually expresses the area of subject matter that the application is intended to implement. In other words, during application development, it is "the area of knowledge and activity around which application logic revolves." domain-driven-design

Another common term used during software development domain layerOr domain logicwhat is better known to many developers, business logicbusiness logicCorresponds to high-level rules in an application business objects: (OOADinteracts with each other to create and modify model data).

What is Domain Driven Design?

Initially and in his 2004 book, Domain-Driven Desing, which became popular by programmer Eric Evans : Struggle and Complexity at the Heart of Software , is the concept that applies to the expansion and development of this software in practice. It aims to facilitate the management of complex applications by connecting related parts of the software to an ever-evolving model. It focuses on three basic principles:

  • Focus on the grasshoir domainAnd domain logic.
  • Complex designs domain.
  • domain expertsImprove the application model and domainconstantly cooperate to solve problems with .

Evans' Domain Based Design , DDDdefines a few more general terms that are useful when explaining and discussing applications:

  • Context : The setting in which a word or phrase appears that determines its meaning. Expressions about a model can only be understood in a context.
  • Model : defining the selected aspects of a domainand an abstraction system that can be used to solve problems with it domain.
  • Ubiquitous Language : domain modelA language used and configured around all team members to combine all of the team's activities with software.
  • Limited Context : A limit in which a specific model is defined and applicable (typically the work of a sub-system or a particular team).

Building Blocks

Domain-driven-designalso defines a set of high-level conceptes that can be used in connection with each other to create and modify domain models:

  • Entity Entity : objectContrary to traditional, its consistent continuity Objectsdefined by attributes.
  • Value Object : Has a distinct identity but does not have a different ID immutable(cannot be changed).object attributes
  • Domain Event : An object used to record a separate event related to model activity within the system. If all events within the system can be monitored, a single event is created for the types of related maintenance.
  • Aggregate: One cluster entitiesand with the boundaries set around the group. Instead of performing individual or all actions on their own for each, a singular element is assigned to the collection of elements. External objects no longer have direct access to each individual or each individual in it , instead they have access to only one item and use it to convey instructions to the group as a whole. This app is associated with many real coding applications that we address in our series.
  • Service: Essentially, a Serviceis a form of process or business logic that does not fit naturally in the field Objects. In other words, if some functions need to be entityor if it cannot be associated with , it is probably a.
  • Repositories: Not to be confused with the partner version control repositoriesDDDmeaning of repository, which is a Serviceusing a global interface is to provide all access entitiesand the collection at a certain distance. Methods must be defined to allow objects in them to be created, changed, and deleted. However, by using it to make data queries, it is to remove such data query capabilities from within business logic.
  • Factories design patternsoutlining the logic of creating complex objects and allowing the customer to not know about the inner workings of object manipulation. DDDto be used.

Domain-driven-designIn addition continuous integrationalso heavily highlights the more popular app than ever, asking the entire development team to use a single shared code store and pass on commitments to it on a daily (if not several times a day). At the end of the job, an automated process is executed that checks the integrity of the entire code base, runs automated unit tests, regression tests, and so on, and quickly detects potential problems that may arise in the latest processes.

Domain Driven Design Advantages

  • Facilitates Communication : Project ubiquitousan early emphasis on creating common and language domain modelfor teams will often find communication much easier throughout the entire development lifecycle. Usually DDDwill require less technical jargon when discussing aspects of the application, because ubiquitous languageEarly lys will probably define simpler terms to refer to these more technical aspects.
  • Increases Flexibility : DDDBecause its concepts are based so intensely, almost everything in it will be based on an object and therefore quite modular and encapsulated. This allows for regular and continuous replacement and improvement of various components and even the entire system as a whole.
  • Domain Interface DDDThe practice of building around concepts and within the project domain expertsRecommend DDDthat's what you're domain, unlike applications that emphasize UI/UX, it will often produce applications that are accurate and representative for what is at hand. First and foreest. While a clear balance is required, focus, domainDDDmeans that the approach can produce a product that resonates well in the audience associated with it.

Domain Driven Design Disadvantages

  • Requires Solid Domain Expertise : Even if they are technically competent minds working on development domain expertIf there is not at least one person in the team who knows exactly the in and out of the subject area intended to implement the application, it is all in vain. . In some cases, development may require the integration of one or more external team members who can move through the lifecycle.
  • Promotes Iterative Applications : Although many see this as an advantage, DDDthere is no denying that applications are strongly based on continuous iteration and continuous integration to create a shapeable project that can adjust itself as needed. Some organizations, especially past experiences, have largely waterfallModel or similar, it may have problems with these applications if it depends on less flexible development models.

I hope I've been able to properly explain DDD in this article.

Share this article

Comments (0)