What is Domain?
To define this, we must first determine what we mean in this context and in development in general . The dictionary definition of this is "An area of information or activity." If we go a little further than that, in the field of software engineering it usually refers to the subject area that the application is intended to be applied. In other words, during application development, it is "the area of knowledge and activity around which application logic revolves."
Another common term used during software development
domain logicwhatever is better known to many developers,
business logicCorresponds to a high-level in-app rules
Business objects: (
OOADand interact with each other to modify the model data).
What is Domain Driven Design?
Originally 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 application of this software development. It aims to facilitate the management of complex applications by connecting the relevant parts of the software to an ever-evolving model. It focuses on three basic principles:
- Focus on the core
- Intricate designs
domain expertsImprove the application model and
domaincollaborate continuously to solve problems with .
Evans' domain Based Design ,
DDDit further defines a few common terms that are useful when describing 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 one context.
- model : defining the selected aspects of a
domainand an abstraction system that can be used to solve problems related to it
- Ubiquitous Language :
domain modelA language that is used and configured around all team members to combine all of the team's activities with the software .
- Limited Context : A limit in which a specific model is defined and applicable (typically the work of a subsystem or a specific team).
Domain-driven-designalso defines a number of high-level concepts that can be used in conconnection to create and modify
- Entity Entity :
objectContrary to traditional, its own consistent continuity
- Value Object : Has a clear identity but does not have a different identity
immutable(cannot be changed).
- Domain Event : An object used to record a separate event related to model activity within the system. When iken, events within the entire system may be being monitored, a single event generated for types of related maintenance.
- Aggregate: A cluster
entitiesand the boundaries set around the group. Instead of performing individual or all actions for each on its own, a singular element is assigned to the collection of elements. External objects no longer have direct access to each individual or every individual within it , instead they have access to only one element, and use it to communicate instructions to the group as a whole. This app is associated with many real coding applications that we cover in our series.
- Service: Essentially, a
Serviceis a form of transaction or business logic that does not naturally fit the field
Objects. In other words, if some functions need to be, but a
entityif it cannot be associated with or , it is probably a.
- Repositories: Not to be confused with the partner
version control repositories,
Serviceis to provide access to all using a global interface
entitiesand the collection at a certain distance. Methods must be defined to allow the creation, modification, and deletion of objects in . However, using it to make data queries is to remove such data query capabilities from within business logic.
- Factories :
design patternssummarizes the logic of creating complex objects and ensures that the customer is not familiar with the inner workings of object manipulation
DDDrecommends using .
continuous integrationalso highlights the more popular app than ever, which asks the entire development team to use a single shared code store and transfer commitments to it on a daily basis (though not several times a day). At the end of the job, an automated process is carried out that checks the integrity of the entire code base, runs automated unit tests, regression tests and the like, and quickly detects possible problems that may arise in the latest operations.
Domain Driven Design Benefits
- Facilitates Communication : Project
ubiquitouswith an early emphasis on common and language creation
domain modelteams will often find communication much easier throughout the entire development lifecycle. generally
DDDit will require less technical jargon when discussing aspects of the application, since
ubiquitous languageEarly identified ones will probably define simpler terms to refer to these more technical aspects.
- Increases Flexibility :
DDDSince its concepts are very heavily based , almost everything in its contents will be based on an object, and therefore it will be 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
domainunlike applications that emphasize UI/UX, it will usually produce applications that are accurate and representative for the one at hand. First and fore time. Although a clear balance is required, focus,
DDDmeans that the approach can produce a product that resonates well with the audience associated with it.
Domain Driven Design Disadvantages
- Requires Robust Domain Expertise : Even if they are the most technically competent brains working on development
domain expertIf there is not at least one person in the team who knows exactly inside and outside the subject area intended to be implemented, 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.
- Encourages Iterative Applications : Although many see this as an advantage,
DDDit is undeniable that applications rely strongly on continuous iteration and continuous integration to create a self-adjustable project when needed. Some organizations, especially past experiences, are largely
waterfallmodel or so on, if it depends on less flexible development models, it may have problems with these applications.
I hope I was able to properly describe DDD in this article.