[JAVA] Modeling a Digimon with DDD for the first time Part 1

It is a memo that keeps the thought flow for writing the Advent calendar.

I do DDD in-house, but I have never practiced DDD. Let's try DDD individually. Isn't it easier to model what you like? I thought, I decided to express my favorite Digimon Adventure in DDD, Until now.

I have no experience I bought it at a technical bookstore The trajectory of a chibi dragon traveling through the forest of mokumoku modeling https://taimen.jp/f/867 Try with reference to

Subject

Speaking of Digimon Adventure The evolution of Digimon is also good, The growth of children is also good There are various, but If you spread it too much, you can't do anything, This time, I will try "Agumon" as a theme.

Modeling

Use Case

I tried to write "Who does what will happen" in the book, so I wrote it.

--When Agumon evolves, it becomes Greymon --Greymon becomes a super-evolving MetalGreymon --When Greymon evolves into darkness, it becomes SkullGreymon. ――When MetalGreymon evolves to the ultimate, it becomes WarGreymon --When Agumon evolves into a warp, it becomes WarGreymon.

Where I was worried

Will Agumon become WarGreymon when it evolves into a warp? Or is warp evolution the evolution of Agumon, Greymon, MetalGreymon, and WarGreymon in that order? In anime, whenever you evolve into MetalGreymon, you always enter the evolution scene to Greymon, When you evolve into WarGreymon, you will enter the evolutionary motion from Agumon, right? Thinking about it I have evolved Agumon into WarGreymon. I settled on the definition of. So, after official confirmation, it seems that the evolution from MetalGreymon to WarGreymon is the ultimate evolution. http://digimon-adventure.net/tri/evolution/agumon.html In other words, "ultimate evolution" and "warp evolution" are separate words.

Glossary

Next, in the book, when you have a use case, Let's extract words that correspond to people, things, and things. Because it is written, practice. What I thought about here was that "people, things, things" was a noun. So the verb "evolve" should not be omitted here.

--Agumon --Greymon --Metal Graymon --SkullGreymon --WarGreymon

Domain model

Here is the domain model. Agumon who went up in the glossary to the domain. Draw a line on the relevant domain according to the use case.

dijimon.png

It looks like this. Next, I'm writing a class diagram with this.

Recommended Posts

Modeling a Digimon with DDD for the first time Part 1
Oreore certificate https (2020/12/19) for the first time with nginx
How to study kotlin for the first time ~ Part 2 ~
How to study kotlin for the first time ~ Part 1 ~
Spring Boot for the first time
Spring AOP for the first time
With the software I've been making for a long time ...
Introduction to java for the first time # 2
Learning for the first time java [Introduction]
[First Java] Make something that works with Intellij for the time being
I tried using Docker for the first time
Walls hit by Rspec for the first time
Android Studio development for the first time (for beginners)
I tried touching Docker for the first time
A story about a super beginner participating in the AtCoder contest for the first time (AtCoder Beginner Contest 140)
Learn for the first time java # 3 expressions and operators
Learning memo when learning Java for the first time (personal learning memo)
Tutorial to create a blog with Rails for beginners Part 1
A summary of what Java programmers find when reading Kotlin source for the first time
Hello World with Ruby extension library for the time being
The first WEB application with Spring Boot-Making a Pomodoro timer-
Tutorial to create a blog with Rails for beginners Part 2
Think when Rails (turbolinks) doesn't load the page for the first time
The story of the first Rails app refactored with a self-made helper
I made a reply function for the Rails Tutorial extension (Part 1)
Connecting to a database with Java (Part 1) Maybe the basic method
I made a reply function for the Rails Tutorial extension (Part 5):
Building a DLNA server on Ubuntu (just move for the time being)
For the time being, run the war file delivered in Java with Docker
Draw a bar graph and a line graph at the same time with MPAndroidChart
Creating a java web application development environment with docker for mac part1
The story of releasing the Android app to the Play Store for the first time.
[Socket communication (Java)] Impressions of implementing Socket communication in practice for the first time
Creating an app and deploying it for the first time on heroku
Create a java web application development environment with docker for mac part2
A review note for the class java.util.Scanner
Create a jar file with the command
Touching kotlin for the first time-Enum Classes
A review note for the class java.util.Optional
Run a DMN with the Camunda DMN Engine
Extract a part of a string with Ruby
A review note for the class java.util.Objects
A review note for the package java.time.temporal
Time shift measures with Docker for Windows
The story of intentionally using try catch for the first time in my life
Code for solving a random number matrix with the Pivot Gauss elimination method
Impressions and doubts about using java for the first time in Android Studio